@squidcloud/client 1.0.358 → 1.0.359
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.
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/** Backend related public types that should be available on the client SDK */
|
|
2
2
|
/** A type alias for a string that represents an AI function ID. */
|
|
3
3
|
export type AiFunctionId = string;
|
|
4
|
+
/** A type alias for a string that represents an AI functions configurator ID. */
|
|
5
|
+
export type AiFunctionsConfiguratorId = string;
|
|
4
6
|
/**
|
|
5
7
|
* A type alias for a service identifier.
|
|
6
8
|
* @category Queue
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { AgentContextRequest, AiAgent, AiAgentChatOptions, AiAgentContext, AiAudioCreateSpeechOptions, AiChatModelName,
|
|
2
|
-
import { AiAgentId, AppId, ClientRequestId
|
|
1
|
+
import { AgentContextRequest, AiAgent, AiAgentChatOptions, AiAgentContext, AiAudioCreateSpeechOptions, AiChatModelName, AiContextMetadata, AiContextMetadataFilter, AiEmbeddingsModelName, AiGenerateImageOptions, AiSearchOptions, AiSearchResultChunk, AllAiAgentChatOptions } from '../public-types/ai-agent.public-types';
|
|
2
|
+
import { AiAgentId, AppId, ClientRequestId } from '../public-types/communication.public-types';
|
|
3
3
|
import { AiFunctionId } from '../public-types/backend.public-types';
|
|
4
|
-
import { IntegrationType } from '../public-types/integration.public-types';
|
|
5
4
|
type ModelDataType = {
|
|
6
5
|
maxTokens: number;
|
|
7
6
|
};
|
|
@@ -115,52 +114,22 @@ export interface ListAgentsResponse {
|
|
|
115
114
|
export declare function validateAiContextMetadata(metadata: AiContextMetadata): void;
|
|
116
115
|
export declare function validateAiContextMetadataFilter(filter: AiContextMetadataFilter): void;
|
|
117
116
|
export declare const METADATA_SERVICE_FUNCTION_NAME = "default:metadata";
|
|
118
|
-
/** A service function name that is used to call tenant or local backend to fetch AI function overrides. */
|
|
119
|
-
export declare const GET_AI_FUNCTION_OVERRIDES_SERVICE_FUNCTION_NAME = "default:getAiFunctionOverrides";
|
|
120
|
-
/** A real TypeScript function name that can be added to any service by user to override AI functions. */
|
|
121
|
-
export declare const GET_AI_FUNCTION_OVERRIDES_USER_FUNCTION_NAME = "getAiFunctionOverrides";
|
|
122
|
-
/** Input (the only parameter) of the `getAiFunctionOverrides` function in client bundle */
|
|
123
|
-
export interface GetAiFunctionOverridesInput {
|
|
124
|
-
integrationId: IntegrationId;
|
|
125
|
-
integrationType: IntegrationType;
|
|
126
|
-
/** Current connected integration metadata with custom options. */
|
|
127
|
-
metadata: AiConnectedIntegrationMetadata;
|
|
128
|
-
}
|
|
129
117
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
118
|
+
* A dictionary model contains either direct prompt-to-answer pairs or prompt-to-function/call-agent instructions.
|
|
119
|
+
* Keys within this dictionary model are treated as case-insensitive by the Squid system.
|
|
132
120
|
*/
|
|
133
|
-
export
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
*/
|
|
138
|
-
functionOverrides: Record<AiFunctionId, AiFunctionOverrideDetails>;
|
|
139
|
-
}
|
|
140
|
-
export interface AiFunctionOverrideDetails {
|
|
121
|
+
export type AiDictionaryModel = Record<string, string | AiDictionaryFunctionCall | AiDictionaryAgentCall>;
|
|
122
|
+
export interface AiDictionaryFunctionCall {
|
|
123
|
+
type: 'function';
|
|
124
|
+
/** ID (name) of the AI function to call. */
|
|
141
125
|
id: AiFunctionId;
|
|
142
|
-
/**
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
126
|
+
/** Args to pass to the AI function. */
|
|
127
|
+
args: Record<string, unknown>;
|
|
128
|
+
}
|
|
129
|
+
export interface AiDictionaryAgentCall {
|
|
130
|
+
type: 'agent';
|
|
131
|
+
id: AiAgentId;
|
|
132
|
+
/** Prompt to send to the connected agent. */
|
|
133
|
+
prompt: string;
|
|
146
134
|
}
|
|
147
|
-
/**
|
|
148
|
-
* The literal marker that must appear at the start of a response of the 'dictionary' model
|
|
149
|
-
* to indicate an AI function call invocation.
|
|
150
|
-
*
|
|
151
|
-
* When parsing a raw assistant response, dictionary model code look for a line beginning with this exact string,
|
|
152
|
-
* followed by the target function’s identifier, then a JSON payload of arguments on subsequent lines.
|
|
153
|
-
*
|
|
154
|
-
* Example valid response payload:
|
|
155
|
-
* ```
|
|
156
|
-
* <~
|
|
157
|
-
* @call doSomething
|
|
158
|
-
* {
|
|
159
|
-
* "foo": 42,
|
|
160
|
-
* "bar": "baz"
|
|
161
|
-
* }
|
|
162
|
-
* ```
|
|
163
|
-
*/
|
|
164
|
-
export declare const DICTIONARY_AI_FUNCTION_CALL_COMMAND = "@fn";
|
|
165
|
-
export declare const DICTIONARY_AI_AGENT_CALL_COMMAND = "@agent";
|
|
166
135
|
export {};
|