Skip to content

How do you return source_documents from a ConversationalRetrievalChain? #108

Closed Answered by auxon
auxon asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, now I have finally resolved it, by adding the correct media_type to the StreamingResponse:

return StreamingResponse.from_chain(
    chain, request.messages[-1].content, as_json=True,
    media_type="text/event-stream")

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@auxon
Comment options

@auxon
Comment options

@auxon
Comment options

Answer selected by auxon
@auxon
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant