-
Notifications
You must be signed in to change notification settings - Fork 1
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
Howie/fully customizable event handler #14
base: main
Are you sure you want to change the base?
Conversation
src/quartapp/chat.py
Outdated
|
||
if stream_data: | ||
yield f"data: {stream_data}\n\n" | ||
async for _, _, to_be_yield in stream: |
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.
What triggers to_be_yield?
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.
I prefer you get the concept from my inline comment and variable names rather than answering here. Let me know if my new comment answer your question.
self, message: "ThreadMessage" | ||
) -> Optional[str]: | ||
if message.status == "completed": | ||
annotations = [annotation.as_dict() for annotation in message.file_citation_annotations] |
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.
Are annotations always citations? Do they have any other additional information?
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.
Are annotations always citations?
No, a while ago there was issue that the delta text has annotation, but we got no citation. Backend claimed they have fixed it. To do our best, we collect all citation and convert the anntations into clickable links only if the corresponded citation exist.
Do they have any other additional information?
Yes, but for citation, I only care about file_citation_annotations.
Are PRs to this repo always into main? |
use the new version of event handler. Fixed citation.