-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simple apis now cited/context doc indices #2419
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -60,7 +60,11 @@ def model_dump(self, *args: list, **kwargs: dict[str, Any]) -> dict[str, Any]: | |||
|
|||
|
|||
class LLMRelevanceFilterResponse(BaseModel): | |||
relevant_chunk_indices: list[int] | |||
llm_selected_doc_indices: list[int] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed this everywhere
@@ -1,9 +1,28 @@ | |||
import json | |||
from datetime import datetime | |||
from typing import Any | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made this function able to encode datetime objects
elif isinstance(packet, StreamingError): | ||
response.error_msg = packet.error | ||
elif isinstance(packet, ChatMessageDetail): | ||
response.message_id = packet.message_id | ||
elif isinstance(packet, FinalUsedContextDocsResponse): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here we get the final context docs and get the int index of that doc in the list of docs we are already returning
@@ -74,4 +74,6 @@ class ChatBasicResponse(BaseModel): | |||
simple_search_docs: list[SimpleDoc] | None = None | |||
error_msg: str | None = None | |||
message_id: int | None = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are the 2 new fields (and one renamed) that we are returning through the simple apis
@@ -525,8 +523,9 @@ def _process_stream( | |||
SearchResponseSummary, message.response | |||
).top_sections | |||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here we yield the final context docs
* simple apis now cited/context doc indices * minor fixes
* simple apis now cited/context doc indices * minor fixes
No description provided.