最近搜索


没有最近搜索

Connecting to OpenAI Assistant



已于 2025年1月06日 发布

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

1 条评论

image avatar

Tipene Hughes

Zendesk Developer Advocacy

Hi Alghiery,
 
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 under data in your getSummary 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


请先登录再写评论。

找不到所需的内容?

新建帖子