Open antonioalegria opened 1 month ago
Workaround. Set the description field myself with the value of the OpenAI instructions:
agent1 = GPTAssistantAgent(
name = "agent",
llm_config = {
"config_list": config_list,
},
assistant_config={
"assistant_id": "asst_xxxx"
}
)
agent1.description = agent1._openai_assistant.instructions # <<< Added this
agent2 = GPTAssistantAgent(
name = "agent2",
llm_config = {
"config_list": config_list,
},
assistant_config={
"assistant_id": "asst_yyyy"
}
)
agent2.description = agent2._openai_assistant.instructions # <<< Added this
please give some instructions like this
" Create two agents with the required configurations" agent1 = GPTAssistantAgent( instructions = """ As 'weather reporter' your primary role is to information about weather """, name="agent", llm_config={ "config_list": config_list, }, assistant_config={
}
)
agent2 = GPTAssistantAgent( instructions = """ As 'weather reporter' your primary role is to information about weather """, name="agent2", llm_config={ "config_list": config_list, }, assistant_config={
}
)
Describe the bug
When using GPTAssistantAgent for a previously created OpenAI assistant, without passing any
instructions
,description
ofsystem_message
, the following error is thrown when initializing the chat:After debugging it seems the problem is that the instructions from the OpenAI Assistant are only fetched after initializing the description and system_message. When the instructions are fetched and set, the code doesn't check the description and system_message to fill them in with the instructions.
Steps to reproduce