Implement a function, not functions
This commit is contained in:
committed by
Christian Tzolov
parent
9e865f0b0f
commit
6b9f8d3ac9
@@ -9,7 +9,7 @@ The OpenAI API does not call the function directly; instead, the model generates
|
||||
Spring AI provides flexible and user-friendly ways to register and call custom functions.
|
||||
In general, the custom functions need to provide a function `name`, `description`, and the function call `signature` (as JSON schema) to let the model know what arguments the function expects. The `description` helps the model to understand when to call the function.
|
||||
|
||||
As a developer, you need to implement a functions that takes the function call arguments sent from the AI model, and respond with the result back to the model. Your function can in turn invoke other 3rd party services to provide the results.
|
||||
As a developer, you need to implement a function that takes the function call arguments sent from the AI model, and respond with the result back to the model. Your function can in turn invoke other 3rd party services to provide the results.
|
||||
|
||||
Spring AI makes this as easy as defining a `@Bean` definition that returns a `java.util.Function` and supplying the bean name as an option when invoking the `ChatClient`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user