@squidcloud/client 1.0.287 → 1.0.288
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/internal-common/src/public-types/ai-assistant.public-types.d.ts +5 -0
- package/dist/internal-common/src/public-types/ai-chatbot.public-types.d.ts +22 -16
- package/dist/internal-common/src/public-types/bundle-data.public-types.d.ts +5 -0
- package/dist/internal-common/src/public-types/integration.public-types.d.ts +6 -0
- package/dist/typescript-client/src/ai-agent-client.d.ts +2 -1
- package/dist/typescript-client/src/index.d.ts +1 -0
- package/dist/typescript-client/src/integration-client.d.ts +6 -0
- package/dist/typescript-client/src/squid.d.ts +5 -0
- package/dist/typescript-client/src/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { OpenAiResponseFormat } from './ai-chatbot.public-types';
|
|
2
|
+
import { FunctionName } from './bundle-data.public-types';
|
|
2
3
|
export type AssistantToolType = 'code_interpreter' | 'file_search';
|
|
3
4
|
/** The options for the AI assistant. */
|
|
4
5
|
export interface QueryAssistantOptions {
|
|
6
|
+
/** Extra context passed to all AI functions. */
|
|
7
|
+
agentContext?: Record<string, unknown>;
|
|
8
|
+
/** Extra context per AI function.*/
|
|
9
|
+
functionContexts?: Record<FunctionName, Record<string, unknown>>;
|
|
5
10
|
/** The format of the response from the AI model. Defaults to 'text' */
|
|
6
11
|
responseFormat?: OpenAiResponseFormat;
|
|
7
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FunctionName } from './bundle-data.public-types';
|
|
1
|
+
import { FunctionName, FunctionNameWithContext } from './bundle-data.public-types';
|
|
2
2
|
import { IntegrationId } from './communication.public-types';
|
|
3
3
|
/** The supported OpenAI models */
|
|
4
4
|
export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-3.5-turbo", "gpt-3.5-turbo-1106", "gpt-4", "gpt-4-turbo-preview", "gpt-4o", "gpt-4o-mini", "gpt-4o-2024-08-06", "o1-preview", "o1-mini", "gpt-4-turbo"];
|
|
@@ -106,33 +106,39 @@ export interface AiFileUrl {
|
|
|
106
106
|
}
|
|
107
107
|
/** The options for the AI chatbot chat method. */
|
|
108
108
|
export interface AiChatbotChatOptions {
|
|
109
|
-
/** The maximum number of tokens to use when making the request to the AI model. Default to the max tokens the model can accept */
|
|
109
|
+
/** The maximum number of tokens to use when making the request to the AI model. Default to the max tokens the model can accept. */
|
|
110
110
|
maxTokens?: number;
|
|
111
|
-
/** A unique chat ID, if the same chat ID is used again and history is not disabled, it will continue the conversation */
|
|
111
|
+
/** A unique chat ID, if the same chat ID is used again and history is not disabled, it will continue the conversation. */
|
|
112
112
|
chatId?: string;
|
|
113
|
-
/** Whether to disable history for the chat. Default to false */
|
|
113
|
+
/** Whether to disable history for the chat. Default to false. */
|
|
114
114
|
disableHistory?: boolean;
|
|
115
|
-
/** Whether to include references from the source context in the response. Default to false */
|
|
115
|
+
/** Whether to include references from the source context in the response. Default to false. */
|
|
116
116
|
includeReference?: boolean;
|
|
117
|
-
/** The format of the response from the AI model. Note that not all models support JSON format. Default to 'text' */
|
|
117
|
+
/** The format of the response from the AI model. Note that not all models support JSON format. Default to 'text'. */
|
|
118
118
|
responseFormat?: OpenAiResponseFormat;
|
|
119
|
-
/** Whether to response in a "smooth typing" way, beneficial when the chat result is displayed in a UI. Default to true */
|
|
119
|
+
/** Whether to response in a "smooth typing" way, beneficial when the chat result is displayed in a UI. Default to true. */
|
|
120
120
|
smoothTyping?: boolean;
|
|
121
|
-
/** The temperature to use when sampling from the model. Default to 0.5 */
|
|
121
|
+
/** The temperature to use when sampling from the model. Default to 0.5. */
|
|
122
122
|
temperature?: number;
|
|
123
|
-
/** The top P value to use when sampling from the model. Default to 1 */
|
|
123
|
+
/** The top P value to use when sampling from the model. Default to 1. */
|
|
124
124
|
topP?: number;
|
|
125
|
-
/** The model to use for this chat. If not provided, the profile model will be used */
|
|
125
|
+
/** The model to use for this chat. If not provided, the profile model will be used. */
|
|
126
126
|
overrideModel?: AiChatModelName;
|
|
127
|
-
/** File URLs (only images supported at the moment) */
|
|
127
|
+
/** File URLs (only images supported at the moment). */
|
|
128
128
|
fileUrls?: Array<AiFileUrl>;
|
|
129
|
-
/**
|
|
130
|
-
|
|
131
|
-
/**
|
|
129
|
+
/** Global context passed to the agent and all AI functions of the agent. */
|
|
130
|
+
agentContext?: Record<string, unknown>;
|
|
131
|
+
/**
|
|
132
|
+
* Functions to expose to the AI.
|
|
133
|
+
* Either a function name or a name with an extra function context passed only to this function.
|
|
134
|
+
* The parameter values must be valid serializable JSON values.
|
|
135
|
+
*/
|
|
136
|
+
functions?: Array<FunctionName | FunctionNameWithContext>;
|
|
137
|
+
/** A list of instructions to include with the prompt. */
|
|
132
138
|
instructions?: Array<string>;
|
|
133
|
-
/** A set of filters that will limit the context the AI can access */
|
|
139
|
+
/** A set of filters that will limit the context the AI can access. */
|
|
134
140
|
contextMetadataFilter?: AiContextMetadataFilter;
|
|
135
|
-
/** The options to use for the response in voice */
|
|
141
|
+
/** The options to use for the response in voice. */
|
|
136
142
|
voiceOptions?: AiAudioCreateSpeechOptions;
|
|
137
143
|
}
|
|
138
144
|
export interface AiAskResponse {
|
|
@@ -17,5 +17,10 @@ export interface AiFunctionParam {
|
|
|
17
17
|
}
|
|
18
18
|
export type TopicName = string;
|
|
19
19
|
export type FunctionName = string;
|
|
20
|
+
/** Function name with the contextual data. The data must be a serializable JSON. */
|
|
21
|
+
export interface FunctionNameWithContext {
|
|
22
|
+
name: FunctionName;
|
|
23
|
+
context: Record<string, unknown>;
|
|
24
|
+
}
|
|
20
25
|
export type ServiceName = string;
|
|
21
26
|
export type ServiceFunctionName = `${ServiceName}:${FunctionName}`;
|
|
@@ -71,3 +71,9 @@ export declare enum IntegrationSchemaType {
|
|
|
71
71
|
'graphql' = "graphql"
|
|
72
72
|
}
|
|
73
73
|
export declare const AI_AGENTS_INTEGRATION_ID: IntegrationId;
|
|
74
|
+
export interface IntegrationInfo {
|
|
75
|
+
id: IntegrationId;
|
|
76
|
+
type: IntegrationType;
|
|
77
|
+
creationDate?: Date;
|
|
78
|
+
updateDate?: Date;
|
|
79
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AiProfileId, AiChatbotChatOptions, AiChatbotContext, AiChatModelName, AiSearchOptions, AiSearchResponse, AiTranscribeAndAskResponse, AiTranscribeAndChatResponse } from './public-types';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
+
import { BlobAndFilename } from './types';
|
|
3
4
|
export interface TranscribeAndChatResponse {
|
|
4
5
|
transcribedPrompt: string;
|
|
5
6
|
responseStream: Observable<string>;
|
|
@@ -161,7 +162,7 @@ export declare class AiAgentContextReference {
|
|
|
161
162
|
* @param file - The file to insert.
|
|
162
163
|
* @returns A promise that resolves when the context is successfully created.
|
|
163
164
|
*/
|
|
164
|
-
insert(data: AiChatBotContextData, file?: File): Promise<void>;
|
|
165
|
+
insert(data: AiChatBotContextData, file?: File | BlobAndFilename): Promise<void>;
|
|
165
166
|
/**
|
|
166
167
|
* Appends data to an existing context entry on the chatbot profile. This will result in an error if an entry has not
|
|
167
168
|
* @param data An object containing options for appending the entry.
|
|
@@ -37,6 +37,7 @@ export * from './rpc.manager';
|
|
|
37
37
|
export * from './observability-client';
|
|
38
38
|
export * from './secret.client';
|
|
39
39
|
export * from './scheduler-client';
|
|
40
|
+
export * from './integration-client';
|
|
40
41
|
export * from './socket.manager';
|
|
41
42
|
export * from './squid-http-client';
|
|
42
43
|
export * from './squid';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IntegrationId, IntegrationInfo, IntegrationType } from './public-types';
|
|
2
|
+
export declare class IntegrationClient {
|
|
3
|
+
private readonly rpcManager;
|
|
4
|
+
list(type?: IntegrationType): Promise<IntegrationInfo[]>;
|
|
5
|
+
get(id: IntegrationId): Promise<IntegrationInfo | undefined>;
|
|
6
|
+
}
|
|
@@ -12,6 +12,7 @@ import { ObservabilityClient } from './observability-client';
|
|
|
12
12
|
import { ExtractionClient } from './extraction-client';
|
|
13
13
|
import { PersonalStorageClient } from './personal-storage-client';
|
|
14
14
|
import { SchedulerClient } from './scheduler-client';
|
|
15
|
+
import { IntegrationClient } from './integration-client';
|
|
15
16
|
/** The different options that can be used to initialize a Squid instance. */
|
|
16
17
|
export interface SquidOptions {
|
|
17
18
|
/**
|
|
@@ -105,6 +106,8 @@ export declare class Squid {
|
|
|
105
106
|
private readonly observabilityClient;
|
|
106
107
|
private readonly queueManagerFactory;
|
|
107
108
|
private readonly schedulerClient;
|
|
109
|
+
private readonly integrationClient;
|
|
110
|
+
private readonly _appId;
|
|
108
111
|
/**
|
|
109
112
|
* Creates a new instance of Squid with the given options.
|
|
110
113
|
*
|
|
@@ -210,6 +213,8 @@ export declare class Squid {
|
|
|
210
213
|
get secrets(): SecretClient;
|
|
211
214
|
get observability(): ObservabilityClient;
|
|
212
215
|
get schedulers(): SchedulerClient;
|
|
216
|
+
get integrations(): IntegrationClient;
|
|
217
|
+
get appId(): AppId;
|
|
213
218
|
/**
|
|
214
219
|
* Returns a distributed lock for the given mutex. The lock can be used to synchronize access to a shared resource.
|
|
215
220
|
* The lock will be released when the release method on the returned object is invoked or whenever the connection
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.
|
|
1
|
+
export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.288";
|