최근 검색


최근 검색 없음

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


댓글을 남기려면 로그인하세요.

원하는 정보를 못 찾으셨나요?

새 게시물