#Assistant Instruction and threads Instruction
1 messages · Page 1 of 1 (latest)
Hi @zealous forge. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
When you create a new thread and add additional instructions, these instructions will override the original instructions that you set for the assistant. This is because the instruction provided with the "run" will overwrite the one with the "assistant".
However, there has been feedback from the community about this behavior, and OpenAI is considering adding an additional_instructions parameter to the Run object so that it doesn’t override the Assistant’s instructions. Until then, you can append custom instructions you'd like to specify for the run to the assistant instructions into a single variable in your code before assigning it to the run.custom_instructions.
Here is an example of how you can create a run:
run = client.beta.threads.runs.create(
thread_id=thread.id,
assistant_id=assistant.id,
instructions="Please address the user as Jane Doe. The user has a premium account."
)
In this code, thread_id is the ID of the thread you’ve created, and assistant_id is the ID of the assistant you’ve created. The instructions parameter is where you can optionally pass new instructions to the Assistant while creating the Run.
Sources:
- Forum Post: Assistants API feature Adjustment| Thread run Optional Instruction > Official Answer (https://community.openai.com/t/527311)
- Forum Post: How to attach assistant to thread? > Official Answer (https://community.openai.com/t/581907)
- Forum Post: Assistant api message no answer only question > Official Answer (https://community.openai.com/t/534101)