cheshirecat-typescript-client 1.3.25 → 1.4.0
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.
- package/dist/client.d.ts +2 -0
- package/dist/client.js +4 -0
- package/dist/client.js.map +1 -1
- package/dist/endpoints/conversation.d.ts +50 -0
- package/dist/endpoints/conversation.js +74 -0
- package/dist/endpoints/conversation.js.map +1 -0
- package/dist/endpoints/memory.d.ts +1 -34
- package/dist/endpoints/memory.js +0 -45
- package/dist/endpoints/memory.js.map +1 -1
- package/dist/models/api/conversations.d.ts +8 -0
- package/dist/models/api/conversations.js +12 -0
- package/dist/models/api/conversations.js.map +1 -0
- package/dist/models/api/memories.d.ts +1 -8
- package/dist/models/api/memories.js +0 -9
- package/dist/models/api/memories.js.map +1 -1
- package/dist/models/api/plugins.d.ts +1 -23
- package/dist/models/api/plugins.js +3 -51
- package/dist/models/api/plugins.js.map +1 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { Endpoints } from "./endpoints/types";
|
|
|
6
6
|
import { AdminsEndpoint } from "./endpoints/admins";
|
|
7
7
|
import { AuthHandlerEndpoint } from "./endpoints/authHandler";
|
|
8
8
|
import { ChunkerEndpoint } from "./endpoints/chunker";
|
|
9
|
+
import { ConversationEndpoint } from "./endpoints/conversation";
|
|
9
10
|
import { CustomEndpoint } from "./endpoints/customEndpoint";
|
|
10
11
|
import { EmbedderEndpoint } from "./endpoints/embedder";
|
|
11
12
|
import { LargeLanguageModelEndpoint } from "./endpoints/largeLanguageModel";
|
|
@@ -30,6 +31,7 @@ export declare class CheshireCatClient implements Endpoints {
|
|
|
30
31
|
admins(): AdminsEndpoint;
|
|
31
32
|
authHandler(): AuthHandlerEndpoint;
|
|
32
33
|
chunker(): ChunkerEndpoint;
|
|
34
|
+
conversation(): ConversationEndpoint;
|
|
33
35
|
embedder(): EmbedderEndpoint;
|
|
34
36
|
fileManager(): FileManagerEndpoint;
|
|
35
37
|
largeLanguageModel(): LargeLanguageModelEndpoint;
|
package/dist/client.js
CHANGED
|
@@ -6,6 +6,7 @@ const helpers_1 = require("./helpers");
|
|
|
6
6
|
const admins_1 = require("./endpoints/admins");
|
|
7
7
|
const authHandler_1 = require("./endpoints/authHandler");
|
|
8
8
|
const chunker_1 = require("./endpoints/chunker");
|
|
9
|
+
const conversation_1 = require("./endpoints/conversation");
|
|
9
10
|
const customEndpoint_1 = require("./endpoints/customEndpoint");
|
|
10
11
|
const embedder_1 = require("./endpoints/embedder");
|
|
11
12
|
const largeLanguageModel_1 = require("./endpoints/largeLanguageModel");
|
|
@@ -55,6 +56,9 @@ class CheshireCatClient {
|
|
|
55
56
|
chunker() {
|
|
56
57
|
return new chunker_1.ChunkerEndpoint(this);
|
|
57
58
|
}
|
|
59
|
+
conversation() {
|
|
60
|
+
return new conversation_1.ConversationEndpoint(this);
|
|
61
|
+
}
|
|
58
62
|
embedder() {
|
|
59
63
|
return new embedder_1.EmbedderEndpoint(this);
|
|
60
64
|
}
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;AACA,6CAAwC;AAGxC,uCAA2C;AAE3C,+CAAkD;AAClD,yDAA4D;AAC5D,iDAAoD;AACpD,+DAA0D;AAC1D,mDAAsD;AACtD,uEAA0E;AAC1E,iDAAoD;AACpD,iDAAoD;AACpD,yDAA4D;AAC5D,6CAAgD;AAChD,uDAA0D;AAC1D,+CAAkD;AAElD,+DAAkE;AAClE,yDAA4D;AAE5D,MAAa,iBAAiB;IACT,QAAQ,CAAW;IACnB,UAAU,CAAa;IACvB,UAAU,CAAa;IAExC,YAAY,QAAkB,EAAE,UAAsB,EAAE,KAAc;QAClE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAE7B,IAAI,KAAK,EAAE,CAAC;Y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C,OAAO,EAAE,MAAM,CAAC,CAAC;QAC1D,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,IAAoB,EAAE,EAAE;YAC5C,OAAO,CAAC,IAAI,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;OAMG;IACH,OAAO,CACH,OAAmE,EACnE,OAAe,EACf,MAAc;QAEd,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC1D,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAkB,EAAE,KAA4B,EAAE,EAAE;YACtE,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAzKD,8CAyKC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { AbstractEndpoint } from "./abstract";
|
|
2
|
+
import { ConversationHistoryDeleteOutput, ConversationHistoryOutput } from "../models/api/conversations";
|
|
3
|
+
import { Role } from "../types";
|
|
4
|
+
import { Why } from "../models/dtos";
|
|
5
|
+
export declare class ConversationEndpoint extends AbstractEndpoint {
|
|
6
|
+
protected prefix: string;
|
|
7
|
+
/**
|
|
8
|
+
* This endpoint returns the conversation history.
|
|
9
|
+
*
|
|
10
|
+
* @param agentId The agent ID.
|
|
11
|
+
* @param userId The user ID to filter the conversation history by.
|
|
12
|
+
* @param chatId The chat ID to filter the conversation history by.
|
|
13
|
+
*
|
|
14
|
+
* @returns The conversation history.
|
|
15
|
+
*/
|
|
16
|
+
getConversationHistory(agentId: string, userId: string, chatId: string): Promise<ConversationHistoryOutput>;
|
|
17
|
+
/**
|
|
18
|
+
* This endpoint returns all conversation histories for a given agent and user.
|
|
19
|
+
*
|
|
20
|
+
* @param agentId The agent ID.
|
|
21
|
+
* @param userId The user ID to filter the conversation histories by.
|
|
22
|
+
*
|
|
23
|
+
* @returns An object with keys as chat IDs and values as ConversationHistoryOutput.
|
|
24
|
+
*/
|
|
25
|
+
getConversationHistories(agentId: string, userId: string): Promise<object>;
|
|
26
|
+
/**
|
|
27
|
+
* This endpoint deletes the conversation history.
|
|
28
|
+
*
|
|
29
|
+
* @param agentId The agent ID.
|
|
30
|
+
* @param userId The user ID to filter the conversation history by.
|
|
31
|
+
* @param chatId The chat ID to filter the conversation history by.
|
|
32
|
+
*
|
|
33
|
+
* @returns The output of the deletion operation.
|
|
34
|
+
*/
|
|
35
|
+
deleteConversationHistory(agentId: string, userId: string, chatId: string): Promise<ConversationHistoryDeleteOutput>;
|
|
36
|
+
/**
|
|
37
|
+
* This endpoint creates a new element in the conversation history.
|
|
38
|
+
*
|
|
39
|
+
* @param who The speaker of the conversation history.
|
|
40
|
+
* @param text The text of the conversation history.
|
|
41
|
+
* @param agentId The agent ID.
|
|
42
|
+
* @param userId The user ID to add the conversation history to.
|
|
43
|
+
* @param chatId The chat ID to add the conversation history to.
|
|
44
|
+
* @param image The image of the conversation history.
|
|
45
|
+
* @param why The reason for the conversation history.
|
|
46
|
+
*
|
|
47
|
+
* @returns The conversation history.
|
|
48
|
+
*/
|
|
49
|
+
postConversationHistory(who: Role, text: string, agentId: string, userId: string, chatId: string, image?: string | null, why?: Why | null): Promise<ConversationHistoryOutput>;
|
|
50
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConversationEndpoint = void 0;
|
|
4
|
+
const abstract_1 = require("./abstract");
|
|
5
|
+
class ConversationEndpoint extends abstract_1.AbstractEndpoint {
|
|
6
|
+
prefix = "/conversation";
|
|
7
|
+
/**
|
|
8
|
+
* This endpoint returns the conversation history.
|
|
9
|
+
*
|
|
10
|
+
* @param agentId The agent ID.
|
|
11
|
+
* @param userId The user ID to filter the conversation history by.
|
|
12
|
+
* @param chatId The chat ID to filter the conversation history by.
|
|
13
|
+
*
|
|
14
|
+
* @returns The conversation history.
|
|
15
|
+
*/
|
|
16
|
+
async getConversationHistory(agentId, userId, chatId) {
|
|
17
|
+
return this.get(this.formatUrl(chatId), agentId, userId);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* This endpoint returns all conversation histories for a given agent and user.
|
|
21
|
+
*
|
|
22
|
+
* @param agentId The agent ID.
|
|
23
|
+
* @param userId The user ID to filter the conversation histories by.
|
|
24
|
+
*
|
|
25
|
+
* @returns An object with keys as chat IDs and values as ConversationHistoryOutput.
|
|
26
|
+
*/
|
|
27
|
+
async getConversationHistories(agentId, userId) {
|
|
28
|
+
const response = await this.getHttpClient(agentId, userId).get(this.prefix);
|
|
29
|
+
if (response.status !== 200) {
|
|
30
|
+
throw new Error(`Failed to fetch data from ${this.prefix}: ${response.statusText}`);
|
|
31
|
+
}
|
|
32
|
+
const result = {};
|
|
33
|
+
for (const [key, item] of response.data) {
|
|
34
|
+
result[key] = this.deserialize(JSON.stringify(item));
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* This endpoint deletes the conversation history.
|
|
40
|
+
*
|
|
41
|
+
* @param agentId The agent ID.
|
|
42
|
+
* @param userId The user ID to filter the conversation history by.
|
|
43
|
+
* @param chatId The chat ID to filter the conversation history by.
|
|
44
|
+
*
|
|
45
|
+
* @returns The output of the deletion operation.
|
|
46
|
+
*/
|
|
47
|
+
async deleteConversationHistory(agentId, userId, chatId) {
|
|
48
|
+
return this.delete(this.formatUrl(chatId), agentId, userId);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* This endpoint creates a new element in the conversation history.
|
|
52
|
+
*
|
|
53
|
+
* @param who The speaker of the conversation history.
|
|
54
|
+
* @param text The text of the conversation history.
|
|
55
|
+
* @param agentId The agent ID.
|
|
56
|
+
* @param userId The user ID to add the conversation history to.
|
|
57
|
+
* @param chatId The chat ID to add the conversation history to.
|
|
58
|
+
* @param image The image of the conversation history.
|
|
59
|
+
* @param why The reason for the conversation history.
|
|
60
|
+
*
|
|
61
|
+
* @returns The conversation history.
|
|
62
|
+
*/
|
|
63
|
+
async postConversationHistory(who, text, agentId, userId, chatId, image, why) {
|
|
64
|
+
const payload = {
|
|
65
|
+
who: who,
|
|
66
|
+
text,
|
|
67
|
+
...(image && { image }),
|
|
68
|
+
...(why && { why: why.toArray() }),
|
|
69
|
+
};
|
|
70
|
+
return this.post(this.formatUrl(chatId), agentId, payload, userId);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.ConversationEndpoint = ConversationEndpoint;
|
|
74
|
+
//# sourceMappingURL=conversation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation.js","sourceRoot":"","sources":["../../src/endpoints/conversation.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAQ5C,MAAa,oBAAqB,SAAQ,2BAAgB;IAC5C,MAAM,GAAG,eAAe,CAAC;IAEnC;;;;;;;;OAQG;IACH,KAAK,CAAC,sBAAsB,CACxB,OAAe,EACf,MAAc,EACd,MAAc;QAEd,OAAO,IAAI,CAAC,GAAG,CAA4B,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACxF,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,wBAAwB,CAAC,OAAe,EAAE,MAAc;QAC1D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5E,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,6BAA6B,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;QACxF,CAAC;QAED,MAAM,MAAM,GAA8C,EAAE,CAAC;QAC7D,KAAK,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;YACtC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,WAAW,CAA4B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAA;QACnF,CAAC;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,yBAAyB,CAC3B,OAAe,EACf,MAAc,EACd,MAAc;QAEd,OAAO,IAAI,CAAC,MAAM,CACd,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EACtB,OAAO,EACP,MAAM,CACT,CAAC;IACN,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,uBAAuB,CACzB,GAAS,EACT,IAAY,EACZ,OAAe,EACf,MAAc,EACd,MAAc,EACd,KAAqB,EACrB,GAAgB;QAEhB,MAAM,OAAO,GAAG;YACZ,GAAG,EAAE,GAAG;YACR,IAAI;YACJ,GAAG,CAAC,KAAK,IAAI,EAAC,KAAK,EAAC,CAAC;YACrB,GAAG,CAAC,GAAG,IAAI,EAAC,GAAG,EAAE,GAAG,CAAC,OAAO,EAAE,EAAC,CAAC;SACnC,CAAC;QAEF,OAAO,IAAI,CAAC,IAAI,CAA4B,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAClG,CAAC;CACJ;AA9FD,oDA8FC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { AbstractEndpoint } from "./abstract";
|
|
2
|
-
import { CollectionPointsDestroyOutput, CollectionsOutput,
|
|
3
|
-
import { Role } from "../types";
|
|
4
|
-
import { Why } from "../models/dtos";
|
|
2
|
+
import { CollectionPointsDestroyOutput, CollectionsOutput, MemoryPointDeleteOutput, MemoryPointsDeleteByMetadataOutput, MemoryPointsOutput, MemoryPointOutput, MemoryRecallOutput } from "../models/api/memories";
|
|
5
3
|
import { CollectionsItem } from "../models/api/nested/memories";
|
|
6
4
|
export declare class MemoryEndpoint extends AbstractEndpoint {
|
|
7
5
|
protected prefix: string;
|
|
@@ -39,37 +37,6 @@ export declare class MemoryEndpoint extends AbstractEndpoint {
|
|
|
39
37
|
* @returns The output of the creation.
|
|
40
38
|
*/
|
|
41
39
|
postMemoryCollections(collection: string, agentId: string): Promise<CollectionsItem>;
|
|
42
|
-
/**
|
|
43
|
-
* This endpoint returns the conversation history.
|
|
44
|
-
*
|
|
45
|
-
* @param agentId The agent ID.
|
|
46
|
-
* @param userId The user ID to filter the conversation history by.
|
|
47
|
-
*
|
|
48
|
-
* @returns The conversation history.
|
|
49
|
-
*/
|
|
50
|
-
getConversationHistory(agentId: string, userId: string): Promise<ConversationHistoryOutput>;
|
|
51
|
-
/**
|
|
52
|
-
* This endpoint deletes the conversation history.
|
|
53
|
-
*
|
|
54
|
-
* @param agentId The agent ID.
|
|
55
|
-
* @param userId The user ID to filter the conversation history by.
|
|
56
|
-
*
|
|
57
|
-
* @returns The output of the deletion operation.
|
|
58
|
-
*/
|
|
59
|
-
deleteConversationHistory(agentId: string, userId: string): Promise<ConversationHistoryDeleteOutput>;
|
|
60
|
-
/**
|
|
61
|
-
* This endpoint creates a new element in the conversation history.
|
|
62
|
-
*
|
|
63
|
-
* @param who The speaker of the conversation history.
|
|
64
|
-
* @param text The text of the conversation history.
|
|
65
|
-
* @param agentId The agent ID.
|
|
66
|
-
* @param userId The user ID to add the conversation history to.
|
|
67
|
-
* @param image The image of the conversation history.
|
|
68
|
-
* @param why The reason for the conversation history.
|
|
69
|
-
*
|
|
70
|
-
* @returns The conversation history.
|
|
71
|
-
*/
|
|
72
|
-
postConversationHistory(who: Role, text: string, agentId: string, userId: string, image?: string | null, why?: Why | null): Promise<ConversationHistoryOutput>;
|
|
73
40
|
/**
|
|
74
41
|
* This endpoint retrieves memory points based on the input text. The text parameter is the input text for which the
|
|
75
42
|
* memory points are retrieved. The k parameter is the number of memory points to retrieve.
|
package/dist/endpoints/memory.js
CHANGED
|
@@ -48,51 +48,6 @@ class MemoryEndpoint extends abstract_1.AbstractEndpoint {
|
|
|
48
48
|
return this.post(this.formatUrl("/collections/" + collection), agentId);
|
|
49
49
|
}
|
|
50
50
|
// END Memory Collections API --
|
|
51
|
-
// -- Memory Conversation History API
|
|
52
|
-
/**
|
|
53
|
-
* This endpoint returns the conversation history.
|
|
54
|
-
*
|
|
55
|
-
* @param agentId The agent ID.
|
|
56
|
-
* @param userId The user ID to filter the conversation history by.
|
|
57
|
-
*
|
|
58
|
-
* @returns The conversation history.
|
|
59
|
-
*/
|
|
60
|
-
async getConversationHistory(agentId, userId) {
|
|
61
|
-
return this.get(this.formatUrl("/conversation_history"), agentId, userId);
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* This endpoint deletes the conversation history.
|
|
65
|
-
*
|
|
66
|
-
* @param agentId The agent ID.
|
|
67
|
-
* @param userId The user ID to filter the conversation history by.
|
|
68
|
-
*
|
|
69
|
-
* @returns The output of the deletion operation.
|
|
70
|
-
*/
|
|
71
|
-
async deleteConversationHistory(agentId, userId) {
|
|
72
|
-
return this.delete(this.formatUrl("/conversation_history"), agentId, userId);
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* This endpoint creates a new element in the conversation history.
|
|
76
|
-
*
|
|
77
|
-
* @param who The speaker of the conversation history.
|
|
78
|
-
* @param text The text of the conversation history.
|
|
79
|
-
* @param agentId The agent ID.
|
|
80
|
-
* @param userId The user ID to add the conversation history to.
|
|
81
|
-
* @param image The image of the conversation history.
|
|
82
|
-
* @param why The reason for the conversation history.
|
|
83
|
-
*
|
|
84
|
-
* @returns The conversation history.
|
|
85
|
-
*/
|
|
86
|
-
async postConversationHistory(who, text, agentId, userId, image, why) {
|
|
87
|
-
const payload = {
|
|
88
|
-
who: who,
|
|
89
|
-
text,
|
|
90
|
-
...(image && { image }),
|
|
91
|
-
...(why && { why: why.toArray() }),
|
|
92
|
-
};
|
|
93
|
-
return this.post(this.formatUrl("/conversation_history"), agentId, payload, userId);
|
|
94
|
-
}
|
|
95
|
-
// END Memory Conversation History API --
|
|
96
51
|
// -- Memory Points API
|
|
97
52
|
/**
|
|
98
53
|
* This endpoint retrieves memory points based on the input text. The text parameter is the input text for which the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../src/endpoints/memory.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;
|
|
1
|
+
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../src/endpoints/memory.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAY5C,MAAa,cAAe,SAAQ,2BAAgB;IACtC,MAAM,GAAG,SAAS,CAAC;IAE7B,4BAA4B;IAE5B;;;;;;OAMG;IACH,KAAK,CAAC,oBAAoB,CAAC,OAAe;QACtC,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,+BAA+B,CAAC,OAAe;QACjD,OAAO,IAAI,CAAC,MAAM,CAAgC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC;IAC/F,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,qCAAqC,CACvC,UAAkB,EAClB,OAAe;QAEf,OAAO,IAAI,CAAC,MAAM,CACd,IAAI,CAAC,SAAS,CAAC,eAAe,GAAG,UAAU,CAAC,EAC5C,OAAO,CACV,CAAC;IACN,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,qBAAqB,CACvB,UAAkB,EAClB,OAAe;QAEf,OAAO,IAAI,CAAC,IAAI,CACZ,IAAI,CAAC,SAAS,CAAC,eAAe,GAAG,UAAU,CAAC,EAC5C,OAAO,CACV,CAAC;IACN,CAAC;IAED,gCAAgC;IAEhC,uBAAuB;IAEv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,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,iBAAiB,CACnB,UAAkB,EAClB,OAAe,EACf,OAAe;QAEf,OAAO,IAAI,CAAC,MAAM,CACd,IAAI,CAAC,SAAS,CAAC,eAAe,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC,EACnE,OAAO,CACV,CAAC;IACN,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,4BAA4B,CAC9B,UAAkB,EAClB,OAAe,EACf,QAAc;QAEd,OAAO,IAAI,CAAC,MAAM,CACd,IAAI,CAAC,SAAS,CAAC,eAAe,GAAG,UAAU,GAAG,SAAS,CAAC,EACxD,OAAO,EACP,IAAI,EACJ,QAAQ,CACX,CAAC;IACN,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,eAAe,CACjB,UAAkB,EAClB,OAAe,EACf,KAAqB,EACrB,MAAsB,EACtB,QAAc;QAEd,MAAM,KAAK,GAAG;YACV,GAAG,CAAC,KAAK,IAAI,EAAC,KAAK,EAAC,CAAC;YACrB,GAAG,CAAC,MAAM,IAAI,EAAC,MAAM,EAAC,CAAC;YACvB,GAAG,CAAC,QAAQ,IAAI,EAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAC,CAAC;SACxD,CAAC;QAEF,OAAO,IAAI,CAAC,GAAG,CACX,IAAI,CAAC,SAAS,CAAC,eAAe,GAAG,UAAU,GAAG,SAAS,CAAC,EACxD,OAAO,EACP,IAAI,EACJ,KAAK,CACR,CAAC;IACN,CAAC;CAGJ;AApOD,wCAoOC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ConversationHistoryItem } from "./nested/memories";
|
|
2
|
+
export interface ConversationHistoryDeleteOutput {
|
|
3
|
+
deleted: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare class ConversationHistoryOutput {
|
|
6
|
+
history: ConversationHistoryItem[];
|
|
7
|
+
toArray(): Record<string, unknown>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConversationHistoryOutput = void 0;
|
|
4
|
+
class ConversationHistoryOutput {
|
|
5
|
+
history;
|
|
6
|
+
toArray() {
|
|
7
|
+
const history = this.history.map(h => h.toArray());
|
|
8
|
+
return { history };
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.ConversationHistoryOutput = ConversationHistoryOutput;
|
|
12
|
+
//# sourceMappingURL=conversations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../../src/models/api/conversations.ts"],"names":[],"mappings":";;;AAMA,MAAa,yBAAyB;IAClC,OAAO,CAA4B;IAE5B,OAAO;QACV,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;QACnD,OAAO,EAAE,OAAO,EAAE,CAAC;IACvB,CAAC;CACJ;AAPD,8DAOC"}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import { MemoryPoint } from "../../types";
|
|
2
|
-
import { CollectionsItem,
|
|
2
|
+
import { CollectionsItem, MemoryPointsDeleteByMetadataInfo, MemoryRecallQuery, MemoryRecallVectors, VectorRecord } from "./nested/memories";
|
|
3
3
|
export interface CollectionPointsDestroyOutput {
|
|
4
4
|
deleted: Record<string, boolean>;
|
|
5
5
|
}
|
|
6
6
|
export interface CollectionsOutput {
|
|
7
7
|
collections: CollectionsItem[];
|
|
8
8
|
}
|
|
9
|
-
export interface ConversationHistoryDeleteOutput {
|
|
10
|
-
deleted: boolean;
|
|
11
|
-
}
|
|
12
|
-
export declare class ConversationHistoryOutput {
|
|
13
|
-
history: ConversationHistoryItem[];
|
|
14
|
-
toArray(): Record<string, unknown>;
|
|
15
|
-
}
|
|
16
9
|
export interface MemoryPointDeleteOutput {
|
|
17
10
|
deleted: string;
|
|
18
11
|
}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConversationHistoryOutput = void 0;
|
|
4
|
-
class ConversationHistoryOutput {
|
|
5
|
-
history;
|
|
6
|
-
toArray() {
|
|
7
|
-
const history = this.history.map(h => h.toArray());
|
|
8
|
-
return { history };
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
exports.ConversationHistoryOutput = ConversationHistoryOutput;
|
|
12
3
|
//# sourceMappingURL=memories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memories.js","sourceRoot":"","sources":["../../../src/models/api/memories.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"memories.js","sourceRoot":"","sources":["../../../src/models/api/memories.ts"],"names":[],"mappings":""}
|
|
@@ -3,24 +3,6 @@ export declare class FilterOutput {
|
|
|
3
3
|
query?: string | null;
|
|
4
4
|
toArray(): object;
|
|
5
5
|
}
|
|
6
|
-
export declare class HookOutput {
|
|
7
|
-
name: string;
|
|
8
|
-
priority: number;
|
|
9
|
-
toArray(): object;
|
|
10
|
-
}
|
|
11
|
-
export declare class ToolOutput {
|
|
12
|
-
name: string;
|
|
13
|
-
toArray(): object;
|
|
14
|
-
}
|
|
15
|
-
export declare class FormOutput {
|
|
16
|
-
name: string;
|
|
17
|
-
toArray(): object;
|
|
18
|
-
}
|
|
19
|
-
export declare class EndpointOutput {
|
|
20
|
-
name: string;
|
|
21
|
-
tags: string[];
|
|
22
|
-
toArray(): object;
|
|
23
|
-
}
|
|
24
6
|
export declare class PluginCollectionOutput {
|
|
25
7
|
filters: FilterOutput;
|
|
26
8
|
installed: PluginItemOutput[];
|
|
@@ -38,11 +20,7 @@ export declare class PluginItemOutput {
|
|
|
38
20
|
tags?: string | null;
|
|
39
21
|
thumb?: string | null;
|
|
40
22
|
version?: string | null;
|
|
41
|
-
|
|
42
|
-
hooks: HookOutput[];
|
|
43
|
-
tools: ToolOutput[];
|
|
44
|
-
forms: FormOutput[];
|
|
45
|
-
endpoints: EndpointOutput[];
|
|
23
|
+
localInfo: object | null;
|
|
46
24
|
toArray(): object;
|
|
47
25
|
}
|
|
48
26
|
export declare class PluginItemRegistryOutput {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PluginItemRegistryOutput = exports.PluginItemOutput = exports.PluginCollectionOutput = exports.
|
|
3
|
+
exports.PluginItemRegistryOutput = exports.PluginItemOutput = exports.PluginCollectionOutput = exports.FilterOutput = void 0;
|
|
4
4
|
const helpers_1 = require("../../helpers");
|
|
5
5
|
class FilterOutput {
|
|
6
6
|
query = null;
|
|
@@ -11,46 +11,6 @@ class FilterOutput {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
exports.FilterOutput = FilterOutput;
|
|
14
|
-
class HookOutput {
|
|
15
|
-
name;
|
|
16
|
-
priority;
|
|
17
|
-
toArray() {
|
|
18
|
-
return {
|
|
19
|
-
name: this.name,
|
|
20
|
-
priority: this.priority,
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.HookOutput = HookOutput;
|
|
25
|
-
class ToolOutput {
|
|
26
|
-
name;
|
|
27
|
-
toArray() {
|
|
28
|
-
return {
|
|
29
|
-
name: this.name,
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.ToolOutput = ToolOutput;
|
|
34
|
-
class FormOutput {
|
|
35
|
-
name;
|
|
36
|
-
toArray() {
|
|
37
|
-
return {
|
|
38
|
-
name: this.name,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.FormOutput = FormOutput;
|
|
43
|
-
class EndpointOutput {
|
|
44
|
-
name;
|
|
45
|
-
tags;
|
|
46
|
-
toArray() {
|
|
47
|
-
return {
|
|
48
|
-
name: this.name,
|
|
49
|
-
tags: this.tags,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.EndpointOutput = EndpointOutput;
|
|
54
14
|
class PluginCollectionOutput {
|
|
55
15
|
filters = new FilterOutput();
|
|
56
16
|
installed = [];
|
|
@@ -87,11 +47,7 @@ class PluginItemOutput {
|
|
|
87
47
|
tags = null;
|
|
88
48
|
thumb = null;
|
|
89
49
|
version = null;
|
|
90
|
-
|
|
91
|
-
hooks;
|
|
92
|
-
tools;
|
|
93
|
-
forms;
|
|
94
|
-
endpoints;
|
|
50
|
+
localInfo = null;
|
|
95
51
|
toArray() {
|
|
96
52
|
return {
|
|
97
53
|
id: this.id,
|
|
@@ -103,11 +59,7 @@ class PluginItemOutput {
|
|
|
103
59
|
tags: this.tags,
|
|
104
60
|
thumb: this.thumb,
|
|
105
61
|
version: this.version,
|
|
106
|
-
|
|
107
|
-
hooks: this.hooks.map(item => item.toArray()),
|
|
108
|
-
tools: this.tools.map(item => item.toArray()),
|
|
109
|
-
forms: this.forms.map(item => item.toArray()),
|
|
110
|
-
endpoints: this.endpoints.map(item => item.toArray()),
|
|
62
|
+
localInfo: this.localInfo,
|
|
111
63
|
};
|
|
112
64
|
}
|
|
113
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../../src/models/api/plugins.ts"],"names":[],"mappings":";;;AACA,2CAA6D;AAE7D,MAAa,YAAY;IACrB,KAAK,GAAmB,IAAI,CAAC;IAEtB,OAAO;QACV,OAAO;YACH,KAAK,EAAE,IAAI,CAAC,KAAK;SACpB,CAAC;IACN,CAAC;CACJ;AARD,oCAQC;AAED,MAAa,
|
|
1
|
+
{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../../src/models/api/plugins.ts"],"names":[],"mappings":";;;AACA,2CAA6D;AAE7D,MAAa,YAAY;IACrB,KAAK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