@squidcloud/client 1.0.312 → 1.0.314

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.
@@ -156,6 +156,8 @@ export interface AiChatbotChatOptions {
156
156
  connectedIntegrations?: Array<AiConnectedIntegrationMetadata>;
157
157
  /** Current budget for nested or recursive AI chat calls per single prompt. */
158
158
  quotas?: AiChatPromptQuotas;
159
+ /** Include metadata in the context */
160
+ includeMetadata?: boolean;
159
161
  }
160
162
  export interface AiObserveStatusOptions {
161
163
  /** A unique chat ID for the conversation. */
@@ -201,7 +203,7 @@ export interface AiSearchRequest {
201
203
  integrationId: IntegrationId;
202
204
  }
203
205
  export type AiChatbotMutationType = 'insert' | 'update' | 'delete' | 'append' | 'feedback';
204
- export type AiChatbotResourceType = 'instruction' | 'context' | 'profile';
206
+ export type AiChatbotResourceType = 'instruction' | 'profile' | 'context' | 'contexts';
205
207
  export type AiChatbotContextType = 'text' | 'url' | 'file';
206
208
  export interface AiChatbotContextBase {
207
209
  type: AiChatbotContextType;
@@ -70,6 +70,9 @@ export interface AiChatBotContextData {
70
70
  title: string;
71
71
  context: AiChatbotContext;
72
72
  }
73
+ export interface AiChatBotContextDataWithId extends AiChatBotContextData {
74
+ id?: string;
75
+ }
73
76
  export type AiProfileData = Pick<AiChatbotProfileMetadata, (typeof MUTABLE_AI_CHATBOT_PROFILE_METADATA_FIELDS)[number]>;
74
77
  export interface InstructionData {
75
78
  instruction: string;
@@ -78,6 +81,7 @@ export declare class AiAgentReference {
78
81
  private readonly client;
79
82
  private readonly integrationId;
80
83
  private readonly profileId;
84
+ private readonly rpcManager;
81
85
  /**
82
86
  * Sends a prompt to the current profile.
83
87
  *
@@ -108,6 +112,7 @@ export declare class AiAgentReference {
108
112
  * @returns The context reference.
109
113
  */
110
114
  context(id?: string): AiAgentContextReference;
115
+ insertContexts(contexts: Array<AiChatBotContextDataWithId>, files?: Array<File | BlobAndFilename>): Promise<void>;
111
116
  /**
112
117
  * Retrieves an instruction reference for the current profile. An instruction reference can be used to add a new
113
118
  * instruction entry to the profile, or update/delete an existing instruction entry.
@@ -135,9 +140,10 @@ export declare class AiAgentReference {
135
140
  * @param data.modelName - The name of the OpenAI model (`gpt-3.5, `gpt-4`, `claude-3-5-sonnet-latest` or
136
141
  * `claude-3-5-haiku-latest`, `gemini-1.5-pro` `gemini-1.5-flash`).
137
142
  * @param data.isPublic - Whether the chat functionality of the profile can be accessed without security rules.
143
+ * @param file - The file to insert.
138
144
  * @returns A promise that resolves when the profile is successfully updated.
139
145
  */
140
- update(data: Partial<AiProfileData>): Promise<void>;
146
+ update(data: Partial<AiProfileData>, file?: File | BlobAndFilename): Promise<void>;
141
147
  /**
142
148
  * Deletes an existing chatbot profile. This will result in an error if a profile has not yet been created for the
143
149
  * current profile id.
@@ -18,6 +18,7 @@ export declare class AiClient {
18
18
  * Retrieves an AI chatbot client for a specific AI integration.
19
19
  * @param aiIntegrationId - The identifier for the AI integration.
20
20
  * @returns An instance of AiChatbotClient associated with the given AI integration ID.
21
+ * @deprecated Use `agent` method instead.
21
22
  */
22
23
  chatbot(aiIntegrationId: IntegrationId): AiChatbotClient;
23
24
  agent(agentId: string): AiAgentReference;
@@ -1 +1 @@
1
- export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.312";
1
+ export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.314";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/client",
3
- "version": "1.0.312",
3
+ "version": "1.0.314",
4
4
  "description": "A typescript implementation of the Squid client",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/typescript-client/src/index.d.ts",