@celljs/ai-core 3.8.0 → 4.0.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/esm/common/chat/index.d.ts +5 -0
- package/esm/common/chat/index.js +6 -0
- package/esm/common/chat/index.js.map +1 -0
- package/esm/common/chat/message/abstract-message.d.ts +9 -0
- package/esm/common/chat/message/abstract-message.js +11 -0
- package/esm/common/chat/message/abstract-message.js.map +1 -0
- package/esm/common/chat/message/assistant-message.d.ts +9 -0
- package/esm/common/chat/message/assistant-message.js +12 -0
- package/esm/common/chat/message/assistant-message.js.map +1 -0
- package/esm/common/chat/message/function-message.d.ts +8 -0
- package/esm/common/chat/message/function-message.js +11 -0
- package/esm/common/chat/message/function-message.js.map +1 -0
- package/esm/common/chat/message/index.d.ts +7 -0
- package/esm/common/chat/message/index.js +8 -0
- package/esm/common/chat/message/index.js.map +1 -0
- package/esm/common/chat/message/message-protocol.d.ts +87 -0
- package/esm/common/chat/message/message-protocol.js +20 -0
- package/esm/common/chat/message/message-protocol.js.map +1 -0
- package/esm/common/chat/message/system-message.d.ts +8 -0
- package/esm/common/chat/message/system-message.js +11 -0
- package/esm/common/chat/message/system-message.js.map +1 -0
- package/esm/common/chat/message/tool-response-message.d.ts +31 -0
- package/esm/common/chat/message/tool-response-message.js +19 -0
- package/esm/common/chat/message/tool-response-message.js.map +1 -0
- package/esm/common/chat/message/user-message.d.ts +8 -0
- package/esm/common/chat/message/user-message.js +11 -0
- package/esm/common/chat/message/user-message.js.map +1 -0
- package/esm/common/chat/metadata/chat-generation-metadata.d.ts +27 -0
- package/esm/common/chat/metadata/chat-generation-metadata.js +16 -0
- package/esm/common/chat/metadata/chat-generation-metadata.js.map +1 -0
- package/esm/common/chat/metadata/index.d.ts +2 -0
- package/esm/common/chat/metadata/index.js +3 -0
- package/esm/common/chat/metadata/index.js.map +1 -0
- package/esm/common/chat/metadata/metadata-protocol.d.ts +127 -0
- package/esm/common/chat/metadata/metadata-protocol.js +92 -0
- package/esm/common/chat/metadata/metadata-protocol.js.map +1 -0
- package/esm/common/chat/model/chat-protocol.d.ts +26 -0
- package/esm/common/chat/model/chat-protocol.js +35 -0
- package/esm/common/chat/model/chat-protocol.js.map +1 -0
- package/esm/common/chat/model/index.d.ts +2 -0
- package/esm/common/chat/model/index.js +3 -0
- package/esm/common/chat/model/index.js.map +1 -0
- package/esm/common/chat/model/proxy-chat-model.d.ts +11 -0
- package/esm/common/chat/model/proxy-chat-model.js +67 -0
- package/esm/common/chat/model/proxy-chat-model.js.map +1 -0
- package/esm/common/chat/prompt/el-prompt-template.d.ts +8 -0
- package/esm/common/chat/prompt/el-prompt-template.js +47 -0
- package/esm/common/chat/prompt/el-prompt-template.js.map +1 -0
- package/esm/common/chat/prompt/index.d.ts +4 -0
- package/esm/common/chat/prompt/index.js +5 -0
- package/esm/common/chat/prompt/index.js.map +1 -0
- package/esm/common/chat/prompt/prompt-protocol.d.ts +49 -0
- package/esm/common/chat/prompt/prompt-protocol.js +2 -0
- package/esm/common/chat/prompt/prompt-protocol.js.map +1 -0
- package/esm/common/chat/prompt/prompt-template.d.ts +6 -0
- package/esm/common/chat/prompt/prompt-template.js +44 -0
- package/esm/common/chat/prompt/prompt-template.js.map +1 -0
- package/esm/common/chat/prompt/prompt.d.ts +13 -0
- package/esm/common/chat/prompt/prompt.js +52 -0
- package/esm/common/chat/prompt/prompt.js.map +1 -0
- package/esm/common/chat/tool/index.d.ts +2 -0
- package/esm/common/chat/tool/index.js +3 -0
- package/esm/common/chat/tool/index.js.map +1 -0
- package/esm/common/chat/tool/tool-handler.d.ts +11 -0
- package/esm/common/chat/tool/tool-handler.js +59 -0
- package/esm/common/chat/tool/tool-handler.js.map +1 -0
- package/esm/common/chat/tool/tool-protocol.d.ts +7 -0
- package/esm/common/chat/tool/tool-protocol.js +2 -0
- package/esm/common/chat/tool/tool-protocol.js.map +1 -0
- package/esm/common/embedding/embedding-protocol.d.ts +120 -0
- package/esm/common/embedding/embedding-protocol.js +56 -0
- package/esm/common/embedding/embedding-protocol.js.map +1 -0
- package/esm/common/embedding/index.d.ts +1 -0
- package/esm/common/embedding/index.js +2 -0
- package/esm/common/embedding/index.js.map +1 -0
- package/esm/common/error/error.d.ts +7 -0
- package/esm/common/error/error.js +12 -0
- package/esm/common/error/error.js.map +1 -0
- package/esm/common/error/index.d.ts +1 -0
- package/esm/common/error/index.js +2 -0
- package/esm/common/error/index.js.map +1 -0
- package/esm/common/index.d.ts +6 -0
- package/esm/common/index.js +7 -0
- package/esm/common/index.js.map +1 -0
- package/esm/common/model/function/function-callback-register.d.ts +8 -0
- package/esm/common/model/function/function-callback-register.js +45 -0
- package/esm/common/model/function/function-callback-register.js.map +1 -0
- package/esm/common/model/function/function-protocol.d.ts +75 -0
- package/esm/common/model/function/function-protocol.js +49 -0
- package/esm/common/model/function/function-protocol.js.map +1 -0
- package/esm/common/model/function/index.d.ts +2 -0
- package/esm/common/model/function/index.js +3 -0
- package/esm/common/model/function/index.js.map +1 -0
- package/esm/common/model/index.d.ts +2 -0
- package/esm/common/model/index.js +3 -0
- package/esm/common/model/index.js.map +1 -0
- package/esm/common/model/model-protocol.d.ts +164 -0
- package/esm/common/model/model-protocol.js +12 -0
- package/esm/common/model/model-protocol.js.map +1 -0
- package/esm/common/module.d.ts +3 -0
- package/esm/common/module.js +4 -0
- package/esm/common/module.js.map +1 -0
- package/esm/common/sse/index.d.ts +3 -0
- package/esm/common/sse/index.js +4 -0
- package/esm/common/sse/index.js.map +1 -0
- package/esm/common/sse/line-decoder.d.ts +14 -0
- package/esm/common/sse/line-decoder.js +51 -0
- package/esm/common/sse/line-decoder.js.map +1 -0
- package/esm/common/sse/sse-decoder.d.ts +26 -0
- package/esm/common/sse/sse-decoder.js +70 -0
- package/esm/common/sse/sse-decoder.js.map +1 -0
- package/esm/common/sse/sse-protocol.d.ts +22 -0
- package/esm/common/sse/sse-protocol.js +2 -0
- package/esm/common/sse/sse-protocol.js.map +1 -0
- package/esm/common/utils/index.d.ts +3 -0
- package/esm/common/utils/index.js +4 -0
- package/esm/common/utils/index.js.map +1 -0
- package/esm/common/utils/prompt-util.d.ts +4 -0
- package/esm/common/utils/prompt-util.js +7 -0
- package/esm/common/utils/prompt-util.js.map +1 -0
- package/esm/common/utils/sse-util.d.ts +10 -0
- package/esm/common/utils/sse-util.js +109 -0
- package/esm/common/utils/sse-util.js.map +1 -0
- package/esm/common/utils/usage-util.d.ts +16 -0
- package/esm/common/utils/usage-util.js +59 -0
- package/esm/common/utils/usage-util.js.map +1 -0
- package/esm/package.json +3 -0
- package/package.json +84 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/chat/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Media, Message, MessageType } from './message-protocol.js';
|
|
2
|
+
export declare abstract class AbstractMessage implements Message {
|
|
3
|
+
readonly messageType: MessageType;
|
|
4
|
+
readonly content: string;
|
|
5
|
+
readonly media: Media[];
|
|
6
|
+
readonly metadata: Record<string, any>;
|
|
7
|
+
static MESSAGE_TYPE: string;
|
|
8
|
+
constructor(messageType: MessageType, content: string, media?: Media[], metadata?: Record<string, any>);
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export class AbstractMessage {
|
|
2
|
+
constructor(messageType, content, media = [], metadata = {}) {
|
|
3
|
+
this.messageType = messageType;
|
|
4
|
+
this.content = content;
|
|
5
|
+
this.media = media;
|
|
6
|
+
this.metadata = metadata;
|
|
7
|
+
this.metadata[AbstractMessage.MESSAGE_TYPE] = messageType;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
AbstractMessage.MESSAGE_TYPE = 'messageType';
|
|
11
|
+
//# sourceMappingURL=abstract-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract-message.js","sourceRoot":"","sources":["../../../../src/common/chat/message/abstract-message.ts"],"names":[],"mappings":"AAEA,MAAM,OAAgB,eAAe;IAGjC,YACa,WAAwB,EACxB,OAAe,EACf,KAAK,GAAY,EAAE,EACnB,QAAQ,GAAwB,EAAE;2BAHlC,WAAW;uBACX,OAAO;qBACP,KAAK;wBACL,QAAQ;QACjB,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,GAAG,WAAW,CAAC;IAC9D,CAAC;CACJ;AATU,4BAAY,GAAG,aAAa,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AbstractMessage } from './abstract-message.js';
|
|
2
|
+
import { Media, ToolCall } from './message-protocol.js';
|
|
3
|
+
export declare class AssistantMessage extends AbstractMessage {
|
|
4
|
+
readonly content: string;
|
|
5
|
+
readonly media: Media[];
|
|
6
|
+
readonly metadata: Record<string, any>;
|
|
7
|
+
readonly toolCalls: ToolCall[];
|
|
8
|
+
constructor(content?: string, media?: Media[], metadata?: Record<string, any>, toolCalls?: ToolCall[]);
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AbstractMessage } from './abstract-message.js';
|
|
2
|
+
import { MessageType } from './message-protocol.js';
|
|
3
|
+
export class AssistantMessage extends AbstractMessage {
|
|
4
|
+
constructor(content = '', media = [], metadata = {}, toolCalls = []) {
|
|
5
|
+
super(MessageType.ASSISTANT, content, media, metadata);
|
|
6
|
+
this.content = content;
|
|
7
|
+
this.media = media;
|
|
8
|
+
this.metadata = metadata;
|
|
9
|
+
this.toolCalls = toolCalls;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=assistant-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant-message.js","sourceRoot":"","sources":["../../../../src/common/chat/message/assistant-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAS,WAAW,EAAY,MAAM,oBAAoB,CAAC;AAElE,MAAM,OAAO,gBAAiB,SAAQ,eAAe;IAEjD,YACsB,OAAO,GAAW,EAAE,EACpB,KAAK,GAAY,EAAE,EACnB,QAAQ,GAAwB,EAAE,EAC3C,SAAS,GAAe,EAAE;QAEnC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;uBALrC,OAAO;qBACP,KAAK;wBACL,QAAQ;yBACjB,SAAS;IAGtB,CAAC;CACJ"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AbstractMessage } from './abstract-message.js';
|
|
2
|
+
import { Media } from './message-protocol.js';
|
|
3
|
+
export declare class FunctionMessage extends AbstractMessage {
|
|
4
|
+
readonly content: string;
|
|
5
|
+
readonly media: Media[];
|
|
6
|
+
readonly metadata: Record<string, any>;
|
|
7
|
+
constructor(content: string, media?: Media[], metadata?: Record<string, any>);
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AbstractMessage } from './abstract-message.js';
|
|
2
|
+
import { MessageType } from './message-protocol.js';
|
|
3
|
+
export class FunctionMessage extends AbstractMessage {
|
|
4
|
+
constructor(content, media = [], metadata = {}) {
|
|
5
|
+
super(MessageType.FUNCTION, content, media, metadata);
|
|
6
|
+
this.content = content;
|
|
7
|
+
this.media = media;
|
|
8
|
+
this.metadata = metadata;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=function-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-message.js","sourceRoot":"","sources":["../../../../src/common/chat/message/function-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAS,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,OAAO,eAAgB,SAAQ,eAAe;IAEhD,YACsB,OAAe,EACf,KAAK,GAAY,EAAE,EACnB,QAAQ,GAAwB,EAAE;QACpD,KAAK,CAAC,WAAW,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;uBAHpC,OAAO;qBACP,KAAK;wBACL,QAAQ;IAE9B,CAAC;CACJ"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './message-protocol.js';
|
|
2
|
+
export * from './abstract-message.js';
|
|
3
|
+
export * from './user-message.js';
|
|
4
|
+
export * from './system-message.js';
|
|
5
|
+
export * from './assistant-message.js';
|
|
6
|
+
export * from './function-message.js';
|
|
7
|
+
export * from './tool-response-message.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './message-protocol.js';
|
|
2
|
+
export * from './abstract-message.js';
|
|
3
|
+
export * from './user-message.js';
|
|
4
|
+
export * from './system-message.js';
|
|
5
|
+
export * from './assistant-message.js';
|
|
6
|
+
export * from './function-message.js';
|
|
7
|
+
export * from './tool-response-message.js';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/chat/message/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Content } from '../../model/model-protocol.js';
|
|
2
|
+
import { MimeType } from '@celljs/core';
|
|
3
|
+
/**
|
|
4
|
+
* The Media class represents the data and metadata of a media attachment in a message. It
|
|
5
|
+
* consists of a MIME type and the raw data.
|
|
6
|
+
*
|
|
7
|
+
* This class is used as a parameter in the constructor of the UserMessage class.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export interface Media {
|
|
11
|
+
/**
|
|
12
|
+
* The unique identifier of the media attachment.
|
|
13
|
+
*/
|
|
14
|
+
id?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The MIME type of the media attachment.
|
|
17
|
+
*/
|
|
18
|
+
mimeType: MimeType;
|
|
19
|
+
/**
|
|
20
|
+
* The raw data of the media attachment.
|
|
21
|
+
*/
|
|
22
|
+
data: any;
|
|
23
|
+
/**
|
|
24
|
+
* The name of the media object that can be referenced by the AI model.
|
|
25
|
+
* <p>
|
|
26
|
+
* Important security note: This field is vulnerable to prompt injections, as the
|
|
27
|
+
* model might inadvertently interpret it as instructions. It is recommended to
|
|
28
|
+
* specify neutral names.
|
|
29
|
+
*
|
|
30
|
+
* <p>
|
|
31
|
+
* The name must only contain:
|
|
32
|
+
* <ul>
|
|
33
|
+
* <li>Alphanumeric characters
|
|
34
|
+
* <li>Whitespace characters (no more than one in a row)
|
|
35
|
+
* <li>Hyphens
|
|
36
|
+
* <li>Parentheses
|
|
37
|
+
* <li>Square brackets
|
|
38
|
+
* </ul>
|
|
39
|
+
*/
|
|
40
|
+
name?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The MessageType enum represents the type of a message in a chat application. It can be
|
|
44
|
+
* one of the following: USER, ASSISTANT, SYSTEM, FUNCTION.
|
|
45
|
+
*/
|
|
46
|
+
export declare enum MessageType {
|
|
47
|
+
USER = "user",
|
|
48
|
+
ASSISTANT = "assistant",
|
|
49
|
+
SYSTEM = "system",
|
|
50
|
+
FUNCTION = "function",
|
|
51
|
+
TOOL = "tool"
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The Message interface represents a message that can be sent or received in a chat
|
|
55
|
+
* application. Messages can have content, media attachments, properties, and message
|
|
56
|
+
* types.
|
|
57
|
+
*
|
|
58
|
+
* @see Media
|
|
59
|
+
* @see MessageType
|
|
60
|
+
*/
|
|
61
|
+
export interface Message extends Content {
|
|
62
|
+
messageType: MessageType;
|
|
63
|
+
}
|
|
64
|
+
export declare namespace Message {
|
|
65
|
+
function isMessage(obj: any): obj is Message;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Represents a tool call.
|
|
69
|
+
*/
|
|
70
|
+
export interface ToolCall {
|
|
71
|
+
/**
|
|
72
|
+
* The unique identifier for the tool call.
|
|
73
|
+
*/
|
|
74
|
+
id: string;
|
|
75
|
+
/**
|
|
76
|
+
* The type of the tool.
|
|
77
|
+
*/
|
|
78
|
+
type: string;
|
|
79
|
+
/**
|
|
80
|
+
* The name of the tool.
|
|
81
|
+
*/
|
|
82
|
+
name: string;
|
|
83
|
+
/**
|
|
84
|
+
* The arguments passed to the tool.
|
|
85
|
+
*/
|
|
86
|
+
arguments: string;
|
|
87
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The MessageType enum represents the type of a message in a chat application. It can be
|
|
3
|
+
* one of the following: USER, ASSISTANT, SYSTEM, FUNCTION.
|
|
4
|
+
*/
|
|
5
|
+
export var MessageType;
|
|
6
|
+
(function (MessageType) {
|
|
7
|
+
MessageType["USER"] = "user";
|
|
8
|
+
MessageType["ASSISTANT"] = "assistant";
|
|
9
|
+
MessageType["SYSTEM"] = "system";
|
|
10
|
+
MessageType["FUNCTION"] = "function";
|
|
11
|
+
MessageType["TOOL"] = "tool";
|
|
12
|
+
})(MessageType || (MessageType = {}));
|
|
13
|
+
export var Message;
|
|
14
|
+
(function (Message) {
|
|
15
|
+
function isMessage(obj) {
|
|
16
|
+
return obj && obj.messageType !== undefined;
|
|
17
|
+
}
|
|
18
|
+
Message.isMessage = isMessage;
|
|
19
|
+
})(Message || (Message = {}));
|
|
20
|
+
//# sourceMappingURL=message-protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-protocol.js","sourceRoot":"","sources":["../../../../src/common/chat/message/message-protocol.ts"],"names":[],"mappings":"AAgDA;;;GAGG;AACH,MAAM,CAAN,IAAY,WAMX;AAND,WAAY,WAAW;IACnB,4BAAa,CAAA;IACb,sCAAuB,CAAA;IACvB,gCAAiB,CAAA;IACjB,oCAAqB,CAAA;IACrB,4BAAa,CAAA;AACjB,CAAC,EANW,WAAW,KAAX,WAAW,QAMtB;AAcD,MAAM,KAAW,OAAO,CAIvB;AAJD,WAAiB,OAAO;IACpB,SAAgB,SAAS,CAAC,GAAQ;QAC9B,OAAO,GAAG,IAAI,GAAG,CAAC,WAAW,KAAK,SAAS,CAAC;IAChD,CAAC;IAFe,QAAA,SAAS,YAExB,CAAA;AACL,CAAC,EAJgB,OAAO,KAAP,OAAO,QAIvB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AbstractMessage } from './abstract-message.js';
|
|
2
|
+
import { Media } from './message-protocol.js';
|
|
3
|
+
export declare class SystemMessage extends AbstractMessage {
|
|
4
|
+
readonly content: string;
|
|
5
|
+
readonly media: Media[];
|
|
6
|
+
readonly metadata: Record<string, any>;
|
|
7
|
+
constructor(content: string, media?: Media[], metadata?: Record<string, any>);
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AbstractMessage } from './abstract-message.js';
|
|
2
|
+
import { MessageType } from './message-protocol.js';
|
|
3
|
+
export class SystemMessage extends AbstractMessage {
|
|
4
|
+
constructor(content, media = [], metadata = {}) {
|
|
5
|
+
super(MessageType.SYSTEM, content, media, metadata);
|
|
6
|
+
this.content = content;
|
|
7
|
+
this.media = media;
|
|
8
|
+
this.metadata = metadata;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=system-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-message.js","sourceRoot":"","sources":["../../../../src/common/chat/message/system-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAS,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,OAAO,aAAc,SAAQ,eAAe;IAE9C,YACsB,OAAe,EACf,KAAK,GAAY,EAAE,EACnB,QAAQ,GAAwB,EAAE;QACpD,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;uBAHlC,OAAO;qBACP,KAAK;wBACL,QAAQ;IAE9B,CAAC;CACJ"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AbstractMessage } from './abstract-message.js';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a tool response.
|
|
4
|
+
*/
|
|
5
|
+
export interface ToolResponse {
|
|
6
|
+
/**
|
|
7
|
+
* The unique identifier for the tool.
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* The name of the tool.
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
14
|
+
/**
|
|
15
|
+
* The response data from the tool.
|
|
16
|
+
*/
|
|
17
|
+
responseData: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The ToolResponseMessage class represents a message with a function content in a chat
|
|
21
|
+
* application.
|
|
22
|
+
*/
|
|
23
|
+
export declare class ToolResponseMessage extends AbstractMessage {
|
|
24
|
+
readonly responses: ToolResponse[];
|
|
25
|
+
/**
|
|
26
|
+
* Creates an instance of ToolResponseMessage.
|
|
27
|
+
* @param responses The list of tool responses.
|
|
28
|
+
* @param metadata Additional metadata.
|
|
29
|
+
*/
|
|
30
|
+
constructor(responses: ToolResponse[], metadata?: Record<string, any>);
|
|
31
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AbstractMessage } from './abstract-message.js';
|
|
2
|
+
import { MessageType } from './message-protocol.js';
|
|
3
|
+
/**
|
|
4
|
+
* The ToolResponseMessage class represents a message with a function content in a chat
|
|
5
|
+
* application.
|
|
6
|
+
*/
|
|
7
|
+
export class ToolResponseMessage extends AbstractMessage {
|
|
8
|
+
/**
|
|
9
|
+
* Creates an instance of ToolResponseMessage.
|
|
10
|
+
* @param responses The list of tool responses.
|
|
11
|
+
* @param metadata Additional metadata.
|
|
12
|
+
*/
|
|
13
|
+
constructor(responses, metadata = {}) {
|
|
14
|
+
super(MessageType.TOOL, '', [], metadata);
|
|
15
|
+
this.responses = responses;
|
|
16
|
+
this.responses = responses;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=tool-response-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-response-message.js","sourceRoot":"","sources":["../../../../src/common/chat/message/tool-response-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAsBjD;;;GAGG;AACH,MAAM,OAAO,mBAAoB,SAAQ,eAAe;IAEpD;;;;OAIG;IACH,YACa,SAAyB,EAAE,QAAQ,GAAwB,EAAE;QACtE,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAC;yBADjC,SAAS;QAElB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;CACJ"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AbstractMessage } from './abstract-message.js';
|
|
2
|
+
import { Media } from './message-protocol.js';
|
|
3
|
+
export declare class UserMessage extends AbstractMessage {
|
|
4
|
+
readonly content: string;
|
|
5
|
+
readonly media: Media[];
|
|
6
|
+
readonly metadata: Record<string, any>;
|
|
7
|
+
constructor(content: string, media?: Media[], metadata?: Record<string, any>);
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AbstractMessage } from './abstract-message.js';
|
|
2
|
+
import { MessageType } from './message-protocol.js';
|
|
3
|
+
export class UserMessage extends AbstractMessage {
|
|
4
|
+
constructor(content, media = [], metadata = {}) {
|
|
5
|
+
super(MessageType.USER, content, media, metadata);
|
|
6
|
+
this.content = content;
|
|
7
|
+
this.media = media;
|
|
8
|
+
this.metadata = metadata;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=user-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-message.js","sourceRoot":"","sources":["../../../../src/common/chat/message/user-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAS,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,OAAO,WAAY,SAAQ,eAAe;IAE5C,YACsB,OAAe,EACf,KAAK,GAAY,EAAE,EACnB,QAAQ,GAAwB,EAAE;QACpD,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;uBAHhC,OAAO;qBACP,KAAK;wBACL,QAAQ;IAE9B,CAAC;CACJ"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ResultMetadata } from '../../model/model-protocol.js';
|
|
2
|
+
/**
|
|
3
|
+
* Abstract Data Type (ADT) encapsulating information on the completion choices in the AI
|
|
4
|
+
* response.
|
|
5
|
+
*/
|
|
6
|
+
export interface ChatGenerationMetadata extends ResultMetadata {
|
|
7
|
+
/**
|
|
8
|
+
* The reason this choice completed for the generation.
|
|
9
|
+
*/
|
|
10
|
+
readonly contentFilterMetadata?: any;
|
|
11
|
+
/**
|
|
12
|
+
* The reason this choice completed for the generation.
|
|
13
|
+
*/
|
|
14
|
+
readonly finishReason?: string;
|
|
15
|
+
readonly metadata: Record<string, any>;
|
|
16
|
+
}
|
|
17
|
+
export declare class ChatGenerationMetadata {
|
|
18
|
+
/**
|
|
19
|
+
* Factory method used to construct a new {@link ChatGenerationMetadata} from the
|
|
20
|
+
* given finish reason and content filter metadata.
|
|
21
|
+
*
|
|
22
|
+
* @param finishReason The reason for completion.
|
|
23
|
+
* @param contentFilterMetadata The content filter metadata.
|
|
24
|
+
* @returns A new instance of {@link ChatGenerationMetadata}.
|
|
25
|
+
*/
|
|
26
|
+
static from(finishReason?: string, metadata?: Record<string, any>, contentFilterMetadata?: any): ChatGenerationMetadata;
|
|
27
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export class ChatGenerationMetadata {
|
|
2
|
+
/**
|
|
3
|
+
* Factory method used to construct a new {@link ChatGenerationMetadata} from the
|
|
4
|
+
* given finish reason and content filter metadata.
|
|
5
|
+
*
|
|
6
|
+
* @param finishReason The reason for completion.
|
|
7
|
+
* @param contentFilterMetadata The content filter metadata.
|
|
8
|
+
* @returns A new instance of {@link ChatGenerationMetadata}.
|
|
9
|
+
*/
|
|
10
|
+
static from(finishReason, metadata = {}, contentFilterMetadata) {
|
|
11
|
+
return {
|
|
12
|
+
finishReason, contentFilterMetadata, metadata
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=chat-generation-metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-generation-metadata.js","sourceRoot":"","sources":["../../../../src/common/chat/metadata/chat-generation-metadata.ts"],"names":[],"mappings":"AAqBA,MAAM,OAAO,sBAAsB;IAE/B;;;;;;;OAOG;IACH,MAAM,CAAC,IAAI,CAAC,YAAqB,EAAE,QAAQ,GAAwB,EAAE,EAAE,qBAA2B;QAC9F,OAAO;YACH,YAAY,EAAE,qBAAqB,EAAE,QAAQ;SAChD,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/chat/metadata/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { ResponseMetadata } from '../../model/model-protocol.js';
|
|
2
|
+
/**
|
|
3
|
+
* Abstract Data Type (ADT) encapsulating metadata on the usage of an AI provider's API
|
|
4
|
+
* per AI request.
|
|
5
|
+
*/
|
|
6
|
+
export interface Usage {
|
|
7
|
+
/**
|
|
8
|
+
* The number of tokens used in the prompt of the AI request.
|
|
9
|
+
*/
|
|
10
|
+
readonly promptTokens?: number;
|
|
11
|
+
/**
|
|
12
|
+
* The number of tokens returned in the generation (aka completion)
|
|
13
|
+
* of the AI's response.
|
|
14
|
+
*/
|
|
15
|
+
readonly generationTokens?: number;
|
|
16
|
+
/**
|
|
17
|
+
* The total number of tokens from both the prompt of an AI request
|
|
18
|
+
* and generation of the AI's response.
|
|
19
|
+
*/
|
|
20
|
+
readonly totalTokens?: number;
|
|
21
|
+
}
|
|
22
|
+
export declare namespace Usage {
|
|
23
|
+
function createEmpty(): Usage;
|
|
24
|
+
function from(promptTokens?: number, generationTokens?: number, totalTokens?: number): Usage;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Abstract Data Type (ADT) encapsulating metadata from an AI provider's API rate limits
|
|
28
|
+
* granted to the API key in use and the API key's current balance.
|
|
29
|
+
*/
|
|
30
|
+
export interface RateLimit {
|
|
31
|
+
/**
|
|
32
|
+
* The maximum number of requests that are permitted before exhausting the
|
|
33
|
+
* rate limit.
|
|
34
|
+
*/
|
|
35
|
+
readonly requestsLimit?: number;
|
|
36
|
+
/**
|
|
37
|
+
* The remaining number of requests that are permitted before exhausting the
|
|
38
|
+
* requestsLimit rate limit.
|
|
39
|
+
*/
|
|
40
|
+
readonly requestsRemaining?: number;
|
|
41
|
+
/**
|
|
42
|
+
* The duration time until the rate limit (based on requests) resets
|
|
43
|
+
* to its requestsLimit initial state.
|
|
44
|
+
*/
|
|
45
|
+
readonly requestsReset?: number;
|
|
46
|
+
/**
|
|
47
|
+
* The maximum number of tokens that are permitted before exhausting the rate
|
|
48
|
+
* limit.
|
|
49
|
+
*/
|
|
50
|
+
readonly tokensLimit?: number;
|
|
51
|
+
/**
|
|
52
|
+
* The remaining number of tokens that are permitted before exhausting the
|
|
53
|
+
* tokensLimit rate limit.
|
|
54
|
+
*/
|
|
55
|
+
readonly tokensRemaining?: number;
|
|
56
|
+
/**
|
|
57
|
+
* The duration time until the rate limit (based on tokens) resets to
|
|
58
|
+
* its tokensLimit initial state.
|
|
59
|
+
*/
|
|
60
|
+
readonly tokensReset?: number;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Abstract Data Type (ADT) modeling filter metadata for all prompts sent during an AI
|
|
64
|
+
* request.
|
|
65
|
+
*/
|
|
66
|
+
export interface PromptFilterMetadata<T = any> {
|
|
67
|
+
/**
|
|
68
|
+
* Index of the prompt filter metadata contained in the AI response.
|
|
69
|
+
*/
|
|
70
|
+
readonly promptIndex: number;
|
|
71
|
+
/**
|
|
72
|
+
* Returns the underlying AI provider metadata for filtering applied to prompt
|
|
73
|
+
* content.
|
|
74
|
+
* @param <T> {@link Class Type} used to cast the filtered content metadata into
|
|
75
|
+
* the AI provider-specific type.
|
|
76
|
+
* @return the underlying AI provider metadata for filtering applied to prompt
|
|
77
|
+
* content.
|
|
78
|
+
*/
|
|
79
|
+
readonly contentFilterMetadata: T;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Abstract Data Type (ADT) modeling metadata gathered by the AI during request
|
|
83
|
+
* processing.
|
|
84
|
+
*/
|
|
85
|
+
export type PromptMetadata = PromptFilterMetadata[];
|
|
86
|
+
export declare namespace PromptMetadata {
|
|
87
|
+
/**
|
|
88
|
+
* Returns an Optional {@link PromptFilterMetadata} at the given index.
|
|
89
|
+
* @param promptIndex index of the {@link PromptFilterMetadata} contained in this
|
|
90
|
+
* {@link PromptMetadata}.
|
|
91
|
+
* @return Optional {@link PromptFilterMetadata} at the given index.
|
|
92
|
+
* @throws IllegalArgumentError if the prompt index is less than 0.
|
|
93
|
+
*/
|
|
94
|
+
function findByPromptIndex(promptMetadata: PromptMetadata, promptIndex: number): PromptFilterMetadata | undefined;
|
|
95
|
+
}
|
|
96
|
+
export declare namespace RateLimit {
|
|
97
|
+
function createEmpty(): RateLimit;
|
|
98
|
+
}
|
|
99
|
+
export interface ChatResponseMetadata extends ResponseMetadata {
|
|
100
|
+
id?: string;
|
|
101
|
+
model?: string;
|
|
102
|
+
/**
|
|
103
|
+
* AI provider specific metadata on rate limits.
|
|
104
|
+
* @see RateLimit
|
|
105
|
+
*/
|
|
106
|
+
rateLimit: RateLimit;
|
|
107
|
+
/**
|
|
108
|
+
* AI provider specific metadata on API usage.
|
|
109
|
+
* @see Usage
|
|
110
|
+
*/
|
|
111
|
+
usage: Usage;
|
|
112
|
+
promptMetadata: PromptMetadata;
|
|
113
|
+
}
|
|
114
|
+
export declare class ChatResponseMetadataBuilder {
|
|
115
|
+
private readonly chatResponseMetadata;
|
|
116
|
+
id(id: string): ChatResponseMetadataBuilder;
|
|
117
|
+
model(model: string): ChatResponseMetadataBuilder;
|
|
118
|
+
rateLimit(rateLimit: RateLimit): ChatResponseMetadataBuilder;
|
|
119
|
+
usage(usage: Usage): ChatResponseMetadataBuilder;
|
|
120
|
+
promptMetadata(promptMetadata: PromptMetadata): ChatResponseMetadataBuilder;
|
|
121
|
+
keyValue(key: string, value: any): ChatResponseMetadataBuilder;
|
|
122
|
+
build(): ChatResponseMetadata;
|
|
123
|
+
}
|
|
124
|
+
export declare namespace ChatResponseMetadata {
|
|
125
|
+
function createEmpty(): ChatResponseMetadata;
|
|
126
|
+
function builder(): ChatResponseMetadataBuilder;
|
|
127
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { IllegalArgumentError } from '@celljs/core';
|
|
2
|
+
export var Usage;
|
|
3
|
+
(function (Usage) {
|
|
4
|
+
function createEmpty() {
|
|
5
|
+
return { promptTokens: 0, generationTokens: 0, totalTokens: 0 };
|
|
6
|
+
}
|
|
7
|
+
Usage.createEmpty = createEmpty;
|
|
8
|
+
function from(promptTokens = 0, generationTokens = 0, totalTokens = 0) {
|
|
9
|
+
return { promptTokens, generationTokens, totalTokens: totalTokens ? totalTokens : promptTokens + generationTokens };
|
|
10
|
+
}
|
|
11
|
+
Usage.from = from;
|
|
12
|
+
})(Usage || (Usage = {}));
|
|
13
|
+
export var PromptMetadata;
|
|
14
|
+
(function (PromptMetadata) {
|
|
15
|
+
/**
|
|
16
|
+
* Returns an Optional {@link PromptFilterMetadata} at the given index.
|
|
17
|
+
* @param promptIndex index of the {@link PromptFilterMetadata} contained in this
|
|
18
|
+
* {@link PromptMetadata}.
|
|
19
|
+
* @return Optional {@link PromptFilterMetadata} at the given index.
|
|
20
|
+
* @throws IllegalArgumentError if the prompt index is less than 0.
|
|
21
|
+
*/
|
|
22
|
+
function findByPromptIndex(promptMetadata, promptIndex) {
|
|
23
|
+
if (promptIndex < 0) {
|
|
24
|
+
throw new IllegalArgumentError(`Prompt index [${promptIndex}] must be greater than equal to 0`);
|
|
25
|
+
}
|
|
26
|
+
return promptMetadata.find(promptFilterMetadata => promptFilterMetadata.promptIndex === promptIndex);
|
|
27
|
+
}
|
|
28
|
+
PromptMetadata.findByPromptIndex = findByPromptIndex;
|
|
29
|
+
})(PromptMetadata || (PromptMetadata = {}));
|
|
30
|
+
export var RateLimit;
|
|
31
|
+
(function (RateLimit) {
|
|
32
|
+
function createEmpty() {
|
|
33
|
+
return { requestsLimit: 0, requestsRemaining: 0, requestsReset: 0, tokensLimit: 0, tokensRemaining: 0, tokensReset: 0 };
|
|
34
|
+
}
|
|
35
|
+
RateLimit.createEmpty = createEmpty;
|
|
36
|
+
})(RateLimit || (RateLimit = {}));
|
|
37
|
+
export class ChatResponseMetadataBuilder {
|
|
38
|
+
constructor() {
|
|
39
|
+
this.chatResponseMetadata = ChatResponseMetadata.createEmpty();
|
|
40
|
+
}
|
|
41
|
+
id(id) {
|
|
42
|
+
this.chatResponseMetadata.id = id;
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
45
|
+
model(model) {
|
|
46
|
+
this.chatResponseMetadata.model = model;
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
rateLimit(rateLimit) {
|
|
50
|
+
this.chatResponseMetadata.rateLimit = rateLimit;
|
|
51
|
+
return this;
|
|
52
|
+
}
|
|
53
|
+
usage(usage) {
|
|
54
|
+
this.chatResponseMetadata.usage = usage;
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
promptMetadata(promptMetadata) {
|
|
58
|
+
this.chatResponseMetadata.promptMetadata = promptMetadata;
|
|
59
|
+
return this;
|
|
60
|
+
}
|
|
61
|
+
keyValue(key, value) {
|
|
62
|
+
if (!key) {
|
|
63
|
+
throw new IllegalArgumentError('Key must not be empty');
|
|
64
|
+
}
|
|
65
|
+
if (value) {
|
|
66
|
+
this.chatResponseMetadata.extra[key] = value;
|
|
67
|
+
}
|
|
68
|
+
return this;
|
|
69
|
+
}
|
|
70
|
+
build() {
|
|
71
|
+
return this.chatResponseMetadata;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export var ChatResponseMetadata;
|
|
75
|
+
(function (ChatResponseMetadata) {
|
|
76
|
+
function createEmpty() {
|
|
77
|
+
return {
|
|
78
|
+
id: '',
|
|
79
|
+
model: '',
|
|
80
|
+
rateLimit: RateLimit.createEmpty(),
|
|
81
|
+
usage: Usage.createEmpty(),
|
|
82
|
+
promptMetadata: [],
|
|
83
|
+
extra: {}
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
ChatResponseMetadata.createEmpty = createEmpty;
|
|
87
|
+
function builder() {
|
|
88
|
+
return new ChatResponseMetadataBuilder();
|
|
89
|
+
}
|
|
90
|
+
ChatResponseMetadata.builder = builder;
|
|
91
|
+
})(ChatResponseMetadata || (ChatResponseMetadata = {}));
|
|
92
|
+
//# sourceMappingURL=metadata-protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata-protocol.js","sourceRoot":"","sources":["../../../../src/common/chat/metadata/metadata-protocol.ts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