@@ -23,16 +23,16 @@ interface ConfigureAI {
23
23
messageFilter? : MessageFilter ;
24
24
selectAiModel: SelectAiModel ;
25
25
prepareSystemPrompt? : (ctx : AiContext , message : Message ) => Promise <string >;
26
- preparePrompt? : (
27
- ctx : AiContext ,
28
- message : Message ,
26
+ preparePrompt? : (
27
+ ctx : AiContext ,
28
+ message : Message ,
29
29
) => Promise <string | AiMessage >;
30
30
onProcessingStart? : (ctx : AiContext , message : Message ) => Promise <void >;
31
31
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 ,
36
36
) => Promise <void >;
37
37
onError? : (ctx : AiContext , message : Message , error : Error ) => Promise <void >;
38
38
}
@@ -49,24 +49,24 @@ Whether to disable the built-in tools. Default is false.
49
49
50
50
<MemberInfo kind = " property" type = { ` <a href='/docs/next/api-reference/ai/types/message-filter#messagefilter'>MessageFilter</a> ` } />
51
51
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.
53
53
CommandKit invokes this function before processing the message.
54
54
### selectAiModel
55
55
56
56
<MemberInfo kind = " property" type = { ` <a href='/docs/next/api-reference/ai/types/select-ai-model#selectaimodel'>SelectAiModel</a> ` } />
57
57
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.
59
59
This function should return a promise that resolves to an object containing the model and options.
60
60
### prepareSystemPrompt
61
61
62
62
<MemberInfo kind = " property" type = { ` (ctx: <a href='/docs/next/api-reference/ai/classes/ai-context#aicontext'>AiContext</a>, message: Message) => Promise<string> ` } />
63
63
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.
66
66
If not provided, a default system prompt will be used.
67
67
### preparePrompt
68
68
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>> ` } />
70
70
71
71
A function that prepares the prompt for the AI model.
72
72
### onProcessingStart
@@ -81,7 +81,7 @@ A function that gets called when the AI starts processing a message.
81
81
A function that gets called when the AI finishes processing a message.
82
82
### onResult
83
83
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> ` } />
85
85
86
86
A function that gets called upon receiving the result from the AI model.
87
87
### onError
0 commit comments