14 lines
845 B
Markdown
14 lines
845 B
Markdown
Demo 07 - Functions
|
|
===============================================
|
|
|
|
We will allow the LLM to call a function that you have defined in your code. The LLM will decide when and with
|
|
which parameters to call the function.
|
|
|
|
# Function calling
|
|
Function calling is a mechanism offered by some LLMs (GPTs, Llama…). It allows the LLM to call a function that
|
|
you have defined in your application. When the application sends the user message to the LLM, it also sends
|
|
the list of functions that the LLM can call.
|
|
|
|
Then the LLM can decide, if it wants, to call one of these functions with the parameters it wants.
|
|
The application receives the method invocation request and executes the function with the parameters provided by the LLM.
|
|
The result is sent back to the LLM, which can use it to continue the conversation, and compute the next message.
|