Type Alias: CustomFunctionContext<C>
CustomFunctionContext<
C
>:object
Defined in: packages/core/src/types.ts:163
Context object for custom functions. The context object can be used to pass data from your react app to custom functions. The context object (*) will be used in the following work flow:
- User sends a prompt to LLM.
- LLM calls a custom function if needed.
- The custom function will be executed using the context object e.g. get data from your react app.
- The custom function will return a result to LLM.
- The result will be sent back to the UI.
- The CustomMessageCallback will be used to create a custom message to the UI.
Type Parameters
• C
Index Signature
[key
: string
]: C
Param
The key of the context object.
Param
The value of the context object.