@squidcloud/client 1.0.268 → 1.0.269
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,4 +1,5 @@
|
|
|
1
1
|
import { FunctionName } from './bundle-data.public-types';
|
|
2
|
+
import { IntegrationId } from './communication.public-types';
|
|
2
3
|
/** The supported OpenAI models */
|
|
3
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", "gpt-4-turbo"];
|
|
4
5
|
export declare const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-pro"];
|
|
@@ -89,6 +90,20 @@ export interface AiChatbotChatOptions {
|
|
|
89
90
|
/** A set of filters that will limit the context the AI can access */
|
|
90
91
|
contextMetadataFilter?: AiContextMetadataFilter;
|
|
91
92
|
}
|
|
93
|
+
/** The options for the AI chatbot search method. */
|
|
94
|
+
export interface AiSearchOptions {
|
|
95
|
+
/** The prompt to search for */
|
|
96
|
+
prompt: string;
|
|
97
|
+
/** A set of filters that will limit the context the AI can access */
|
|
98
|
+
contextMetadataFilter?: AiContextMetadataFilter;
|
|
99
|
+
/** The maximum number of results to return */
|
|
100
|
+
limit?: number;
|
|
101
|
+
}
|
|
102
|
+
export interface AiSearchRequest {
|
|
103
|
+
options: AiSearchOptions;
|
|
104
|
+
profileId: string;
|
|
105
|
+
integrationId: IntegrationId;
|
|
106
|
+
}
|
|
92
107
|
export type AiChatbotMutationType = 'insert' | 'update' | 'delete';
|
|
93
108
|
export type AiChatbotResourceType = 'instruction' | 'context' | 'profile';
|
|
94
109
|
export type AiChatbotContextType = 'text' | 'url' | 'file';
|
|
@@ -97,6 +112,14 @@ export interface AiChatbotContextBase {
|
|
|
97
112
|
data: string;
|
|
98
113
|
metadata?: AiContextMetadata;
|
|
99
114
|
}
|
|
115
|
+
export interface AiSearchResponse {
|
|
116
|
+
chunks: Array<AiSearchResultChunk>;
|
|
117
|
+
}
|
|
118
|
+
export interface AiSearchResultChunk {
|
|
119
|
+
data: string;
|
|
120
|
+
metadata?: AiContextMetadata;
|
|
121
|
+
score: number;
|
|
122
|
+
}
|
|
100
123
|
export interface AiChatbotTextContext extends AiChatbotContextBase {
|
|
101
124
|
type: 'text';
|
|
102
125
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AiChatbotChatOptions, AiChatbotContext, AiChatModelName } from './public-types';
|
|
1
|
+
import { AiChatbotChatOptions, AiChatbotContext, AiChatModelName, AiSearchOptions, AiSearchResponse } from './public-types';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
export declare class AiChatbotClient {
|
|
4
4
|
private readonly rpcManager;
|
|
@@ -24,6 +24,7 @@ export declare class AiChatbotClient {
|
|
|
24
24
|
* that has been received so far.
|
|
25
25
|
*/
|
|
26
26
|
chat(profileId: string, prompt: string, options?: AiChatbotChatOptions): Observable<string>;
|
|
27
|
+
search(profileId: string, options: AiSearchOptions): Promise<AiSearchResponse>;
|
|
27
28
|
/**
|
|
28
29
|
* Sends a prompt to the specified profile id and returns the response as a Promise of string.
|
|
29
30
|
*
|
|
@@ -66,6 +67,7 @@ export declare class AiChatbotProfileReference {
|
|
|
66
67
|
* @param options - The chat options.
|
|
67
68
|
*/
|
|
68
69
|
ask(prompt: string, options?: Omit<AiChatbotChatOptions, 'smoothTyping'>): Promise<string>;
|
|
70
|
+
search(options: AiSearchOptions): Promise<AiSearchResponse>;
|
|
69
71
|
/**
|
|
70
72
|
* Retrieves a context reference for the current profile. A context reference can be used to add a new context entry
|
|
71
73
|
* to the profile, or update/delete an existing entry context.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.
|
|
1
|
+
export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.269";
|