Hi - I’m trying to add multiple messages to a thread, but getting error and don’t see reference to it in the API docs. I thought it would be something like this:
const messagesResult = await openai.beta.threads.messages.create(
thread_id,
[
{ "role": "user", "content": "hello there"},
{ "role": "user", "content": "Hello there two"}
]
);
}
That’s similar to creating a thread. But i get a validation error doing the same on an existing thread. Is the only way to add multiple messages to a thread to iterate through and add one at a time? Or concatenate messages?
The use case is: adding a combination of previous messages to an existing thread.