How can I save my response history with the Chat Completion step?

Hi

I am using a the Chat Completion step with OpenAI. How can I save the response? Will I need to store the response into a data structure?

Thank you!

Comments

  • Thanks again for using the Decisions Forums!

    You will need to store the chat history response as a data structure inside the Decisions platform in order to save the response and pull it for later. You can save the Chat Completion Response to an AiChatMessage Content attribute. This will store your response in Decisions so you can utilize the chat history for a later step. In addition, you will need to configure the "Message History" input on the Chat Completion step in order for the step to use your chat history. You can reference the user's chat history by using a "threadId". I used a Generate Guid step in order to create a unique identifer for each chat history completed by the user. Use a Fetch Entities step outside the Flow or before the Chat Completion step to pull the response for later.

    Chat Completion Step Config


    Database Structure Configuration


    Save Data To Database Structure



    Fetch Entities Result After Saving Response

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion