@squidcloud/client 1.0.293 → 1.0.295

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.
@@ -0,0 +1,38 @@
1
+ import { AiContextMetadata } from './ai-chatbot.public-types';
2
+ /**
3
+ * Represents a category in the matchmaker.
4
+ * The description is used by the AI to extract features from the content.
5
+ */
6
+ export interface MmCategory {
7
+ id: string;
8
+ description: string;
9
+ }
10
+ /**
11
+ * Represents a matchmaker entity for a given category.
12
+ * The metadata is used to filter the entities when finding matches.
13
+ */
14
+ export interface MmEntity {
15
+ id: string;
16
+ content: string;
17
+ categoryId: string;
18
+ metadata: AiContextMetadata;
19
+ }
20
+ /**
21
+ * Represents a matchmaker.
22
+ * The description is used to describe the matchmaker and by the AI to better understand the domain.
23
+ * The two categories represent the two types of entities that can be matched.
24
+ */
25
+ export interface MmMatchMaker {
26
+ id: string;
27
+ description: string;
28
+ firstCategory: MmCategory;
29
+ secondCategory: MmCategory;
30
+ }
31
+ /**
32
+ * Represents a matchmaker entity match. A high score indicates a good match.
33
+ */
34
+ export interface MmEntityMatch extends MmEntity {
35
+ /** The score of the match between 0 and 100 - 100 represents best match. */
36
+ score: number;
37
+ reasoning: string;
38
+ }
@@ -0,0 +1,37 @@
1
+ import { RpcManager } from './rpc.manager';
2
+ import { AiContextMetadataFilter } from '../../internal-common/src/public-types/ai-chatbot.public-types';
3
+ import { MmEntity, MmEntityMatch, MmMatchMaker } from '../../internal-common/src/public-types/ai-matchmaking.types';
4
+ /**
5
+ * Client for the AI Matchmaking service. This service allows you to create matchmakers and insert entities into them.
6
+ * The service will then find matches for the entities.
7
+ */
8
+ export declare class AiMatchMakingClient {
9
+ private readonly rpcManager;
10
+ constructor(rpcManager: RpcManager);
11
+ /**
12
+ * Creates a new matchmaker with the given id, description, and categories.
13
+ * @param matchMaker The matchmaker to create.
14
+ */
15
+ createMatchMaker(matchMaker: MmMatchMaker): Promise<MatchMaker>;
16
+ /**
17
+ * Retrieves an existing matchmaker by its ID.
18
+ */
19
+ getMatchMaker(matchMakerId: string): MatchMaker;
20
+ listMatchMakers(): Promise<Array<MmMatchMaker>>;
21
+ }
22
+ /**
23
+ * Represents a matchmaker. You can insert entities into the matchmaker and find matches for them.
24
+ */
25
+ export declare class MatchMaker {
26
+ id: string;
27
+ private readonly rpcManager;
28
+ /** Adds a new entity to the matchmaker. */
29
+ insertEntity(entity: MmEntity): Promise<void>;
30
+ delete(): Promise<void>;
31
+ deleteEntity(entityId: string): Promise<void>;
32
+ /** Finds matches for the given entity id. */
33
+ findMatches(entityId: string, metadataFilter?: AiContextMetadataFilter): Promise<Array<MmEntityMatch>>;
34
+ /** Finds matches for the given entity. */
35
+ findMatchesForEntity(entity: Omit<MmEntity, 'metadata' | 'id'>, metadataFilter?: AiContextMetadataFilter): Promise<Array<MmEntityMatch>>;
36
+ listEntities(categoryId: string, metadataFilter?: AiContextMetadataFilter): Promise<Array<MmEntity>>;
37
+ }
@@ -3,6 +3,7 @@ import { AiAssistantClient } from './ai-assistant-client';
3
3
  import { ApiOptions, IntegrationId } from './public-types';
4
4
  import { AiImageClient } from './ai-image-client';
5
5
  import { AiAudioClient } from './ai-audio-client';
6
+ import { AiMatchMakingClient } from './ai-matchmaking-client';
6
7
  export interface ExecuteAiQueryRequest {
7
8
  integrationId: IntegrationId;
8
9
  prompt: string;
@@ -77,6 +78,10 @@ export declare class AiClient {
77
78
  * Retrieves an AI audio client.
78
79
  */
79
80
  audio(): AiAudioClient;
81
+ /**
82
+ * Retrieves an AI match-making client.
83
+ */
84
+ matchMaking(): AiMatchMakingClient;
80
85
  /**
81
86
  * Executes an AI query using a specific DB integration, sending a prompt to the AI and returning its response.
82
87
  * This function allows for direct interaction with the AI's capabilities by sending text prompts and receiving
@@ -46,3 +46,4 @@ export * from './storage-client';
46
46
  export * from './personal-storage-client';
47
47
  export * from './extraction-client';
48
48
  export * from './file-utils';
49
+ export * from './ai-matchmaking-client';
@@ -23,3 +23,4 @@ export * from '../../internal-common/src/public-types/socket.public-types';
23
23
  export * from '../../internal-common/src/public-types/storage.types';
24
24
  export * from '../../internal-common/src/public-types/typescript.public-types';
25
25
  export * from '../../internal-common/src/public-types/extraction.public-types';
26
+ export * from '../../internal-common/src/public-types/ai-matchmaking.types';
@@ -1 +1 @@
1
- export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.293";
1
+ export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.295";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/client",
3
- "version": "1.0.293",
3
+ "version": "1.0.295",
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",