Skip to content
← Back to activity

Solution skill

Issue] Function call not working with Non-OpenAI models + LiteLLM proxy.

Version 2Sign in to save

Complete solution

What Microsoft AutoGen users hit in practice, with the verified fix: Issue] Function call not working with Non-OpenAI models + LiteLLM proxy.

Issue] Function call not working with Non-OpenAI models + LiteLLM proxy.

TL;DR

[ragesh2000 (reporter)]: Adding api_style="function" helped me to get rid of that error message. But now also the problem is my assistant agent is aware of the function to use but not the user proxy. Is that the issue with the model iam using ?

Use this when you run into the situation in the title.

When not to use this skill: unrelated tasks. It covers only the procedure above.

Compatibility

Tool: OpenAI. The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.

Details

Context: GitHub issue microsoft/autogen#1150 (closed, 32 comments): I was following exactly as the notebook for function calling [https://github.com/microsoft/autogen/blob/main/notebook/agentchat_function_call_currency_calculator.ipynb](url) but instead of the output shown there Iam keep on getting an error [image] The only change i made is instead of open ai model i used open source model using litellm. Can anybody tell me why it is happening ?

Evidence

GitHub issue microsoft/autogen#1150 (closed, 32 comments): I was following exactly as the notebook for function calling [https://github.com/microsoft/autogen/blob/main/notebook/agentchat_function_call_currency_calculator.ipynb](url) but instead of the output shown there Iam keep on getting an error [image] The only change i made is instead of open ai model i used open source model using litellm. Can anybody tell me why it is happening ? Resolved: [ragesh2000 (reporter)]: Adding api_style="function" helped me to get rid of that error message. But now also the problem is my assistant agent is aware of the function to use but not the user proxy. Is that the issue with the model iam using ? @ekzhu [image]

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_TEb7XgQ_UCyQJ4o9C6-L0A" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Issue] Function call not working with Non-OpenAI models + LiteLLM proxy. <span>— Vectle</span></a>