mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-17 13:22:42 +01:00
misc
This commit is contained in:
parent
8dea0bbbcc
commit
064489e37c
@ -29,6 +29,7 @@ from onyx.configs.onyxbot_configs import MAX_THREAD_CONTEXT_PERCENTAGE
|
||||
from onyx.context.search.enums import LLMEvaluationType
|
||||
from onyx.context.search.models import BaseFilters
|
||||
from onyx.context.search.models import SavedSearchDocWithContent
|
||||
from onyx.context.search.models import SearchDoc
|
||||
from onyx.context.search.models import SearchRequest
|
||||
from onyx.context.search.pipeline import SearchPipeline
|
||||
from onyx.context.search.utils import dedupe_documents
|
||||
@ -316,7 +317,7 @@ class FastSearchResult(BaseModel):
|
||||
class FastSearchResponse(BaseModel):
|
||||
"""Response from the fast search endpoint."""
|
||||
|
||||
results: list[FastSearchResult]
|
||||
results: list[SearchDoc]
|
||||
total_found: int
|
||||
|
||||
|
||||
@ -368,13 +369,24 @@ def get_fast_search_response(
|
||||
|
||||
# Convert chunks to response format
|
||||
results = [
|
||||
FastSearchResult(
|
||||
SearchDoc(
|
||||
document_id=chunk.document_id,
|
||||
chunk_id=chunk.chunk_id,
|
||||
content=chunk.content,
|
||||
source_links=chunk.source_links,
|
||||
score=chunk.score,
|
||||
chunk_ind=chunk.chunk_id,
|
||||
semantic_identifier=chunk.semantic_identifier,
|
||||
link=None, # Assuming source_links might be used for link
|
||||
blurb=chunk.content,
|
||||
source_type=chunk.source_type, # Default source type
|
||||
boost=0, # Default boost value
|
||||
hidden=False, # Default visibility
|
||||
metadata=chunk.metadata,
|
||||
score=chunk.score,
|
||||
is_relevant=None,
|
||||
relevance_explanation=None,
|
||||
match_highlights=[],
|
||||
updated_at=None,
|
||||
primary_owners=None,
|
||||
secondary_owners=None,
|
||||
is_internet=False,
|
||||
)
|
||||
for chunk in chunks
|
||||
]
|
||||
|
@ -88,7 +88,7 @@ ARG NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY
|
||||
ENV NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=${NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY}
|
||||
|
||||
# Use NODE_OPTIONS in the build command
|
||||
RUN NODE_OPTIONS="${NODE_OPTIONS}" npx next build
|
||||
RUN NODE_OPTIONS="${NODE_OPTIONS} --max-old-space-size=4096" npx next build
|
||||
|
||||
# Step 2. Production image, copy all the files and run next
|
||||
FROM base AS runner
|
||||
|
@ -998,6 +998,7 @@ export default function SearchPage({
|
||||
}
|
||||
|
||||
if (response.documents.length > 0) {
|
||||
alert(JSON.stringify(response.documents[0]));
|
||||
setSearchResults(response.documents);
|
||||
|
||||
// Count results by source type
|
||||
|
Loading…
x
Reference in New Issue
Block a user