最近の検索


最近の検索はありません

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


サインインしてコメントを残してください。

お探しのものが見つかりませんか?

新規投稿