This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
[Feature] Return context while calling the chat/completions #320
Labels
enhancement
New feature or request
Is this your first time submitting a feature request?
Describe the feature
Hello guys!
We are using canopy in a server-mode.
And it would be super helpful if you add a context which is used in completions into the response for
chat/completions
endpoint.It is required to show on UI links/original text which Engine uses to write a completion.
There are two flows to support:
For the first one it's pretty easy just to add a new field:
And for
src.canopy.chat_engine.chat_engine.ChatEngine.chat
just addresponse.response_context = context
For the "stream" flow, it's pretty breaking as you need to add the whole process as a first chunk.
I'm not a Python-guy, but it could be something like this (in
src.canopy_server.app.chat
):but maybe it requires a new endpoint.
Describe alternatives you've considered
I can see
context/query
method, but it will be very untrusted in a chat mode, as you can't predict which text you should put in to receive the same results from Pinecone DB.Also we can't rely on AI to include required info from context based on prompt, as it sometimes do add it and sometimes now at all.
Who will this benefit?
No response
Are you interested in contributing this feature?
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: