#Inject chat history in new Thread for an Assistant

1 messages · Page 1 of 1 (latest)

fierce bone
#

I'm trying to inject some messages in the thread prior to the first interaction with the AI. From what I understand, and what I read in several posts, it should as easy as to add them to the messsages in the Thred before running a Run.
In my scenario the previous message is supposed to have been sent by the assistant. However, when I ask the assistant what was the last thing it said, it says it doesn't have any conversation history.
The message is included like this:

{
  role: 'assistant',
  content: 'Hi user, I'm alive and here to help you.'
}

Even when I check the thread from the dashboard I can see these messages (in this order):

  1. [Assistant] a context message I provided
  2. [Assistant] another context/instruction message I provided
  3. [Assistant] The message I injected
  4. [User] "Hi, what was the last thing you said?" (The message asking what was the last thing it said)
  5. Run instructions
  6. Finally, the response saying he doesn't have any registry of any previous conversation

What am I doing wrong? Does this work differently with assistants? Because many people indicated this worked for chat completions.