Hello,
I am having difficulty creating a shared action that retrieves data from ChatGPT. Currently, it fetches data from its default knowledge base, but I want it to pull information from the custom knowledge base that I have created.
The code is written in Nunjucks, and I would appreciate support in using the parameter to achieve this.
{%- set payload = {
"model": "gpt-4o-mini",
"messages": [{"role": "system", "content": user_prompt }],
"temperature": 0.2
} -%}
{%- set response = "https://api.openai.com/v1/chat/completions" | callRest(
verb = "POST",
options = {
"auth": {
"bearer": apiKey
},
"headers": {
"Content-Type": "application/json"
}
},
body = payload
) -%}
{{{{ response.choices[0].message.content }}}}
How can i use file search chatgpt call?