Discussions

Ask a Question
Back to All

OpenAI intergration in streams.

I noticed D-ID added integration of LLM script using OpenAI in the talk and clips stream.

to my understanding i need in the script to add the conversation array in messages with the role, content and created_at. and the last element in messages[] should be the user query.

my questions are:

  • is the conversation context handled since in the request response i can't get the OpenAI response? meaning will d-id api automatically add the OpenAI response to messages[] as assistant role?
  • will i need to specify OpenAI api key in x-api-key-external?

I would appreciate to have an answer ASAP,
Thanks for your time.