Skip to content
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

Feature/streaming with citations #1128

Merged
merged 4 commits into from
Oct 24, 2024
Merged

Conversation

jamesrichards4
Copy link
Contributor

Context

feature/citation_prompt has turned off streaming for citation responses temporarily. This restores it.

This PR should wait until the db migration fix PR has gone in. There should be no issues either way though

Changes proposed in this pull request

A custom PydanticOutputParser which streams tokens from the answer field of our citation response class while maintaining the creation of the pydantic object which tracks the answer and citations

Guidance to review

Enjoy. The work is mostly based on the existing Langchain output parsers with the relevant _transform functions overridden to allow stateful tracking of the token deltas.

Things to check

  • I have added any new ENV vars in all deployed environments
  • I have tested any code added or changed
  • I have run integration tests

@jamesrichards4 jamesrichards4 changed the base branch from main to feature/citation_prompt October 24, 2024 13:13
@jamesrichards4 jamesrichards4 marked this pull request as ready for review October 24, 2024 13:24
@jamesrichards4 jamesrichards4 changed the base branch from feature/citation_prompt to main October 24, 2024 14:39
@jamesrichards4 jamesrichards4 merged commit efbd5c8 into main Oct 24, 2024
3 checks passed
@gecBurton gecBurton deleted the feature/streaming-with-citations branch October 25, 2024 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants