@squidcloud/client 1.0.214 → 1.0.216

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 +1 @@
1
- export type AssistantToolType = 'code_interpreter' | 'retrieval';
1
+ export type AssistantToolType = 'code_interpreter' | 'file_search';
@@ -1,12 +1,27 @@
1
+ /** The supported OpenAI models */
2
+ export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-3.5-turbo", "gpt-3.5-turbo-1106", "gpt-4", "gpt-4-turbo-preview", "gpt-4-turbo"];
3
+ export declare const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-pro"];
4
+ export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-3-opus-20240229", "claude-3-sonnet-20240229", "claude-3-haiku-20240307"];
1
5
  /** The supported AI model names. */
2
- export declare const AI_MODEL_NAMES: readonly ["gpt-3.5-turbo", "gpt-3.5-turbo-1106", "gpt-4", "claude-3-opus-20240229", "claude-3-sonnet-20240229", "claude-3-haiku-20240307", "gpt-4-turbo-preview", "gpt-4-turbo"];
6
+ export declare const AI_CHAT_MODEL_NAMES: readonly ["gpt-3.5-turbo", "gpt-3.5-turbo-1106", "gpt-4", "gpt-4-turbo-preview", "gpt-4-turbo", "claude-3-opus-20240229", "claude-3-sonnet-20240229", "claude-3-haiku-20240307", "gemini-pro"];
7
+ export declare const OPENAI_EMBEDDINGS_MODEL_NAMES: readonly ["text-embedding-3-small", "text-embedding-3-large", "text-embedding-ada-002"];
8
+ export declare const AI_EMBEDDINGS_MODEL_NAMES: readonly ["text-embedding-3-small", "text-embedding-3-large", "text-embedding-ada-002"];
3
9
  /** The supported AI image generation model names. */
4
- export declare const AI_IMAGE_GENERATION_MODEL_NAMES: readonly ["dall-e-3", "stable-diffusion-core"];
5
- export type AiModelName = (typeof AI_MODEL_NAMES)[number];
6
- export type AiImageGenerationModelName = (typeof AI_IMAGE_GENERATION_MODEL_NAMES)[number];
10
+ export declare const OPENAI_IMAGE_MODEL_NAMES: readonly ["dall-e-3"];
11
+ export declare const STABLE_DIFFUSION_MODEL_NAMES: readonly ["stable-diffusion-core"];
12
+ export declare const AI_IMAGE_MODEL_NAMES: readonly ["dall-e-3", "stable-diffusion-core"];
13
+ export type AiChatModelName = (typeof AI_CHAT_MODEL_NAMES)[number];
14
+ export type AiEmbeddingsModelName = (typeof AI_EMBEDDINGS_MODEL_NAMES)[number];
15
+ export type OpenAiChatModelName = (typeof OPENAI_CHAT_MODEL_NAMES)[number];
16
+ export type GeminiChatModelName = (typeof GEMINI_CHAT_MODEL_NAMES)[number];
17
+ export type AnthropicChatModelName = (typeof ANTHROPIC_CHAT_MODEL_NAMES)[number];
18
+ export type AiImageModelName = (typeof AI_IMAGE_MODEL_NAMES)[number];
19
+ export type OpenAiImageModelName = (typeof OPENAI_IMAGE_MODEL_NAMES)[number];
20
+ export type StableDiffusionModelName = (typeof STABLE_DIFFUSION_MODEL_NAMES)[number];
7
21
  export type AiGenerateImageOptions = DallEOptions | StableDiffusionCoreOptions;
22
+ export type VectorDbType = 'pinecone' | 'postgres';
8
23
  export interface BaseAiGenerateImageOptions {
9
- modelName: AiImageGenerationModelName;
24
+ modelName: AiImageModelName;
10
25
  }
