Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: GPTAssistantAgent doesn't update instructions if openai_assistant_id is None and retrieve_assistants_by_name is invoked #952

Closed
lc0rp opened this issue Dec 12, 2023 · 4 comments

Comments

@lc0rp
Copy link

lc0rp commented Dec 12, 2023

Describe the bug

autogen/agentchat/contrib/gpt_assistant_agent.py lines 94+ which updates the instructions only gets run if an openai_assistant_id was passed in, but the changes in #718 introduce the ability to retrieve an assistant by name, if openai_assistant_id is None.

The agent retrieved_by_name will not get instructions updated even if overwrite_instructions=True.

@IANTHEREAL - possible fix is to outdent lines 89 to 105

Steps to reproduce

  1. Create an assistant with a known name and instructions via the playground or API.
    • name=Test
    • instructions=Old instructions
  2. Call GPTAssistantAgent(name="Test", instructions="New instructions", overwrite_instructions=True)
  3. The instructions will still be "Old instructions

Expected Behavior

One expects overwrite_instructions to be respected even if the agent is retrieved by name.

Screenshots and logs

No response

Additional Information

No response

@lc0rp lc0rp added the bug label Dec 12, 2023
@IANTHEREAL
Copy link
Collaborator

We shouldn't update assistant attributions while the assistant name is not unique in OpenAI. PR #925 is the first step to mitigate this issue

@afourney
Copy link
Member

@gagb for visibility

@gagb
Copy link
Collaborator

gagb commented Dec 16, 2023

@lc0rp, I agree with @IANTHEREAL -- the name field is not unique, and if you see @IANTHEREAL's PR he added a clarification for overwrite_instructions saying "This parameter is in effect only when assistant_id is specified in llm_config."

@gagb
Copy link
Collaborator

gagb commented Jan 29, 2024

This was addressed.

@gagb gagb closed this as completed Jan 29, 2024
whiskyboy pushed a commit to whiskyboy/autogen that referenced this issue Apr 17, 2024
Bumps [webpack](https://github.com/webpack/webpack) from 5.74.0 to 5.76.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](webpack/webpack@v5.74.0...v5.76.1)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Shaokun <shaokunzhang529@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants