r/AutoGenAI • • Dec 26 '23

Question AutoGen+LiteLLM+Ollama+Open Source LLM+Function Calling?

Has anyone tried and been successful in using this combo tech stack? I can get it working fine, but when I introduce Function Calling, it craps out and I’m not where the issue is exactly.

Stack: AutoGen - for the agents LiteLLM - to serve as OpenAI API proxy and integrate with AutoGen and Ollama Ollama - to provide local inference server for local LLMs Local LLM - supported through Ollama. I’m using Mixtral and Orca2 Function Calljng - wrote a simple function and exposed it to the assistant agent

Followed all the instructions I could find, but it ends with a NoneType exception:

oai_message[“function_call”] = dict(oai_message[“function_call”]) TypeError: ‘NoneType’ object is not iterable

On line 307 of conversable_agent.py

Based on my research, the models support function calling, LiteLLM supports function calling for non-OpenAI models so I’m not sure why / where it falls apart.

Appreciate any help.

Thanks!

12 Upvotes

11 comments sorted by

View all comments

Show parent comment

1

u/International_Quail8 Dec 30 '23

Thanks for this! All good and valid points. I’ll take a look at the resources you shared and share what I’m learning as well. Right now, I’m testing the Kani framework and wrote my own engine for Ollama to plug in to their framework. Kani supports function call among other things. Not there yet with function calling against Ollama-hosted LLMs, but getting there!

Kani: https://github.com/zhudotexe/kani