@squidcloud/client 1.0.398 → 1.0.400
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.public-types.d.ts +23 -2
- package/dist/internal-common/src/public-types/ai-knowledge-base.public-types.d.ts +4 -2
- package/dist/internal-common/src/types/ai-agent.types.d.ts +8 -1
- package/dist/internal-common/src/types/ai-knowledge-base.types.d.ts +18 -2
- package/dist/typescript-client/src/admin-client.d.ts +1 -0
- package/dist/typescript-client/src/agent/ai-agent-client-reference.d.ts +6 -1
- package/dist/typescript-client/src/ai-knowledge-base/ai-knowledge-base-client-reference.d.ts +2 -2
- package/dist/typescript-client/src/squid.d.ts +4 -0
- package/dist/typescript-client/src/version.d.ts +1 -1
- package/dist/typescript-client/src/web-client.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AiAudioCreateSpeechModelName, AiAudioTranscriptionModelName, AiChatModelName, AiEmbeddingsModelName, AiImageModelName, AiProviderType, AiRerankProvider, AnthropicChatModelName, GeminiChatModelName, GrokChatModelName, OpenAiAudioCreateSpeechModelName, OpenAiAudioTranscriptionModelName, OpenAiChatModelName, OpenAiCreateSpeechFormat } from './ai-common.public-types';
|
|
2
2
|
import { AiContextMetadata, AiContextMetadataFilter, AiKnowledgeBaseContextType, AiRagType } from './ai-knowledge-base.public-types';
|
|
3
3
|
import { AiFunctionId, AiFunctionIdWithContext, UserAiChatModelName } from './backend.public-types';
|
|
4
|
-
import { AiAgentId, AiContextId, AiKnowledgeBaseId, IntegrationId } from './communication.public-types';
|
|
4
|
+
import { AiAgentId, AiContextId, AiKnowledgeBaseId, AppId, IntegrationId } from './communication.public-types';
|
|
5
5
|
import { DocumentExtractionMethod } from './extraction.public-types';
|
|
6
6
|
import { IntegrationType } from './integration.public-types';
|
|
7
7
|
import { JobId } from './job.public-types';
|
|
@@ -441,7 +441,7 @@ export interface AiStatusMessage {
|
|
|
441
441
|
/** ID of the status update message. */
|
|
442
442
|
messageId: string;
|
|
443
443
|
/** The ID of the agent generating the status message. */
|
|
444
|
-
agentId:
|
|
444
|
+
agentId: AiAgentId;
|
|
445
445
|
/** An optional chat ID associated with the status message. */
|
|
446
446
|
chatId?: string;
|
|
447
447
|
/** The title or summary of the status message. */
|
|
@@ -451,6 +451,27 @@ export interface AiStatusMessage {
|
|
|
451
451
|
/** Optional tags providing additional metadata about the status. */
|
|
452
452
|
tags?: Record<string, any>;
|
|
453
453
|
}
|
|
454
|
+
/** List of all chat history (memory) sources. */
|
|
455
|
+
export declare const AI_CHAT_MESSAGE_SOURCE: readonly ["user", "ai"];
|
|
456
|
+
/** Source of the chat history entry: either an AI response or a user. */
|
|
457
|
+
export type AiChatMessageSource = (typeof AI_CHAT_MESSAGE_SOURCE)[number];
|
|
458
|
+
/** A history entry for a chat. */
|
|
459
|
+
export interface AiChatMessage {
|
|
460
|
+
/** ID of the entry. Unique per agent. */
|
|
461
|
+
id: string;
|
|
462
|
+
/** Agent's application. */
|
|
463
|
+
appId: AppId;
|
|
464
|
+
/** The ID of the agent that owns the history. */
|
|
465
|
+
agentId: AiAgentId;
|
|
466
|
+
/** A memory (history) ID associated with the chat conversation. */
|
|
467
|
+
memoryId: string;
|
|
468
|
+
/** The source of the message: a user or an AI. */
|
|
469
|
+
source: AiChatMessageSource;
|
|
470
|
+
/** The text of the entry: a user's prompt or an AI-generated response. */
|
|
471
|
+
message: string;
|
|
472
|
+
/** Time the entry is created. Unix time millis. */
|
|
473
|
+
timestamp: number;
|
|
474
|
+
}
|
|
454
475
|
/**
|
|
455
476
|
* Name of the tag that contains ID of the parent message.
|
|
456
477
|
* When the tag is present, the current message should be considered in the context of the parent message.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UpsertContextStatusError } from './ai-agent.public-types';
|
|
1
|
+
import { AgentContextRequest, UpsertContextStatusError } from './ai-agent.public-types';
|
|
2
2
|
import { AiChatModelName, AiEmbeddingsModelName, AiRerankProvider } from './ai-common.public-types';
|
|
3
3
|
import { AiKnowledgeBaseId } from './communication.public-types';
|
|
4
4
|
import { DocumentExtractionMethod } from './extraction.public-types';
|
|
@@ -109,7 +109,7 @@ export interface AiContextMetadataOrFilter {
|
|
|
109
109
|
* The options for the AI knowledgebase search method.
|
|
110
110
|
* @category AI
|
|
111
111
|
*/
|
|
112
|
-
export interface
|
|
112
|
+
export interface AiKnowledgeBaseChatOptions {
|
|
113
113
|
/** A set of filters that will limit the context the AI can access. */
|
|
114
114
|
contextMetadataFilter?: AiContextMetadataFilter;
|
|
115
115
|
/** Whether to include references from the source context in the response. Default to false. */
|
|
@@ -154,6 +154,8 @@ export interface AiKnowledgeBaseContext {
|
|
|
154
154
|
sizeBytes: number;
|
|
155
155
|
/** Metadata associated with the context. */
|
|
156
156
|
metadata: AiContextMetadata;
|
|
157
|
+
/** Original request configuration for how the context content was processed. */
|
|
158
|
+
requestConfig?: AgentContextRequest;
|
|
157
159
|
}
|
|
158
160
|
/**
|
|
159
161
|
* @category AI
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentContextRequest, AiAgent, AiAgentContext, AiAnnotation, AiAudioCreateSpeechOptions, AiChatOptions, AiGenerateImageOptions, AiSearchOptions, AiSearchResultChunk, AllAiAgentChatOptions, ApplicationAiSettings } from '../public-types/ai-agent.public-types';
|
|
1
|
+
import { AgentContextRequest, AiAgent, AiAgentContext, AiAnnotation, AiAudioCreateSpeechOptions, AiChatMessage, AiChatOptions, AiGenerateImageOptions, AiSearchOptions, AiSearchResultChunk, AllAiAgentChatOptions, ApplicationAiSettings } from '../public-types/ai-agent.public-types';
|
|
2
2
|
import { AiChatModelName, AiEmbeddingsModelName, AiProviderType } from '../public-types/ai-common.public-types';
|
|
3
3
|
import { AiContextMetadata, AiContextMetadataFilter } from '../public-types/ai-knowledge-base.public-types';
|
|
4
4
|
import { AiAgentId, AiKnowledgeBaseId, AppId, ClientRequestId } from '../public-types/communication.public-types';
|
|
@@ -157,3 +157,10 @@ export interface UpdateApplicationAiSettingsWebhookPayload {
|
|
|
157
157
|
appId: AppId;
|
|
158
158
|
aiSettings: ApplicationAiSettings;
|
|
159
159
|
}
|
|
160
|
+
export interface GetChatHistoryRequest {
|
|
161
|
+
agentId: AiAgentId;
|
|
162
|
+
memoryId: string;
|
|
163
|
+
}
|
|
164
|
+
export interface GetChatHistoryResponse {
|
|
165
|
+
messages: Array<AiChatMessage>;
|
|
166
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AiKnowledgeBase, AiKnowledgeBaseContext, AiKnowledgeBaseContextRequest, AiKnowledgeBaseSearchResultChunk, AiKnowledgeBaseWithOptionalChatModel
|
|
1
|
+
import { AiKnowledgeBase, AiKnowledgeBaseChatOptions, AiKnowledgeBaseContext, AiKnowledgeBaseContextRequest, AiKnowledgeBaseSearchResultChunk, AiKnowledgeBaseWithOptionalChatModel } from '../public-types/ai-knowledge-base.public-types';
|
|
2
2
|
import { AiKnowledgeBaseId, AppId } from '../public-types/communication.public-types';
|
|
3
3
|
/**
|
|
4
4
|
* Request structure for getting an AiKnowledgeBase
|
|
@@ -136,6 +136,22 @@ export interface AiKnowledgeBaseContextSizeRequest {
|
|
|
136
136
|
/** The ID of the AIKnowledgeBase */
|
|
137
137
|
knowledgeBaseId: AiKnowledgeBaseId;
|
|
138
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* Request structure for identifying a knowledge base to reimport the context files (when possible).
|
|
141
|
+
*/
|
|
142
|
+
export interface AiKnowledgeBaseReimportAllFilesRequest {
|
|
143
|
+
/** The ID of the AIKnowledgeBase */
|
|
144
|
+
knowledgeBaseId: AiKnowledgeBaseId;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Request structure for identifying a knowledge base to reimport the context files (when possible).
|
|
148
|
+
*/
|
|
149
|
+
export interface AiKnowledgeBaseReimportFilesRequest {
|
|
150
|
+
/** The ID of the AIKnowledgeBase */
|
|
151
|
+
knowledgeBaseId: AiKnowledgeBaseId;
|
|
152
|
+
/** The ids of the AiKnowledgeBaseContexts to reimport */
|
|
153
|
+
contextIds: Array<string>;
|
|
154
|
+
}
|
|
139
155
|
/**
|
|
140
156
|
* Response structure for getting size of context
|
|
141
157
|
* @category AI
|
|
@@ -147,5 +163,5 @@ export interface AiKnowledgeBaseContextSizeResponse {
|
|
|
147
163
|
export interface AiKnowledgeBaseChatRequest {
|
|
148
164
|
knowledgeBaseId: AiKnowledgeBaseId;
|
|
149
165
|
prompt?: string;
|
|
150
|
-
options?:
|
|
166
|
+
options?: AiKnowledgeBaseChatOptions;
|
|
151
167
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { AgentContextRequest, AiAgent, AiAgentContext, AiConnectedAgentMetadata, AiSearchOptions, AiSearchResultChunk, AiStatusMessage, AiTranscribeAndAskResponse, GuardrailsOptions, UpsertAgentContextResponse, UpsertAgentContextsResponse, UpsertAgentRequest } from '../../../internal-common/src/public-types/ai-agent.public-types';
|
|
2
|
+
import { AgentContextRequest, AiAgent, AiAgentContext, AiChatMessage, AiConnectedAgentMetadata, AiSearchOptions, AiSearchResultChunk, AiStatusMessage, AiTranscribeAndAskResponse, GuardrailsOptions, UpsertAgentContextResponse, UpsertAgentContextsResponse, UpsertAgentRequest } from '../../../internal-common/src/public-types/ai-agent.public-types';
|
|
3
3
|
import { AiChatModelName } from '../../../internal-common/src/public-types/ai-common.public-types';
|
|
4
4
|
import { JobId } from '../../../internal-common/src/public-types/job.public-types';
|
|
5
5
|
import { AiAskOptions, AiAskOptionsWithVoice, AiChatOptionsWithoutVoice, AskResponse, AskWithVoiceResponse, TranscribeAndAskWithVoiceResponse, TranscribeAndChatResponse } from './ai-agent-client.types';
|
|
@@ -144,6 +144,11 @@ export declare class AiAgentReference {
|
|
|
144
144
|
* Observes live status messages from the agent.
|
|
145
145
|
*/
|
|
146
146
|
observeStatusUpdates(): Observable<AiStatusMessage>;
|
|
147
|
+
/**
|
|
148
|
+
* Returns a list of all chat history messages with the given 'memoryId'.
|
|
149
|
+
* Includes both user and & AI messages.
|
|
150
|
+
*/
|
|
151
|
+
getChatHistory(memoryId: string): Promise<Array<AiChatMessage>>;
|
|
147
152
|
/**
|
|
148
153
|
* Transcribes audio and sends it to the agent for response.
|
|
149
154
|
* @param fileToTranscribe The audio file to transcribe and send to the agent.
|
package/dist/typescript-client/src/ai-knowledge-base/ai-knowledge-base-client-reference.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AiKnowledgeBase, AiKnowledgeBaseContext, AiKnowledgeBaseContextRequest, AiKnowledgeBaseSearchResultChunk, AiKnowledgeBaseWithOptionalChatModel,
|
|
1
|
+
import { AiKnowledgeBase, AiKnowledgeBaseChatOptions, AiKnowledgeBaseContext, AiKnowledgeBaseContextRequest, AiKnowledgeBaseSearchResultChunk, AiKnowledgeBaseWithOptionalChatModel, UpsertKnowledgeBaseContextResponse, UpsertKnowledgeBaseContextsResponse } from '../../../internal-common/src/public-types/ai-knowledge-base.public-types';
|
|
2
2
|
/**
|
|
3
3
|
* Parameters for creating or updating an AI agent.
|
|
4
4
|
* Excludes the `id` field, as it is derived from the agent instance.
|
|
@@ -59,7 +59,7 @@ export declare class AiKnowledgeBaseReference {
|
|
|
59
59
|
/**
|
|
60
60
|
* Performs a semantic search in the knowledge base.
|
|
61
61
|
*/
|
|
62
|
-
search(options:
|
|
62
|
+
search(options: AiKnowledgeBaseChatOptions & {
|
|
63
63
|
prompt: string;
|
|
64
64
|
}): Promise<Array<AiKnowledgeBaseSearchResultChunk>>;
|
|
65
65
|
}
|
|
@@ -60,6 +60,10 @@ export interface SquidOptions {
|
|
|
60
60
|
* The user ID of the developer that runs the environment locally.
|
|
61
61
|
*/
|
|
62
62
|
squidDeveloperId?: SquidDeveloperId;
|
|
63
|
+
/**
|
|
64
|
+
* The console region (optional and used for on-prem deployments of Squid)
|
|
65
|
+
*/
|
|
66
|
+
consoleRegion?: string;
|
|
63
67
|
}
|
|
64
68
|
/**
|
|
65
69
|
* Authentication data provider for Squid requests.
|
|
@@ -8,6 +8,7 @@ export declare class WebClient {
|
|
|
8
8
|
private readonly region;
|
|
9
9
|
private readonly appId;
|
|
10
10
|
private readonly apiKey;
|
|
11
|
+
private readonly consoleRegion;
|
|
11
12
|
/**
|
|
12
13
|
* Search the web using AI. Returns a response containing Markdown text and cited URLs.
|
|
13
14
|
* @param query The keywords or query string to search for.
|