@@ -23,16 +23,16 @@ interface ConfigureAI {
2323 messageFilter? : MessageFilter ;
2424 selectAiModel: SelectAiModel ;
2525 prepareSystemPrompt? : (ctx : AiContext , message : Message ) => Promise <string >;
26- preparePrompt? : (
27- ctx : AiContext ,
28- message : Message ,
26+ preparePrompt? : (
27+ ctx : AiContext ,
28+ message : Message ,
2929 ) => Promise <string | AiMessage >;
3030 onProcessingStart? : (ctx : AiContext , message : Message ) => Promise <void >;
3131 onProcessingFinish? : (ctx : AiContext , message : Message ) => Promise <void >;
32- onResult? : (
33- ctx : AiContext ,
34- message : Message ,
35- result : AIGenerateResult ,
32+ onResult? : (
33+ ctx : AiContext ,
34+ message : Message ,
35+ result : AIGenerateResult ,
3636 ) => Promise <void >;
3737 onError? : (ctx : AiContext , message : Message , error : Error ) => Promise <void >;
3838}
@@ -49,24 +49,24 @@ Whether to disable the built-in tools. Default is false.
4949
5050<MemberInfo kind = " property" type = { ` <a href='/docs/next/api-reference/ai/types/message-filter#messagefilter'>MessageFilter</a> ` } />
5151
52- A filter function that determines whether a message should be processed by the AI.
52+ A filter function that determines whether a message should be processed by the AI.
5353CommandKit invokes this function before processing the message.
5454### selectAiModel
5555
5656<MemberInfo kind = " property" type = { ` <a href='/docs/next/api-reference/ai/types/select-ai-model#selectaimodel'>SelectAiModel</a> ` } />
5757
58- A function that selects the AI model to use based on the message.
58+ A function that selects the AI model to use based on the message.
5959This function should return a promise that resolves to an object containing the model and options.
6060### prepareSystemPrompt
6161
6262<MemberInfo kind = " property" type = { ` (ctx: <a href='/docs/next/api-reference/ai/classes/ai-context#aicontext'>AiContext</a>, message: Message) => Promise<string> ` } />
6363
64- A function that generates a system prompt based on the message.
65- This function should return a promise that resolves to a string containing the system prompt.
64+ A function that generates a system prompt based on the message.
65+ This function should return a promise that resolves to a string containing the system prompt.
6666If not provided, a default system prompt will be used.
6767### preparePrompt
6868
69- <MemberInfo kind = " property" type = { ` ( ctx: <a href='/docs/next/api-reference/ai/classes/ai-context#aicontext'>AiContext</a>, message: Message, ) => Promise<string | <a href='/docs/next/api-reference/ai/types/ai-message#aimessage'>AiMessage</a>> ` } />
69+ <MemberInfo kind = " property" type = { ` ( ctx: <a href='/docs/next/api-reference/ai/classes/ai-context#aicontext'>AiContext</a>, message: Message, ) => Promise<string | <a href='/docs/next/api-reference/ai/types/ai-message#aimessage'>AiMessage</a>> ` } />
7070
7171A function that prepares the prompt for the AI model.
7272### onProcessingStart
@@ -81,7 +81,7 @@ A function that gets called when the AI starts processing a message.
8181A function that gets called when the AI finishes processing a message.
8282### onResult
8383
84- <MemberInfo kind = " property" type = { ` ( ctx: <a href='/docs/next/api-reference/ai/classes/ai-context#aicontext'>AiContext</a>, message: Message, result: <a href='/docs/next/api-reference/ai/types/aigenerate-result#aigenerateresult'>AIGenerateResult</a>, ) => Promise<void> ` } />
84+ <MemberInfo kind = " property" type = { ` ( ctx: <a href='/docs/next/api-reference/ai/classes/ai-context#aicontext'>AiContext</a>, message: Message, result: <a href='/docs/next/api-reference/ai/types/aigenerate-result#aigenerateresult'>AIGenerateResult</a>, ) => Promise<void> ` } />
8585
8686A function that gets called upon receiving the result from the AI model.
8787### onError
0 commit comments