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?
@John Funk unfortunately, I don't know anything about the ChatGPT API so I don't know how to specify the custom knowledge base.
@Rafael Frasson where are you having an issue? In finding out how to use the ChatGPT API it how to use it from JMWE?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How to use, i think ive done. My trouble is: how to force the open api call, search the answer in your knowledge base, created from files that i put it on. Now, with my script, the answer returned from chatgpt is based on it knowledge default, but the knowledge about my digital products, it does not know very well. I am using a jmwe shared action, then put te shared action return in a customized field.
After a workflow run, in a postaction, this trigger run.
Did i be clear?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.