@squidcloud/client 1.0.419 → 1.0.421
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/internal-common/src/public-types/ai-agent-integrations.public-types.d.ts +16 -0
- package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +133 -1
- package/dist/internal-common/src/public-types/ai-assistant.public-types.d.ts +7 -2
- package/dist/internal-common/src/public-types/ai-common.public-types.d.ts +3 -3
- package/dist/internal-common/src/public-types/ai-knowledge-base.public-types.d.ts +42 -0
- package/dist/internal-common/src/public-types/ai-matchmaking.public-types.d.ts +112 -0
- package/dist/internal-common/src/public-utils/id-utils.d.ts +3 -1
- package/dist/typescript-client/src/ai-client.d.ts +2 -2
- package/dist/typescript-client/src/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -17,3 +17,19 @@ export interface AiAgentDatabaseIntegrationOptions {
|
|
|
17
17
|
/** If provided, this agent will be used to generate the query. */
|
|
18
18
|
generateQueryAgentId?: AiAgentId;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Configuration options for AI agent API integration.
|
|
22
|
+
*/
|
|
23
|
+
export interface AiAgentApiIntegrationOptions {
|
|
24
|
+
/**
|
|
25
|
+
* A list of API operation IDs (endpoint IDs) that the AI agent can call.
|
|
26
|
+
*
|
|
27
|
+
* When this list is not provided (i.e., it is `undefined`) or is empty,
|
|
28
|
+
* the AI agent has access to all operations.
|
|
29
|
+
*/
|
|
30
|
+
operationsToUse?: string[];
|
|
31
|
+
/** If true, provides more detailed status updates during API call execution. Default: false. */
|
|
32
|
+
verboseStatusUpdates?: boolean;
|
|
33
|
+
/** If provided, this agent will be used to generate API calls. */
|
|
34
|
+
generateApiCallAgentId?: AiAgentId;
|
|
35
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JSONSchema } from 'json-schema-typed';
|
|
1
2
|
import { AiAudioCreateSpeechModelName, AiAudioTranscriptionModelName, AiChatModelName, AiEmbeddingsModelName, AiImageModelName, AiProviderType, AiRerankProvider, AnthropicChatModelName, GeminiChatModelName, GrokChatModelName, OpenAiAudioCreateSpeechModelName, OpenAiAudioTranscriptionModelName, OpenAiChatModelName, OpenAiCreateSpeechFormat } from './ai-common.public-types';
|
|
2
3
|
import { AiContextMetadata, AiContextMetadataFilter, AiKnowledgeBaseContextType, AiRagType } from './ai-knowledge-base.public-types';
|
|
3
4
|
import { AiFunctionId, AiFunctionIdWithContext, UserAiChatModelName } from './backend.public-types';
|
|
@@ -146,9 +147,76 @@ export interface StableDiffusionCoreOptions extends BaseAiGenerateImageOptions {
|
|
|
146
147
|
*/
|
|
147
148
|
export type ApiKeySource = 'user' | 'system';
|
|
148
149
|
/**
|
|
150
|
+
* Structured output format configuration for AI models that support schema-constrained responses.
|
|
151
|
+
*
|
|
152
|
+
* When used with supported Anthropic models (claude-sonnet-4-5-20250929, claude-opus-4-1-20250805),
|
|
153
|
+
* this guarantees that responses will strictly conform to the provided JSON schema through
|
|
154
|
+
* constrained decoding - the model cannot generate tokens that violate the schema.
|
|
155
|
+
*
|
|
156
|
+
* **Example:**
|
|
157
|
+
* ```typescript
|
|
158
|
+
* {
|
|
159
|
+
* type: 'json_schema',
|
|
160
|
+
* schema: {
|
|
161
|
+
* type: 'object',
|
|
162
|
+
* properties: {
|
|
163
|
+
* name: { type: 'string' },
|
|
164
|
+
* age: { type: 'number' }
|
|
165
|
+
* },
|
|
166
|
+
* required: ['name', 'age'],
|
|
167
|
+
* additionalProperties: false
|
|
168
|
+
* }
|
|
169
|
+
* }
|
|
170
|
+
* ```
|
|
171
|
+
*
|
|
172
|
+
* @see https://docs.anthropic.com/en/docs/build-with-claude/structured-outputs
|
|
149
173
|
* @category AI
|
|
150
174
|
*/
|
|
151
|
-
export
|
|
175
|
+
export interface AiStructuredOutputFormat {
|
|
176
|
+
/**
|
|
177
|
+
* The type of structured output.
|
|
178
|
+
* Currently only 'json_schema' is supported by Anthropic models.
|
|
179
|
+
*/
|
|
180
|
+
type: 'json_schema';
|
|
181
|
+
/**
|
|
182
|
+
* The JSON schema that the AI response must strictly conform to.
|
|
183
|
+
* Uses constrained decoding to guarantee schema compliance.
|
|
184
|
+
*/
|
|
185
|
+
schema: JSONSchema;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Response format for AI agent responses.
|
|
189
|
+
*
|
|
190
|
+
* **Available formats:**
|
|
191
|
+
* - `'text'`: Plain text response (default) - standard conversational output
|
|
192
|
+
* - `'json_object'`: JSON response - model attempts to return valid JSON, but without strict schema validation
|
|
193
|
+
* - `AiStructuredOutputFormat`: Structured output with schema (Anthropic only) - guarantees JSON conforms exactly to provided schema
|
|
194
|
+
*
|
|
195
|
+
* **Structured outputs (Anthropic-specific):**
|
|
196
|
+
* For Anthropic models that support structured outputs, you can pass an object with `type: 'json_schema'`
|
|
197
|
+
* and a JSON schema. This uses constrained decoding to guarantee the response matches your schema perfectly,
|
|
198
|
+
* eliminating parsing errors and validation issues.
|
|
199
|
+
*
|
|
200
|
+
* **Example with structured output:**
|
|
201
|
+
* ```typescript
|
|
202
|
+
* {
|
|
203
|
+
* responseFormat: {
|
|
204
|
+
* type: 'json_schema',
|
|
205
|
+
* schema: {
|
|
206
|
+
* type: 'object',
|
|
207
|
+
* properties: {
|
|
208
|
+
* sentiment: { type: 'string', enum: ['positive', 'negative', 'neutral'] },
|
|
209
|
+
* confidence: { type: 'number', minimum: 0, maximum: 1 }
|
|
210
|
+
* },
|
|
211
|
+
* required: ['sentiment', 'confidence']
|
|
212
|
+
* }
|
|
213
|
+
* }
|
|
214
|
+
* }
|
|
215
|
+
* ```
|
|
216
|
+
*
|
|
217
|
+
* @category AI
|
|
218
|
+
*/
|
|
219
|
+
export type AiAgentResponseFormat = 'text' | 'json_object' | AiStructuredOutputFormat;
|
|
152
220
|
/**
|
|
153
221
|
* @category AI
|
|
154
222
|
*/
|
|
@@ -429,6 +497,32 @@ export type AiReasoningEffort = 'minimal' | 'low' | 'medium' | 'high';
|
|
|
429
497
|
export type AiVerbosityLevel = 'low' | 'medium' | 'high';
|
|
430
498
|
/**
|
|
431
499
|
* Chat options specific to Anthropic models, extending base options.
|
|
500
|
+
*
|
|
501
|
+
* **Structured Outputs:**
|
|
502
|
+
* Anthropic models (claude-sonnet-4-5-20250929, claude-opus-4-1-20250805) support structured outputs
|
|
503
|
+
* through the `responseFormat` field. Pass an object with `type: 'json_schema'` and a JSON schema
|
|
504
|
+
* to guarantee the response conforms exactly to your schema.
|
|
505
|
+
*
|
|
506
|
+
* **Example:**
|
|
507
|
+
* ```typescript
|
|
508
|
+
* {
|
|
509
|
+
* model: 'claude-sonnet-4-5-20250929',
|
|
510
|
+
* responseFormat: {
|
|
511
|
+
* type: 'json_schema',
|
|
512
|
+
* schema: {
|
|
513
|
+
* type: 'object',
|
|
514
|
+
* properties: {
|
|
515
|
+
* name: { type: 'string' },
|
|
516
|
+
* age: { type: 'number' }
|
|
517
|
+
* },
|
|
518
|
+
* required: ['name', 'age'],
|
|
519
|
+
* additionalProperties: false
|
|
520
|
+
* }
|
|
521
|
+
* }
|
|
522
|
+
* }
|
|
523
|
+
* ```
|
|
524
|
+
*
|
|
525
|
+
* @see https://docs.anthropic.com/en/docs/build-with-claude/structured-outputs
|
|
432
526
|
* @category AI
|
|
433
527
|
*/
|
|
434
528
|
export interface AnthropicChatOptions extends BaseAiChatOptions {
|
|
@@ -764,4 +858,42 @@ export type AiSessionContext = {
|
|
|
764
858
|
/** The ID of the job associated with the session. */
|
|
765
859
|
jobId: JobId;
|
|
766
860
|
};
|
|
861
|
+
/**
|
|
862
|
+
* API request to delete an AI agent
|
|
863
|
+
* @category AI
|
|
864
|
+
*/
|
|
865
|
+
export interface DeleteAgentRequest {
|
|
866
|
+
/** The ID of the agent to delete */
|
|
867
|
+
agentId: string;
|
|
868
|
+
}
|
|
869
|
+
/**
|
|
870
|
+
* API response from agent ask methods
|
|
871
|
+
* @category AI
|
|
872
|
+
*/
|
|
873
|
+
export interface AiAskResponse {
|
|
874
|
+
/** The response string from the agent */
|
|
875
|
+
responseString: string;
|
|
876
|
+
/** Optional annotations (e.g., file references) in the response */
|
|
877
|
+
annotations?: Record<string, AiAnnotation>;
|
|
878
|
+
}
|
|
879
|
+
/**
|
|
880
|
+
* API request to create speech from text
|
|
881
|
+
* @category AI
|
|
882
|
+
*/
|
|
883
|
+
export interface AiAudioCreateSpeechRequest {
|
|
884
|
+
/** The text input to convert to speech */
|
|
885
|
+
input: string;
|
|
886
|
+
/** Options for speech generation */
|
|
887
|
+
options: AiAudioCreateSpeechOptions;
|
|
888
|
+
}
|
|
889
|
+
/**
|
|
890
|
+
* API request to generate an image
|
|
891
|
+
* @category AI
|
|
892
|
+
*/
|
|
893
|
+
export interface AiGenerateImageRequest {
|
|
894
|
+
/** The prompt describing the image to generate */
|
|
895
|
+
prompt: string;
|
|
896
|
+
/** Options for image generation */
|
|
897
|
+
options?: AiGenerateImageOptions;
|
|
898
|
+
}
|
|
767
899
|
export {};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AiReasoningEffort } from './ai-agent.public-types';
|
|
2
2
|
import { OpenAiChatModelName } from './ai-common.public-types';
|
|
3
3
|
import { AiFunctionId } from './backend.public-types';
|
|
4
|
+
/**
|
|
5
|
+
* Response format for AI assistant responses.
|
|
6
|
+
* @category AI
|
|
7
|
+
*/
|
|
8
|
+
export type AiAssistantResponseFormat = 'text' | 'json_object';
|
|
4
9
|
/**
|
|
5
10
|
* The type of assistant tool.
|
|
6
11
|
* @category AI
|
|
@@ -16,7 +21,7 @@ export interface QueryAssistantOptions {
|
|
|
16
21
|
/** Specific context provided per AI function, keyed by function ID. */
|
|
17
22
|
functionContexts?: Record<AiFunctionId, Record<string, unknown>>;
|
|
18
23
|
/** The desired format of the AI model's response; defaults to 'text'. */
|
|
19
|
-
responseFormat?:
|
|
24
|
+
responseFormat?: AiAssistantResponseFormat;
|
|
20
25
|
/** The OpenAI chat model to use for the assistant, if specified. */
|
|
21
26
|
model?: OpenAiChatModelName;
|
|
22
27
|
/** The level of reasoning effort to apply, as defined by OpenAI. */
|
|
@@ -36,16 +36,16 @@ export declare const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-2.5-pro", "gemin
|
|
|
36
36
|
*
|
|
37
37
|
* @category AI
|
|
38
38
|
*/
|
|
39
|
-
export declare const GROK_CHAT_MODEL_NAMES: readonly ["grok-3", "grok-3-fast", "grok-3-mini", "grok-3-mini-fast", "grok-4", "grok-4-fast-reasoning", "grok-4-fast-non-reasoning"];
|
|
39
|
+
export declare const GROK_CHAT_MODEL_NAMES: readonly ["grok-3", "grok-3-fast", "grok-3-mini", "grok-3-mini-fast", "grok-4", "grok-4-fast-reasoning", "grok-4-fast-non-reasoning", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
|
|
40
40
|
/**
|
|
41
41
|
* @category AI
|
|
42
42
|
*/
|
|
43
|
-
export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-3-7-sonnet-latest", "claude-haiku-4-5-20251001", "claude-opus-4-20250514", "claude-opus-4-1-20250805", "claude-sonnet-4-20250514", "claude-sonnet-4-5-20250929"];
|
|
43
|
+
export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-3-7-sonnet-latest", "claude-haiku-4-5-20251001", "claude-opus-4-20250514", "claude-opus-4-1-20250805", "claude-opus-4-5-20251101", "claude-sonnet-4-20250514", "claude-sonnet-4-5-20250929"];
|
|
44
44
|
/**
|
|
45
45
|
* The supported AI model names.
|
|
46
46
|
* @category AI
|
|
47
47
|
*/
|
|
48
|
-
export declare const VENDOR_AI_CHAT_MODEL_NAMES: readonly ["o1", "o3", "o3-mini", "o4-mini", "gpt-5", "gpt-5-mini", "gpt-5-nano", "gpt-5.1", "gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano", "gpt-4o", "gpt-4o-mini", "claude-3-7-sonnet-latest", "claude-haiku-4-5-20251001", "claude-opus-4-20250514", "claude-opus-4-1-20250805", "claude-sonnet-4-20250514", "claude-sonnet-4-5-20250929", "gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.5-flash-lite", "grok-3", "grok-3-fast", "grok-3-mini", "grok-3-mini-fast", "grok-4", "grok-4-fast-reasoning", "grok-4-fast-non-reasoning"];
|
|
48
|
+
export declare const VENDOR_AI_CHAT_MODEL_NAMES: readonly ["o1", "o3", "o3-mini", "o4-mini", "gpt-5", "gpt-5-mini", "gpt-5-nano", "gpt-5.1", "gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano", "gpt-4o", "gpt-4o-mini", "claude-3-7-sonnet-latest", "claude-haiku-4-5-20251001", "claude-opus-4-20250514", "claude-opus-4-1-20250805", "claude-opus-4-5-20251101", "claude-sonnet-4-20250514", "claude-sonnet-4-5-20250929", "gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.5-flash-lite", "grok-3", "grok-3-fast", "grok-3-mini", "grok-3-mini-fast", "grok-4", "grok-4-fast-reasoning", "grok-4-fast-non-reasoning", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
|
|
49
49
|
/**
|
|
50
50
|
* Check if the given model name is a global AI chat model name.
|
|
51
51
|
*/
|
|
@@ -386,4 +386,46 @@ export type AiKnowledgeBaseWithOptionalChatModel = Omit<AiKnowledgeBase, 'chatMo
|
|
|
386
386
|
chatModel?: AiKnowledgeBase['chatModel'];
|
|
387
387
|
name?: string;
|
|
388
388
|
};
|
|
389
|
+
/**
|
|
390
|
+
* API request for deleting an AiKnowledgeBase
|
|
391
|
+
* @category AI
|
|
392
|
+
*/
|
|
393
|
+
export interface DeleteAiKnowledgeBaseRequest {
|
|
394
|
+
/** The id of the AiKnowledgeBase */
|
|
395
|
+
id: string;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* API request for upserting an AiKnowledgeBase
|
|
399
|
+
* @category AI
|
|
400
|
+
*/
|
|
401
|
+
export interface UpsertAiKnowledgeBaseRequest {
|
|
402
|
+
/** The AiKnowledgeBase to upsert */
|
|
403
|
+
knowledgeBase: Omit<AiKnowledgeBaseWithOptionalChatModel, 'appId' | 'updatedAt'>;
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* API request for deleting AiKnowledgeBaseContexts
|
|
407
|
+
* @category AI
|
|
408
|
+
*/
|
|
409
|
+
export interface DeleteAiKnowledgeBaseContextsRequest {
|
|
410
|
+
/** The id of the AiKnowledgeBase */
|
|
411
|
+
knowledgeBaseId: string;
|
|
412
|
+
/** An array of AiKnowledgeBaseContext ids */
|
|
413
|
+
contextIds: Array<string>;
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* API response to list AiKnowledgeBaseContexts
|
|
417
|
+
* @category AI
|
|
418
|
+
*/
|
|
419
|
+
export interface ListAiKnowledgeBaseContextsResponse {
|
|
420
|
+
/** The list of AiKnowledgeBaseContexts */
|
|
421
|
+
contexts: Array<AiKnowledgeBaseContext>;
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* API response for searching an AiKnowledgeBase
|
|
425
|
+
* @category AI
|
|
426
|
+
*/
|
|
427
|
+
export interface AiKnowledgeBaseSearchResponse {
|
|
428
|
+
/** Array of result chunks from the search */
|
|
429
|
+
chunks: Array<AiKnowledgeBaseSearchResultChunk>;
|
|
430
|
+
}
|
|
389
431
|
export {};
|
|
@@ -72,3 +72,115 @@ export interface MmListEntitiesOptions {
|
|
|
72
72
|
/** The maximum number of entities to return; defaults to 100. */
|
|
73
73
|
limit?: number;
|
|
74
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* API request to delete a matchmaker
|
|
77
|
+
* @category AI
|
|
78
|
+
*/
|
|
79
|
+
export interface MmDeleteMatchMakerRequest {
|
|
80
|
+
/** The ID of the matchmaker to delete */
|
|
81
|
+
matchMakerId: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* API response for getting a matchmaker
|
|
85
|
+
* @category AI
|
|
86
|
+
*/
|
|
87
|
+
export interface MmGetMatchMakerResponse {
|
|
88
|
+
/** The matchmaker, if found */
|
|
89
|
+
matchMaker: MmMatchMaker | undefined;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* API request to delete an entity
|
|
93
|
+
* @category AI
|
|
94
|
+
*/
|
|
95
|
+
export interface MmDeleteEntityRequest {
|
|
96
|
+
/** The ID of the matchmaker */
|
|
97
|
+
matchMakerId: string;
|
|
98
|
+
/** The ID of the entity to delete */
|
|
99
|
+
entityId: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* API request to insert multiple entities
|
|
103
|
+
* @category AI
|
|
104
|
+
*/
|
|
105
|
+
export interface MmInsertEntitiesRequest {
|
|
106
|
+
/** The ID of the matchmaker */
|
|
107
|
+
matchMakerId: string;
|
|
108
|
+
/** Array of entities to insert */
|
|
109
|
+
entities: Array<MmEntity>;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* API request to find matches for an entity
|
|
113
|
+
* @category AI
|
|
114
|
+
*/
|
|
115
|
+
export interface MmFindMatchesRequest {
|
|
116
|
+
/** The ID of the matchmaker */
|
|
117
|
+
matchMakerId: string;
|
|
118
|
+
/** The ID of the entity to find matches for */
|
|
119
|
+
entityId: string;
|
|
120
|
+
/** Options for finding matches */
|
|
121
|
+
options: MmFindMatchesOptions;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* API response for finding matches
|
|
125
|
+
* @category AI
|
|
126
|
+
*/
|
|
127
|
+
export interface MmFindMatchesResponse {
|
|
128
|
+
/** Array of matching entities */
|
|
129
|
+
matches: Array<MmEntityMatch>;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* API request to find matches for an entity not yet inserted
|
|
133
|
+
* @category AI
|
|
134
|
+
*/
|
|
135
|
+
export interface MmFindMatchesForEntityRequest {
|
|
136
|
+
/** The ID of the matchmaker */
|
|
137
|
+
matchMakerId: string;
|
|
138
|
+
/** The entity to find matches for */
|
|
139
|
+
entity: Omit<MmEntity, 'metadata' | 'id'>;
|
|
140
|
+
/** Options for finding matches */
|
|
141
|
+
options: MmFindMatchesOptions;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* API response for finding matches for an entity
|
|
145
|
+
* @category AI
|
|
146
|
+
*/
|
|
147
|
+
export interface MmFindMatchesForEntityResponse {
|
|
148
|
+
/** Array of matching entities */
|
|
149
|
+
matches: Array<MmEntityMatch>;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* API response for listing matchmakers
|
|
153
|
+
* @category AI
|
|
154
|
+
*/
|
|
155
|
+
export interface MmListMatchMakersResponse {
|
|
156
|
+
/** Array of matchmakers */
|
|
157
|
+
matchMakers: Array<MmMatchMaker>;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* API request to list entities
|
|
161
|
+
* @category AI
|
|
162
|
+
*/
|
|
163
|
+
export interface MmListEntitiesRequest {
|
|
164
|
+
/** The ID of the matchmaker */
|
|
165
|
+
matchMakerId: string;
|
|
166
|
+
/** The ID of the category */
|
|
167
|
+
categoryId: string;
|
|
168
|
+
/** Options for listing entities */
|
|
169
|
+
options: MmListEntitiesOptions;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* API response for listing entities
|
|
173
|
+
* @category AI
|
|
174
|
+
*/
|
|
175
|
+
export interface MmListEntitiesResponse {
|
|
176
|
+
/** Array of entities */
|
|
177
|
+
entities: Array<MmEntity>;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* API response for getting an entity
|
|
181
|
+
* @category AI
|
|
182
|
+
*/
|
|
183
|
+
export interface MmGetEntityResponse {
|
|
184
|
+
/** The entity, if found */
|
|
185
|
+
entity: MmEntity | undefined;
|
|
186
|
+
}
|
|
@@ -13,8 +13,10 @@ export declare const DEFAULT_SHORT_ID_LENGTH = 18;
|
|
|
13
13
|
/**
|
|
14
14
|
* Generates an ID of the given `length` using lowercase latin letters and digits.
|
|
15
15
|
* If the 'prefix' provided replaces the first generated characters with the prefix.
|
|
16
|
+
* If the 'prefixToAvoid' provided, ensures the generated ID does not start with this prefix.
|
|
17
|
+
* When both 'prefix' and 'prefixToAvoid' are provided, 'prefixToAvoid' must be longer than 'prefix'.
|
|
16
18
|
*/
|
|
17
|
-
export declare function generateShortId(length?: number, prefix?: string): string;
|
|
19
|
+
export declare function generateShortId(length?: number, prefix?: string, prefixToAvoid?: string): string;
|
|
18
20
|
/**
|
|
19
21
|
* Generates a set of unique IDs under the same behavior as `generateShortId`.
|
|
20
22
|
*
|
|
@@ -7,7 +7,7 @@ import { AiFilesClient } from './ai-files-client';
|
|
|
7
7
|
import { AiImageClient } from './ai-image-client';
|
|
8
8
|
import { AiKnowledgeBaseReference } from './ai-knowledge-base/ai-knowledge-base-client-reference';
|
|
9
9
|
import { AiMatchMakingClient } from './ai-matchmaking-client';
|
|
10
|
-
import { AiAgent, AiAgentId, AiFileProviderType, AiKnowledgeBase, AiKnowledgeBaseId, AiProviderType, ApplicationAiSettings, IntegrationId, SecretKey } from './public-types';
|
|
10
|
+
import { AiAgent, AiAgentId, AiFileProviderType, AiKnowledgeBase, AiKnowledgeBaseId, AiProviderType, AiSessionContext, ApplicationAiSettings, IntegrationId, SecretKey } from './public-types';
|
|
11
11
|
/**
|
|
12
12
|
* AiClient class serves as a facade for interacting with different AI services.
|
|
13
13
|
* It provides simplified access to AI chatbot and assistant functionalities
|
|
@@ -102,7 +102,7 @@ export declare class AiClient {
|
|
|
102
102
|
* Request to execute an AI-powered API call.
|
|
103
103
|
* Allows specifying allowed endpoints and whether to provide an explanation.
|
|
104
104
|
*/
|
|
105
|
-
executeAiApiCall(integrationId: IntegrationId, prompt: string, allowedEndpoints?: string[], provideExplanation?: boolean): Promise<ExecuteAiApiResponse>;
|
|
105
|
+
executeAiApiCall(integrationId: IntegrationId, prompt: string, allowedEndpoints?: string[], provideExplanation?: boolean, generateApiCallAgentId?: AiAgentId, sessionContext?: AiSessionContext): Promise<ExecuteAiApiResponse>;
|
|
106
106
|
/**
|
|
107
107
|
* Returns name of the secret that stores API key for the given AI provider type.
|
|
108
108
|
* This API key is used for all requests to the AI provider done from the application.
|