You need to sign in or sign up before continuing.
Duo Chat AI Gateway - Add context to the prompt
Enrich Duo Chat prompt with additional context information.
Implementation details
The AI gateway needs to receive the context parameter and use it to enrich the chat prompt. We can test the AI gateway change using /v2/chat/agent at http://localhost:5052/docs.
Additional context params could be similar to code suggestions.
{
"additional_context": [
{
"type": "file",
"name": "",
"content": ""
}
]
}
where:
-
type
can be eitherfile
orsnippet
-
name
a file or a snippet name -
content
is a content itself
The prompt excerpt from code suggestions.
We should do this in two parts:
- Add the additional_context parameter to the aigw
- Make changes so the prompt in the aigw actually uses the context
Edited by Missy Davies