#Function calling : Which kind of types are available ?

23 messages · Page 1 of 1 (latest)

patent island
#

Please, can you provide the list of types for :

  • types of tool
  • types of function
  • types of parameters
  • types of properties

Merci 🙂

meager solstice
#

pretty much the same api as OAI functioncalling

patent island
meager solstice
#

its the interface what it specs ..

#

there are examples how to implement that in docs

#

and pretty much the OAI interface is the same

#

as you execute the functions local and the ai just returns you a singnature

#

you can pretty much do what you want

#

functions are not executed on mistral.ai nor are the executed on openai for oai functioncalling ..

you pretty much get a structure back and your script executes that

glossy nexus
#

For a more thorough list tool types, functions, parameters you can check tool_calls.py

patent island
#

I don't know the OAI interface so I can't compare and all the information has to be on your doc ^^'

#

I don't get it the thing about "you can pretty much do what you want". At the end, it the same between use function calling or include this functions on the prompt with an JSON response ?

#

(almost the same)

meager solstice
#

its a json response pretty much thats all the ai gives you back

glossy nexus
#

Function calling allows you to better define which tools are accessible and what kind of input they should expect. It is more effective than pure prompting, plus you can leverage specific message types that contain function call inputs in your execution workflow 🙂

#

The wording can be a bit confusing at first, but the gist of it is that:

  • you can define tools which are basically functions, each one has a name and accept one or more parameters as input
  • each function parameter is described by a set of properties: the name, the expected type and a description
  • when you pass a collection of tools to your message and send it to the model, it will pick the "right tool for the job" you described in your user message along with the proper inputs and return them to you in a well-formatted response
  • from there you can fetch the function name and parameters then execute the function
  • once you get your execution output you can inject it into the conversation with the model by creating a tool message
  • finally the model will deliver the output in the conversation
patent island
#

Thank you very much !!!
Multiple tools can be picked or only one by response ?

#

In my case, multiple functions can be the right tool and all this functions will be executed. So if yes, I can use it, if no, I have to prompt my functions

glossy nexus
#

For now it's one tool per response. Depending on your needs and what you are building, you can also find a way to enumerate the individual functions to use and leverage function calling in a sequential way.

patent island
#

I succeed to have two functions called 🙂

patent island
#

But it does'nt work everytime...