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

[Feature Request]: Add support and tests for both function calling and tools calling #1206

Closed
davorrunje opened this issue Jan 11, 2024 · 2 comments
Assignees
Labels
0.2 Issues which are related to the pre 0.4 codebase

Comments

@davorrunje
Copy link
Contributor

Is your feature request related to a problem? Please describe.

OpenAI is deprecating function calling, but other models still use old OpenAI-compatible API and it is expected that will stay that way for some time.

Describe the solution you'd like

We could add an option in the function decorator register_for_llm, with the default value generating tools calling requests and an option to support old-style function calling requests:

@agent.register_for_llm(api_style="function_calling")
def f(a: int):
  ...

Apart from decorators, we would need to make sure we support both styles everywhere else.

Additional context

No response

@davorrunje davorrunje self-assigned this Jan 11, 2024
@ekzhu
Copy link
Collaborator

ekzhu commented Jan 11, 2024

I wonder if we can detect the underlying model being used and just do the dirty work for the users. Like, have a dictionary somewhere with the correct syntax for each model name.

ekzhu added a commit that referenced this issue Jan 13, 2024
github-merge-queue bot pushed a commit that referenced this issue Jan 13, 2024
…emini) (#1227)

* #1206

* doc

* add test for azure openai

* prior to

* filter for versions

* up to

* literal type

* update doc
github-merge-queue bot pushed a commit that referenced this issue Jan 16, 2024
* #1206

* doc

* add test for azure openai

* prior to

* filter for versions

* up to

* literal type

* update doc

* update doc

* update model list

* Update autogen/agentchat/conversable_agent.py

Co-authored-by: Chi Wang <[email protected]>

* Update test/agentchat/test_tool_calls.py

Co-authored-by: Chi Wang <[email protected]>

* Update test_tool_calls.py

---------

Co-authored-by: Chi Wang <[email protected]>
joshkyh pushed a commit that referenced this issue Jan 17, 2024
…emini) (#1227)

* #1206

* doc

* add test for azure openai

* prior to

* filter for versions

* up to

* literal type

* update doc
joshkyh pushed a commit that referenced this issue Jan 17, 2024
* #1206

* doc

* add test for azure openai

* prior to

* filter for versions

* up to

* literal type

* update doc

* update doc

* update model list

* Update autogen/agentchat/conversable_agent.py

Co-authored-by: Chi Wang <[email protected]>

* Update test/agentchat/test_tool_calls.py

Co-authored-by: Chi Wang <[email protected]>

* Update test_tool_calls.py

---------

Co-authored-by: Chi Wang <[email protected]>
whiskyboy pushed a commit to whiskyboy/autogen that referenced this issue Apr 17, 2024
* suffix in model name

* bump version to 2.0.3
whiskyboy pushed a commit to whiskyboy/autogen that referenced this issue Apr 17, 2024
…emini) (microsoft#1227)

* microsoft#1206

* doc

* add test for azure openai

* prior to

* filter for versions

* up to

* literal type

* update doc
whiskyboy pushed a commit to whiskyboy/autogen that referenced this issue Apr 17, 2024
…t#1237)

* microsoft#1206

* doc

* add test for azure openai

* prior to

* filter for versions

* up to

* literal type

* update doc

* update doc

* update model list

* Update autogen/agentchat/conversable_agent.py

Co-authored-by: Chi Wang <[email protected]>

* Update test/agentchat/test_tool_calls.py

Co-authored-by: Chi Wang <[email protected]>

* Update test_tool_calls.py

---------

Co-authored-by: Chi Wang <[email protected]>
@rysweet rysweet added 0.2 Issues which are related to the pre 0.4 codebase needs-triage labels Oct 2, 2024
@rysweet
Copy link
Collaborator

rysweet commented Oct 18, 2024

this works correctly now

@rysweet rysweet closed this as completed Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.2 Issues which are related to the pre 0.4 codebase
Projects
None yet
Development

No branches or pull requests

3 participants