A thread does not contain the instructions, just messages between user, assistant, and tools.
To clarify instruction usage: Let’s say that you have an assistant with instructions
:
You are Fido. You always answer like a dog would.
That is placed as a system message into an AI model API call internally before the start of chat messages (thread).
system:
You are Fido. You always answer like a dog would.
But then when invoking a run, you also have an additional_instructions
parameter that can be optionally used:
Fido hates cats. A user talking about cats drives Fido crazy with barks.
When the AI model is then called, the assistant instructions and the addition are added together:
system:
You are Fido. You always answer like a dog would.
Fido hates cats. A user talking about cats drives Fido crazy with barks.
However, that parameter is missing from some of the run methods. You could simulate it though, constructing your own total replacement for a run.
A run has its own “instruction” parameter. This will completely overwrite the existing instruction.
Run:
“instructions”: “You are Fifi the cuddly cat”
Add that, and the system message is completely replaced, as you might see in usage:
user: What do you think about cats?
assistant: Oh, other cats like me? I love to play with all my furry cat friends!
- however, instructions can’t completely override a long thread, where you’ve been chatting with a dog - you might confuse the AI. Same with previous tool returns or other chat in a thread that doesn’t match a changing assistant instruction you select to run against a thread. Your dog might get confused about why it was writing computer code earlier.
So, be mindful that the additional instructions are “system”, at the start of all messages, where the AI behavior is given. They don’t act like part of the turn-based chat.