File tree Expand file tree Collapse file tree 2 files changed +3
-15
lines changed
src/Documents/Operations/AI/Agents Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export class AddOrUpdateAiAgentOperation implements IMaintenanceOperation<AiAgen
2525 throwError ( "InvalidArgumentException" , "configuration cannot be null or undefined." ) ;
2626 }
2727
28- if ( ! configuration . outputSchema && ! configuration . sampleObject && ! sampleObject ) {
28+ if ( hasNoSampleObjectAndSchema ( configuration ) && ! sampleObject ) {
2929 throwError ( "InvalidArgumentException" , "Please provide a non-empty value for either outputSchema or sampleObject." ) ;
3030 }
3131 this . _configuration = configuration ;
@@ -93,12 +93,7 @@ class AddOrUpdateAiAgentCommand extends RavenCommand<AiAgentConfigurationResult>
9393 if ( ! bodyStream ) {
9494 this . _throwInvalidResponse ( ) ;
9595 }
96- let body = "" ;
97- const data = await this . _defaultPipeline < any > ( _ => body = _ ) . process ( bodyStream ) ;
98- this . result = {
99- identifier : data ?. Identifier ?? data ?. identifier ,
100- raftCommandIndex : data ?. RaftCommandIndex ?? data ?. raftCommandIndex
101- } as AiAgentConfigurationResult ;
102- return body ;
96+
97+ return this . _parseResponseDefaultAsync ( bodyStream ) ;
10398 }
10499}
Original file line number Diff line number Diff line change 11export interface AiAgentChatTrimmingConfiguration {
22 tokens ?: AiAgentSummarizationByTokens ;
3- // Note: truncate is internal in C#, we keep it optional for completeness
4- truncate ?: AiAgentTruncateChat ;
53 history ?: AiAgentHistoryConfiguration ;
64}
75
@@ -13,11 +11,6 @@ export interface AiAgentSummarizationByTokens {
1311 maxTokensAfterSummarization ?: number ;
1412}
1513
16- export interface AiAgentTruncateChat {
17- messagesLengthBeforeTruncate ?: number ; // default 500 in C#
18- messagesLengthAfterTruncate ?: number ; // default 250 in C#
19- }
20-
2114export interface AiAgentHistoryConfiguration {
2215 historyExpirationInSec ?: number ;
2316}
You can’t perform that action at this time.
0 commit comments