The input type for this method. This will be generated by the LLM.
The output type for this method. This will be interpreted by the LLM.
Optional description?: stringThis description can be used to describe the method. This can be read by the LLM.
The async function that handles the method call. It takes an input of type Input
and returns a value of type Output or a Promise that resolves to Output.
This Schema defines the input type. It can be a simple type like number or string,
or it can be a complex type like an object or an array. Nested objects and arrays are also supported.
The expectation is that this methods input will be generated by a LLM. The LLM will generate the input based on the input definition.
Optional keywords?: string[]A number of keywords that describe the method. This can be used by the LLM to filter methods.
Optional output?: Schema<Output>This Schema defines the output type. It can be a simple type like number or string,
or it can be a complex type like an object or an array. Nested objects and arrays are also supported.
Private Optional _descriptionPrivate _handlerPrivate _inputPrivate Optional _keywordsPrivate Optional _outputGenerated using TypeDoc
This is the definition of a method that can be called by the LLM. The input and output are defined by a Schema. The handler is an async function that takes the input and returns the output. Methods can be added to a Service. The services can be added to a Chat.
Example
Here's a simple example:
Example
Here's a more complex example: