@squidcloud/client 1.0.399 → 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/types/ai-agent.types.d.ts +8 -1
- 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/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 { 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,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.
|
|
@@ -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.
|