11
26
  export interface DallEOptions extends BaseAiGenerateImageOptions {
12
27
  modelName: 'dall-e-3';
@@ -42,7 +57,7 @@ export interface AiChatbotChatOptions {
42
57
  /** The temperature to use when sampling from the model. Default to 0.5 */
43
58
  temperature?: number;
44
59
  /** The model to use for this chat. If not provided, the profile model will be used */
45
- overrideModel?: AiModelName;
60
+ overrideModel?: AiChatModelName;
46
61
  }
47
62
  export type AiChatbotMutationType = 'insert' | 'update' | 'delete';
48
63
  export type AiChatbotResourceType = 'instruction' | 'context' | 'profile';
@@ -1,12 +1,14 @@
1
- import { AiModelName } from '../ai-chatbot.public-types';
1
+ import { AiChatModelName, AiEmbeddingsModelName, VectorDbType } from '../ai-chatbot.public-types';
2
2
  export type AiChatbotConfiguration = {
3
3
  apiKey?: string;
4
4
  };
5
5
  export type AiChatbotProfileMetadata = {
6
- modelName: AiModelName;
6
+ modelName: AiChatModelName;
7
7
  isPublic: boolean;
8
8
  strictContext: boolean;
9
9
  instructions: Record<string, string>;
10
+ embeddingModelName?: AiEmbeddingsModelName;
11
+ vectorDbType?: VectorDbType;
10
12
  };
11
13
  export type AiChatbotContextMetadata = {
12
14
  title: string;
@@ -1,4 +1,4 @@
1
- import { AiChatbotChatOptions, AiChatbotContext, AiModelName } from './public-types';
1
+ import { AiChatbotChatOptions, AiChatbotContext, AiChatModelName } from './public-types';
2
2
  import { Observable } from 'rxjs';
3
3
  export declare class AiChatbotClient {
4
4
  private readonly rpcManager;
@@ -40,7 +40,7 @@ export interface AiChatBotContextData {
40
40
  context: AiChatbotContext;
41
41
  }
42
42
  export interface ProfileData {
43
- modelName: AiModelName;
43
+ modelName: AiChatModelName;
44
44
  /** If the profile is public, there is no need to write a security rule to access the chat functionality. This can be dangerous, use with caution. */
45
45
  isPublic: boolean;
46
46
  }
@@ -89,7 +89,7 @@ export declare class AiChatbotProfileReference {
89
89
  *
90
90
  * @param data An object containing options for creating the profile.
91
91
  * @param data.modelName - The name of the OpenAI model (`gpt-3.5, `gpt-4`, `claude-3-opus-20240229`,
92
- * `claude-3-sonnet-20240229` or `claude-3-haiku-20240307`).
92
+ * `claude-3-sonnet-20240229` or `claude-3-haiku-20240307`, `gemini-pro`).
93
93
  * @param data.isPublic - Whether the chat functionality of the profile can be accessed without security rules.
94
94
  * @returns A promise that resolves when the profile is successfully created.
95
95
  */
@@ -100,7 +100,7 @@ export declare class AiChatbotProfileReference {
100
100
  *
101
101
  * @param data An object containing options for updating the profile.
102
102
  * @param data.modelName - The name of the OpenAI model (`gpt-3.5, `gpt-4`, `claude-3-opus-20240229`,
103
- * `claude-3-sonnet-20240229` or `claude-3-haiku-20240307`).
103
+ * `claude-3-sonnet-20240229` or `claude-3-haiku-20240307`, `gemini-pro`).
104
104
  * @param data.isPublic - Whether the chat functionality of the profile can be accessed without security rules.
105
105
  * @returns A promise that resolves when the profile is successfully updated.
106
106
  */
@@ -131,7 +131,7 @@ export declare class DocumentReference<T extends DocumentData = any> {
131
131
  * @param transactionId The transaction to use for this operation. If not provided, the operation will be applied
132
132
  * immediately.
133
133
  */
134
- insert(data: T, transactionId?: TransactionId): Promise<void>;
134
+ insert(data: Omit<T, '__id'>, transactionId?: TransactionId): Promise<void>;
135
135
  /**
136
136
  * Deletes the document.
137
137
  * The `delete` will be reflected optimistically locally and will be applied to the server later.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/client",
3
- "version": "1.0.214",
3
+ "version": "1.0.216",
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",