@sqlrooms/ai / createAiSlice
Function: createAiSlice()
createAiSlice<
PC
>(__namedParameters
):StateCreator
<AiSliceState
>
Type Parameters
Type Parameter |
---|
PC extends object & object |
Parameters
Parameter | Type | Description |
---|---|---|
__namedParameters | { getApiKey : (modelProvider ) => string ; initialAnalysisPrompt : string ; customTools : Record <string , AiSliceTool >; getInstructions : (tablesSchema ) => string ; } | - |
__namedParameters.getApiKey | (modelProvider ) => string | - |
__namedParameters.initialAnalysisPrompt ? | string | - |
__namedParameters.customTools ? | Record <string , AiSliceTool > | - |
__namedParameters.getInstructions ? | (tablesSchema ) => string | Function to get custom instructions for the AI assistant |
Returns
StateCreator
<AiSliceState
>