@squidcloud/client 1.0.400 → 1.0.402
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-knowledge-base.public-types.d.ts +20 -0
- package/dist/typescript-client/src/agent/ai-agent-client-reference.d.ts +7 -0
- package/dist/typescript-client/src/ai-knowledge-base/ai-knowledge-base-client-reference.d.ts +7 -1
- package/dist/typescript-client/src/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -296,6 +296,26 @@ export interface AiKnowledgeBaseSearchRequest {
|
|
|
296
296
|
/** The search options for this search */
|
|
297
297
|
options: AiKnowledgeBaseSearchOptions;
|
|
298
298
|
}
|
|
299
|
+
/**
|
|
300
|
+
* Request structure for requesting a download link to the context file that you previously provided.
|
|
301
|
+
* @category AI
|
|
302
|
+
*/
|
|
303
|
+
export interface AiKnowledgeBaseDownloadContextRequest {
|
|
304
|
+
/** The id of the AiKnowledgeBase */
|
|
305
|
+
knowledgeBaseId: string;
|
|
306
|
+
/** The id of the particular AiKnowledgeBaseContext */
|
|
307
|
+
contextId: string;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Response structure with the URL to download the specified context.
|
|
311
|
+
*
|
|
312
|
+
* Can be undefined if the file is not available in Squid.
|
|
313
|
+
* @category AI
|
|
314
|
+
*/
|
|
315
|
+
export interface AiKnowledgeBaseDownloadContextResponse {
|
|
316
|
+
/** The URL to download the file, if available. */
|
|
317
|
+
url?: string;
|
|
318
|
+
}
|
|
299
319
|
/**
|
|
300
320
|
* KnowledgeBase with optional chatModel param, used during upsert
|
|
301
321
|
* @category AI
|
|
@@ -120,6 +120,13 @@ export declare class AiAgentReference {
|
|
|
120
120
|
* knows it can look up the job’s status.
|
|
121
121
|
*/
|
|
122
122
|
ask<T extends AiChatModelName | undefined = undefined>(prompt: string, options?: AiAskOptions<T>, jobId?: JobId): Promise<string>;
|
|
123
|
+
/**
|
|
124
|
+
* Helper to replace ${id:fileId} tags in the AI output with their corresponding Markdown.
|
|
125
|
+
* @param aiResponse
|
|
126
|
+
* @param annotations
|
|
127
|
+
* @private
|
|
128
|
+
*/
|
|
129
|
+
private replaceFileTags;
|
|
123
130
|
/**
|
|
124
131
|
* Sends a prompt and returns the string response and file annotations.
|
|
125
132
|
* @param prompt The text prompt to 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, AiKnowledgeBaseChatOptions, AiKnowledgeBaseContext, AiKnowledgeBaseContextRequest, AiKnowledgeBaseSearchResultChunk, AiKnowledgeBaseWithOptionalChatModel, UpsertKnowledgeBaseContextResponse, UpsertKnowledgeBaseContextsResponse } from '../../../internal-common/src/public-types/ai-knowledge-base.public-types';
|
|
1
|
+
import { AiKnowledgeBase, AiKnowledgeBaseChatOptions, AiKnowledgeBaseContext, AiKnowledgeBaseContextRequest, AiKnowledgeBaseDownloadContextResponse, 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.
|
|
@@ -62,4 +62,10 @@ export declare class AiKnowledgeBaseReference {
|
|
|
62
62
|
search(options: AiKnowledgeBaseChatOptions & {
|
|
63
63
|
prompt: string;
|
|
64
64
|
}): Promise<Array<AiKnowledgeBaseSearchResultChunk>>;
|
|
65
|
+
/**
|
|
66
|
+
* Gets the download URL for the requested context.
|
|
67
|
+
*
|
|
68
|
+
* @return Object with temporary URL to download the requested context. Will be `undefined` if file is unavailable.
|
|
69
|
+
*/
|
|
70
|
+
downloadContext(contextId: string): Promise<AiKnowledgeBaseDownloadContextResponse>;
|
|
65
71
|
}
|