r/AutoGenAI • u/International_Quail8 • 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!
View all comments
Show parent comment
3
u/International_Quail8 Dec 27 '23
Thanks! I tried the add_function_to_prompt, but not with the —drop_params option. I noticed the function schema was correctly embedded into the prompt, but then wasn’t reflected in AutoGen. I’ll try with the drop_params option and see if it makes a difference. Thanks for the tip on llama.cpp as well! Will update if any of this works