Project

General

Profile

Feature #3579

Add conversation support to Assistants GCF

Added by Ram Kordale 6 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Urgent
Assignee:
Start date:
06/02/2024
Due date:
% Done:

100%

Estimated time:

Description

call_openai_api(model, index, thread_id, new_chat)

-get <assistant_id, instructions, prompt prefix, prompt suffix> for <model, index> from DS
-if (assistant_id == "")
--return error //this will not happen to users
-else
--assistant_id = GET https://api.openai.com/v1/assistants/{assistant_id}

-if (thread_id == "")
--thread_id = create_thread() [POST https://api.openai.com/v1/threads]
-else
--thread_id = GET https://api.openai.com/v1/threads/{thread_id}

-if (new_chat) //delete all messages
--messages = GET https://api.openai.com/v1/threads/{thread_id}/messages
--delete messages [In a loop: 1. GET https://api.openai.com/v1/threads/{thread_id}/messages/{message_id} 2. DELETE https://api.openai.com/v1/threads/{thread_id}/messages/{message_id}]

-create message [POST https://api.openai.com/v1/threads/{thread_id}/messages]

-return thread_id, response

#1

Updated by Ram Kordale 6 months ago

  • Description updated (diff)
#2

Updated by Ram Kordale 6 months ago

  • Description updated (diff)
#3

Updated by Md Shahzar 6 months ago

  • Status changed from New to In Progress
#4

Updated by Ram Kordale 6 months ago

  • Description updated (diff)
#5

Updated by Md Shahzar 6 months ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100
#6

Updated by Md Shahzar 6 months ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Md Shahzar to Ram Kordale
#7

Updated by Ram Kordale 3 months ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF