Find answers from the community

Updated last year

Function calling

Is there another example (more complex) on function calling with OpenAi?
I only found this : https://gpt-index.readthedocs.io/en/stable/examples/llm/openai.html#function-calling
L
F
6 comments
What would be more complex? I feel like that example tells your everything you'd want to know?
Like, making the model decide weather it needs to call the funcion or only give a response. (From what the user sends as a prompt)
That example already does that πŸ‘

For example, if you just send "Hello!" instead, it won't call the function
This is exactly how the OpenAIAgent works too
Ok!! Do you recomend using OpenAIAgent with context if i am trying to make some function calling depending on the input prompt?
the with-context version uses extra information from an index to help pick which tool to use. tbh I think the base OpenAIAgent is good enough in most cases, but it depends πŸ™‚
Add a reply
Sign up and join the conversation on Discord