Recent searches
No recent searches
Connecting to OpenAI Assistant
Posted Jan 06, 2025
Hi,
So sorry if I posted in the wrong section but this is related to a Zendesk App I created using this Zendesk Developer's tutorial.
As far as I know, based on the tutorial, we are just using the usual OpenAI model to summarize the ticket. But, how do I connect it to my OpenAI Assistant that we personally have created? We have an OpenAI Assistant created through the dashboard and the Assistant has specific product knowledge of our products. Thank you!
The code based on the article above is as follow:
async function getSummary(prompt) {
const options = {
url: "https://api.openai.com/v1/chat/completions",
type: "POST",
contentType: "application/json",
headers: {
Authorization: "Bearer {{setting.openAiApiToken}}",
},
data: JSON.stringify({
model: "gpt-3.5-turbo",
messages: [{ role: "user", content: prompt }],
}),
secure: true,
};
const response = await client.request(options);
0
1 comment
Tipene Hughes
If you have a fine tuned model that you'd like to use instead of the default model, I'm fairly certain you need to update the
model
property underdata
in yourgetSummary
function. This does fall outside of our scope of support though since this is OpenAI code, so I'd encourage you to take a look at their docs for more in-depth information.0