@squidcloud/backend 1.0.380 → 1.0.381

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,12 +1,13 @@
1
+ import { UserAiAskResponse, UserAiChatOptions } from '@squidcloud/client';
1
2
  import { SquidService } from './service';
2
3
  /**
3
4
  * Abstract class representing a service for interacting with LLMs (Large Language Models).
4
5
  */
5
6
  export declare abstract class SquidLlmService extends SquidService {
6
7
  /**
7
- * Asks a question to the LLM and returns the response.
8
+ * Sends a prompt to the LLM and returns the response.
8
9
  * @param prompt The prompt to send to the LLM.
9
- * @param model The name of the model to use for the request.
10
+ * @param options Chat options to specify additional parameters for the request.
10
11
  */
11
- abstract ask(prompt: string, model: string): Promise<string>;
12
+ abstract ask(prompt: string, options: UserAiChatOptions): Promise<UserAiAskResponse>;
12
13
  }
@@ -23,22 +23,7 @@ export interface AiFunctionCallContext<FunctionContextType = unknown, AgentConte
23
23
  functionContext: FunctionContextType;
24
24
  }
25
25
  /** AiFunctionContext for the connected integration function. Contains predefined integration data. */
26
- export interface AiFunctionCallContextWithIntegration<AiConnectedIntegrationOptionsType = unknown, FunctionContextType = unknown, AgentContextType = unknown> extends AiFunctionCallContext<FunctionContextType, AgentContextType> {
27
- /**
28
- * Unique ID of the integration instance.
29
- * Defined only for functions with an integration type specified.
30
- */
31
- integrationId: IntegrationId;
32
- /**
33
- * Type of the integration, such as 'mysql', 'mail', etc...
34
- * Defined only for functions with an integration type specified.
35
- */
36
- integrationType: IntegrationType;
37
- /**
38
- * Defined when called by the connected integration agent. Contains integration options used for the call.
39
- * See AiConnectedIntegrationMetadata.options.
40
- */
41
- integrationOptions?: AiConnectedIntegrationOptionsType;
26
+ export interface AiFunctionCallContextWithIntegration<AiConnectedIntegrationOptionsType = unknown, FunctionContextType = unknown, AgentContextType = unknown> extends AiFunctionCallContext<FunctionContextType, AgentContextType>, AiConnectedIntegrationMetadata<AiConnectedIntegrationOptionsType> {
42
27
  }
43
28
  /**
44
29
  * Provides context to the security rules of an AI Agent for each new user prompt.
@@ -1,4 +1,4 @@
1
- import { UserAiChatModelName } from '@squidcloud/client';
1
+ import { UserAiAskResponse, UserAiChatOptions } from '@squidcloud/client';
2
2
  import { ClientId, IntegrationId, SquidDocId } from '@squidcloud/client';
3
3
  import { CollectionName, DocIdOrDocIdObj, DocumentData } from '@squidcloud/client';
4
4
  import { ClientConnectionState } from '@squidcloud/client';
@@ -157,7 +157,7 @@ export interface SquidFile {
157
157
  __isSquidFile__: true;
158
158
  }
159
159
  /** Defines a function for asking an LLM model a prompt. */
160
- export type LlmAskAction = (prompt: string, model: UserAiChatModelName) => Promise<string>;
160
+ export type LlmAskAction = (prompt: string, options: UserAiChatOptions) => Promise<UserAiAskResponse>;
161
161
  /**
162
162
  * Base type for all decorators used in backend projects.
163
163
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/backend",
3
- "version": "1.0.380",
3
+ "version": "1.0.381",
4
4
  "description": "Squid Cloud's backend SDK",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -34,7 +34,7 @@
34
34
  "typedoc-plugin-markdown": "^4.5.2"
35
35
  },
36
36
  "peerDependencies": {
37
- "@squidcloud/client": "^1.0.380"
37
+ "@squidcloud/client": "^1.0.381"
38
38
  },
39
39
  "engines": {
40
40
  "node": ">=20.0.0"