@wabot-dev/framework 0.1.0-beta.32 → 0.1.0-beta.34
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/src/addon/chat-bot/claude/ClaudeChatAdapter.js +14 -2
- package/dist/src/addon/chat-bot/deepseek/DeepSeekChatAdapter.js +14 -2
- package/dist/src/addon/chat-bot/gemini/GeminiChatAdapter.js +125 -0
- package/dist/src/addon/chat-bot/openia/OpenaiChatAdapter.js +14 -4
- package/dist/src/core/validation/validators/validateArray.js +10 -0
- package/dist/src/core/validation/validators/validateModel.js +3 -1
- package/dist/src/feature/chat-bot/ChatAdapter.js +1 -1
- package/dist/src/feature/chat-bot/ChatBot.js +1 -1
- package/dist/src/index.d.ts +32 -6
- package/dist/src/index.js +1 -0
- package/dist/src/node_modules/@google/genai/dist/index.js +18560 -0
- package/package.json +2 -1
|
@@ -94,12 +94,13 @@ class ClaudeChatAdapter {
|
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
mapResponse(response) {
|
|
97
|
+
let chatItem;
|
|
97
98
|
const content = response.content[0];
|
|
98
99
|
if (content.type === 'text') {
|
|
99
|
-
|
|
100
|
+
chatItem = { type: 'botMessage', botMessage: { text: content.text } };
|
|
100
101
|
}
|
|
101
102
|
else if (content.type === 'tool_use') {
|
|
102
|
-
|
|
103
|
+
chatItem = {
|
|
103
104
|
type: 'functionCall',
|
|
104
105
|
functionCall: {
|
|
105
106
|
id: content.id,
|
|
@@ -111,6 +112,17 @@ class ClaudeChatAdapter {
|
|
|
111
112
|
else {
|
|
112
113
|
throw new Error('Not supported Claude Response');
|
|
113
114
|
}
|
|
115
|
+
let usage;
|
|
116
|
+
if (response.usage) {
|
|
117
|
+
usage = {
|
|
118
|
+
inputTokens: response.usage.input_tokens,
|
|
119
|
+
outputTokens: response.usage.output_tokens,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
throw new Error('Unable to found usage info');
|
|
124
|
+
}
|
|
125
|
+
return { chatItem, usage };
|
|
114
126
|
}
|
|
115
127
|
}
|
|
116
128
|
|
|
@@ -102,12 +102,13 @@ class DeepSeekChatAdapter {
|
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
mapResponse(response) {
|
|
105
|
+
let chatItem;
|
|
105
106
|
const { tool_calls: responseFunctionCall, content: responseText } = response.choices?.[0]?.message ?? {};
|
|
106
107
|
if (responseText) {
|
|
107
|
-
|
|
108
|
+
chatItem = { type: 'botMessage', botMessage: { text: responseText } };
|
|
108
109
|
}
|
|
109
110
|
else if (responseFunctionCall && responseFunctionCall[0]?.type === 'function') {
|
|
110
|
-
|
|
111
|
+
chatItem = {
|
|
111
112
|
type: 'functionCall',
|
|
112
113
|
functionCall: {
|
|
113
114
|
id: responseFunctionCall[0].id,
|
|
@@ -119,6 +120,17 @@ class DeepSeekChatAdapter {
|
|
|
119
120
|
else {
|
|
120
121
|
throw new Error('Not supported DeepSeek Response');
|
|
121
122
|
}
|
|
123
|
+
let usage;
|
|
124
|
+
if (response.usage) {
|
|
125
|
+
usage = {
|
|
126
|
+
inputTokens: response.usage.prompt_tokens,
|
|
127
|
+
outputTokens: response.usage.completion_tokens,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
throw new Error('Unable to found usage info');
|
|
132
|
+
}
|
|
133
|
+
return { chatItem, usage };
|
|
122
134
|
}
|
|
123
135
|
}
|
|
124
136
|
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { Logger } from '../../../core/logger/Logger.js';
|
|
2
|
+
import { GoogleGenAI } from '../../../node_modules/@google/genai/dist/index.js';
|
|
3
|
+
|
|
4
|
+
const SUPPORTED_MODELS = [
|
|
5
|
+
'gemini-2.0-flash-exp',
|
|
6
|
+
'gemini-1.5-flash',
|
|
7
|
+
'gemini-1.5-pro',
|
|
8
|
+
'gemini-pro',
|
|
9
|
+
];
|
|
10
|
+
const DEFAULT_MODEL = 'gemini-1.5-flash';
|
|
11
|
+
class GeminiChatAdapter {
|
|
12
|
+
genai;
|
|
13
|
+
model;
|
|
14
|
+
logger = new Logger('wabot:gemini-chat-adapter');
|
|
15
|
+
constructor() {
|
|
16
|
+
const apiKey = process.env.GEMINI_API_KEY;
|
|
17
|
+
if (!apiKey) {
|
|
18
|
+
throw new Error('GEMINI_API_KEY env variable is required');
|
|
19
|
+
}
|
|
20
|
+
this.model = process.env.GEMINI_MODEL || DEFAULT_MODEL;
|
|
21
|
+
this.validateModel(this.model);
|
|
22
|
+
this.genai = new GoogleGenAI({ apiKey });
|
|
23
|
+
}
|
|
24
|
+
validateModel(model) {
|
|
25
|
+
if (!SUPPORTED_MODELS.includes(model)) {
|
|
26
|
+
throw new Error(`Unsupported Gemini model: ${model}. Supported models: ${SUPPORTED_MODELS.join(', ')}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
async nextItem(req) {
|
|
30
|
+
const contents = this.buildContents(req.prevItems, req.systemPrompt);
|
|
31
|
+
const tools = req.tools.length > 0 ? req.tools.map(this.mapTool) : undefined;
|
|
32
|
+
const request = { model: this.model, contents, tools };
|
|
33
|
+
this.logger.debug(`Call Gemini API with Request: ${JSON.stringify(request)}`);
|
|
34
|
+
const response = await this.genai.models.generateContent(request);
|
|
35
|
+
return this.mapResponse(response);
|
|
36
|
+
}
|
|
37
|
+
buildContents(chatItems, systemPrompt) {
|
|
38
|
+
const contents = [];
|
|
39
|
+
if (systemPrompt) {
|
|
40
|
+
contents.push({ role: 'user', parts: [{ text: systemPrompt }] }, { role: 'model', parts: [{ text: 'I understand. I will follow these instructions.' }] });
|
|
41
|
+
}
|
|
42
|
+
chatItems.forEach(chatItem => {
|
|
43
|
+
switch (chatItem.type) {
|
|
44
|
+
case 'humanMessage':
|
|
45
|
+
this.validateMessageContent(chatItem.humanMessage.text, 'User');
|
|
46
|
+
contents.push({ role: 'user', parts: [{ text: chatItem.humanMessage.text }] });
|
|
47
|
+
break;
|
|
48
|
+
case 'botMessage':
|
|
49
|
+
this.validateMessageContent(chatItem.botMessage.text, 'Assistant');
|
|
50
|
+
contents.push({ role: 'model', parts: [{ text: chatItem.botMessage.text }] });
|
|
51
|
+
break;
|
|
52
|
+
case 'functionCall':
|
|
53
|
+
contents.push(...this.mapFunctionCall(chatItem.functionCall));
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
return contents;
|
|
58
|
+
}
|
|
59
|
+
validateMessageContent(text, messageType) {
|
|
60
|
+
if (!text) {
|
|
61
|
+
throw new Error(`${messageType} message content is empty`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
mapFunctionCall(item) {
|
|
65
|
+
const args = JSON.parse(item.arguments || '{}');
|
|
66
|
+
return [
|
|
67
|
+
{
|
|
68
|
+
role: 'model',
|
|
69
|
+
parts: [{ functionCall: { name: item.name, args } }],
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
role: 'user',
|
|
73
|
+
parts: [{ functionResponse: { name: item.name, response: { result: item.result || 'No result' } } }],
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
}
|
|
77
|
+
mapTool = (tool) => ({
|
|
78
|
+
functionDeclarations: [{
|
|
79
|
+
name: tool.name,
|
|
80
|
+
description: tool.description,
|
|
81
|
+
parameters: {
|
|
82
|
+
type: 'object',
|
|
83
|
+
properties: tool.parameters.reduce((acc, param) => ({ ...acc, [param.name]: { type: param.type, description: param.description } }), {}),
|
|
84
|
+
required: tool.parameters.map(param => param.name),
|
|
85
|
+
},
|
|
86
|
+
}],
|
|
87
|
+
});
|
|
88
|
+
mapResponse(response) {
|
|
89
|
+
this.validateResponse(response);
|
|
90
|
+
const part = response.response.candidates[0].content.parts[0];
|
|
91
|
+
const chatItem = part.text
|
|
92
|
+
? { type: 'botMessage', botMessage: { text: part.text } }
|
|
93
|
+
: part.functionCall
|
|
94
|
+
? {
|
|
95
|
+
type: 'functionCall',
|
|
96
|
+
functionCall: {
|
|
97
|
+
id: `gemini_${Date.now()}`,
|
|
98
|
+
name: part.functionCall.name,
|
|
99
|
+
arguments: JSON.stringify(part.functionCall.args || {}),
|
|
100
|
+
},
|
|
101
|
+
}
|
|
102
|
+
: (() => { throw new Error('Not supported Gemini Response'); })();
|
|
103
|
+
const usage = {
|
|
104
|
+
inputTokens: response.response.usageMetadata?.promptTokenCount || 0,
|
|
105
|
+
outputTokens: response.response.usageMetadata?.candidatesTokenCount || 0,
|
|
106
|
+
};
|
|
107
|
+
if (!response.response.usageMetadata) {
|
|
108
|
+
throw new Error('Unable to found usage info');
|
|
109
|
+
}
|
|
110
|
+
return { chatItem, usage };
|
|
111
|
+
}
|
|
112
|
+
validateResponse(response) {
|
|
113
|
+
if (!response.response) {
|
|
114
|
+
throw new Error('Invalid Gemini response structure');
|
|
115
|
+
}
|
|
116
|
+
if (!response.response.candidates?.[0]) {
|
|
117
|
+
throw new Error('No candidates in Gemini response');
|
|
118
|
+
}
|
|
119
|
+
if (!response.response.candidates[0].content?.parts?.[0]) {
|
|
120
|
+
throw new Error('No parts in Gemini response');
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export { GeminiChatAdapter };
|
|
@@ -77,12 +77,12 @@ class OpenaiChatAdapter {
|
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
mapResponse(response) {
|
|
80
|
-
let
|
|
80
|
+
let chatItem;
|
|
81
81
|
if (response.output_text) {
|
|
82
|
-
|
|
82
|
+
chatItem = { type: 'botMessage', botMessage: { text: response.output_text } };
|
|
83
83
|
}
|
|
84
84
|
else if (response.output && response.output[0]?.type == 'function_call') {
|
|
85
|
-
|
|
85
|
+
chatItem = {
|
|
86
86
|
type: 'functionCall',
|
|
87
87
|
functionCall: {
|
|
88
88
|
id: response.output[0].call_id,
|
|
@@ -94,7 +94,17 @@ class OpenaiChatAdapter {
|
|
|
94
94
|
else {
|
|
95
95
|
throw new Error('Not supported OpenIA Response');
|
|
96
96
|
}
|
|
97
|
-
|
|
97
|
+
let usage;
|
|
98
|
+
if (response.usage) {
|
|
99
|
+
usage = {
|
|
100
|
+
inputTokens: response.usage.input_tokens,
|
|
101
|
+
outputTokens: response.usage.output_tokens,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
throw new Error('Unable to found usage info');
|
|
106
|
+
}
|
|
107
|
+
return { chatItem, usage };
|
|
98
108
|
}
|
|
99
109
|
}
|
|
100
110
|
|
|
@@ -4,6 +4,16 @@ function validateArray(value, options) {
|
|
|
4
4
|
error: { description: 'Should be an array', items: [] },
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
+
if (options?.minLength != null && value.length < options.minLength) {
|
|
8
|
+
return {
|
|
9
|
+
error: { description: 'exceeds the established min length limit', items: [] },
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
if (options?.maxLength != null && value.length > options.maxLength) {
|
|
13
|
+
return {
|
|
14
|
+
error: { description: 'exceeds the established max length limit', items: [] },
|
|
15
|
+
};
|
|
16
|
+
}
|
|
7
17
|
const { itemsValidator } = options ?? {};
|
|
8
18
|
const valueOut = [];
|
|
9
19
|
const errorItems = [];
|
|
@@ -7,7 +7,9 @@ function validateModel(value, info) {
|
|
|
7
7
|
for (const propertyName in info.properties) {
|
|
8
8
|
const propertyInfo = info.properties[propertyName];
|
|
9
9
|
const propertyValidators = propertyInfo.validators ?? [];
|
|
10
|
-
resultValue[propertyName] =
|
|
10
|
+
resultValue[propertyName] = propertyInfo.isOptional
|
|
11
|
+
? (value[propertyName] ?? resultValue[propertyName])
|
|
12
|
+
: value[propertyName];
|
|
11
13
|
if (resultValue[propertyName] == null && propertyInfo.isOptional) {
|
|
12
14
|
resultValue[propertyName] = undefined;
|
|
13
15
|
continue;
|
|
@@ -28,7 +28,7 @@ class ChatBot {
|
|
|
28
28
|
}
|
|
29
29
|
const systemPrompt = await this.mindset.systemPrompt();
|
|
30
30
|
const tools = this.mindset.tools();
|
|
31
|
-
const newItemData = await this.adapter.nextItem({
|
|
31
|
+
const { chatItem: newItemData } = await this.adapter.nextItem({
|
|
32
32
|
model: 'gpt',
|
|
33
33
|
systemPrompt,
|
|
34
34
|
tools,
|
package/dist/src/index.d.ts
CHANGED
|
@@ -195,6 +195,8 @@ type IModelValidatorsInfo<V> = {
|
|
|
195
195
|
};
|
|
196
196
|
|
|
197
197
|
interface IValidateArrayOptions {
|
|
198
|
+
minLength?: number;
|
|
199
|
+
maxLength?: number;
|
|
198
200
|
}
|
|
199
201
|
interface IValidateArrayOptionsWithItemsValidators extends IValidateArrayOptions {
|
|
200
202
|
itemsValidator?: {
|
|
@@ -514,18 +516,27 @@ type IFunctionCallItem = {
|
|
|
514
516
|
type IChatItem = IBotMessageItem | IHumanMessageItem | IFunctionCallItem;
|
|
515
517
|
type IChatItemType = (typeof chatItemTypeOptions)[number];
|
|
516
518
|
|
|
519
|
+
interface ILanguageModelUsage {
|
|
520
|
+
inputTokens: number;
|
|
521
|
+
outputTokens: number;
|
|
522
|
+
}
|
|
523
|
+
|
|
517
524
|
interface IChatAdapterNextItemReq {
|
|
518
525
|
model: string;
|
|
519
526
|
systemPrompt: string;
|
|
520
527
|
tools: IMindsetTool[];
|
|
521
528
|
prevItems: IChatItem[];
|
|
522
529
|
}
|
|
530
|
+
interface IChatAdapterNextItemRes {
|
|
531
|
+
chatItem: IChatItem;
|
|
532
|
+
usage: ILanguageModelUsage;
|
|
533
|
+
}
|
|
523
534
|
interface IChatAdapter {
|
|
524
|
-
nextItem(req: IChatAdapterNextItemReq): Promise<
|
|
535
|
+
nextItem(req: IChatAdapterNextItemReq): Promise<IChatAdapterNextItemRes>;
|
|
525
536
|
}
|
|
526
537
|
|
|
527
538
|
declare class ChatAdapter implements IChatAdapter {
|
|
528
|
-
nextItem(req: IChatAdapterNextItemReq): Promise<
|
|
539
|
+
nextItem(req: IChatAdapterNextItemReq): Promise<IChatAdapterNextItemRes>;
|
|
529
540
|
}
|
|
530
541
|
|
|
531
542
|
type IChatItemData = IEntityData & IChatItem;
|
|
@@ -798,7 +809,7 @@ declare class ClaudeChatAdapter implements IChatAdapter {
|
|
|
798
809
|
private anthropic;
|
|
799
810
|
private logger;
|
|
800
811
|
constructor();
|
|
801
|
-
nextItem(req: IChatAdapterNextItemReq): Promise<
|
|
812
|
+
nextItem(req: IChatAdapterNextItemReq): Promise<IChatAdapterNextItemRes>;
|
|
802
813
|
private mapChatItems;
|
|
803
814
|
private mapHumanMessage;
|
|
804
815
|
private mapBotMessage;
|
|
@@ -811,7 +822,7 @@ declare class DeepSeekChatAdapter implements IChatAdapter {
|
|
|
811
822
|
private deepSeek;
|
|
812
823
|
private logger;
|
|
813
824
|
constructor();
|
|
814
|
-
nextItem(req: IChatAdapterNextItemReq): Promise<
|
|
825
|
+
nextItem(req: IChatAdapterNextItemReq): Promise<IChatAdapterNextItemRes>;
|
|
815
826
|
private mapChatItems;
|
|
816
827
|
private mapHumanMessage;
|
|
817
828
|
private mapBotMessage;
|
|
@@ -820,10 +831,25 @@ declare class DeepSeekChatAdapter implements IChatAdapter {
|
|
|
820
831
|
private mapResponse;
|
|
821
832
|
}
|
|
822
833
|
|
|
834
|
+
declare class GeminiChatAdapter implements IChatAdapter {
|
|
835
|
+
private genai;
|
|
836
|
+
private model;
|
|
837
|
+
private logger;
|
|
838
|
+
constructor();
|
|
839
|
+
private validateModel;
|
|
840
|
+
nextItem(req: IChatAdapterNextItemReq): Promise<IChatAdapterNextItemRes>;
|
|
841
|
+
private buildContents;
|
|
842
|
+
private validateMessageContent;
|
|
843
|
+
private mapFunctionCall;
|
|
844
|
+
private mapTool;
|
|
845
|
+
private mapResponse;
|
|
846
|
+
private validateResponse;
|
|
847
|
+
}
|
|
848
|
+
|
|
823
849
|
declare class OpenaiChatAdapter implements IChatAdapter {
|
|
824
850
|
private openai;
|
|
825
851
|
private logger;
|
|
826
|
-
nextItem(req: IChatAdapterNextItemReq): Promise<
|
|
852
|
+
nextItem(req: IChatAdapterNextItemReq): Promise<IChatAdapterNextItemRes>;
|
|
827
853
|
private mapChatItems;
|
|
828
854
|
private mapConectionMessage;
|
|
829
855
|
private mapBotMessage;
|
|
@@ -1279,4 +1305,4 @@ interface IValidateMaxOptions {
|
|
|
1279
1305
|
}
|
|
1280
1306
|
declare function validateMax(value: any, options: IValidateMaxOptions): IValidationResult<any>;
|
|
1281
1307
|
|
|
1282
|
-
export { Async, Auth, Chat, ChatAdapter, ChatBot, ChatBotMetadataStore, ChatItem, ChatMemory, ChatRepository, ChatResolver, ClaudeChatAdapter, CmdChannel, Command, CommandMetadataStore, Container, ControllerMetadataStore, CustomError, DeepSeekChatAdapter, Entity, Env, EnvWhatsAppRepository, ExpressProvider, HtmlModule, HttpServerProvider, type IArrayValidationError, type IArrayValidationResult, type IBotMessageItem, type IChannelMessage, type IChannelMetadata, type IChatAdapter, type IChatAdapterNextItemReq, type IChatBot, type IChatBotMetadata, type IChatChannel, type IChatConnection, type IChatControllerMetadata, type IChatData, type IChatItem, type IChatItemData, type IChatItemType, type IChatMemory, type IChatMessage, type IChatRepository, type IChatType, type ICommandConfig, type ICommandHandler, type ICommandHandlerConfig, type IConstructor, type ICrudRepository, type ICustomErrorData, type IEndPointMetadata, type IEntityData, type IEnvType, type IFunctionCall, type IFunctionCallItem, type IGetConfig, type IGetWhatsAppTemplateRequest, type IHtmlModuleOptions, type IHumanMessageItem, type IJobData, type IJobEvent, type IJobEventListener, type IJobRepository, type IJwtRefreshTokenData, type IListenWhatsAppMessageRequest, type IMessageContext, type IMessageMetadata, type IMiddleware, type IMiddlewareMetadata, type IMindset, type IMindsetDecoration, type IMindsetFunctionConfig, type IMindsetFunctionDecoration, type IMindsetFunctionMetadata, type IMindsetFunctionParamMetadata, type IMindsetIdentity, type IMindsetMetadata, type IMindsetModuleConfig, type IMindsetModuleDecoration, type IMindsetModuleMetadata, type IMindsetTool, type IMindsetToolParameter, type IModelValidationError, type IModelValidationResult, type IModelValidatorsInfo, type IParamConfig, type IParamDecoration, type IPersistentData, type IPgRepositoryConfig, type IPostConfig, type IPrimitive, type IPropertyValidatorInfo, type IReceivedMessage, type IRestControllerConfig, type IRestControllerMetadata, type ISendWhatsAppRequest, type ISendWhatsAppTemplateRequest, type ISocketChannelConfig, type ISocketChannelReceivedMessage, type IStorableData, type ITelegramChannelConfig, type IValidateArrayOptions, type IValidateArrayOptionsWithItemsValidators, type IValidateMaxOptions, type IValidateMinOptions, type IValidationError, type IValidationResult, type IValidator, type IValidatorMetadata, type IWhatsAppBusinessAccount, type IWhatsAppBusinessNumber, type IWhatsAppContact, type IWhatsAppData, type IWhatsAppMessage, type IWhatsAppMessageListener, type IWhatsAppRepository, type IWhatsAppSenderOptions, type IWhatsAppTemplate, type IWhatsAppTemplateComponent, type IWhatsAppTemplateMessage, type IWhatsAppTemplateParameter, type IWhatsAppTemplateResponse, type IWhatsAppWebhookPayload, type IWhatsappChannelConfig, type IchatControllerConfig, Job, JobRepository, JobRunner, JobsEventsHub, Jwt, JwtAccessAndRefreshTokenDto, JwtConfig, JwtGuardMiddleware, JwtRefreshToken, JwtRefreshTokenRepository, JwtSigner, JwtTokenDto, Lifecycle, Logger, MINDSET_DECORATION_MINDSET, MINDSET_FUNCTION_DECORATION_FUNCTION, MINDSET_MODULE_DECORATION_MODULE, Mapper, Mindset, MindsetMetadataStore, MindsetOperator, OpenaiChatAdapter, PARAM_DECORATION_IS_OPTIONAL, PARAM_DECORATION_PARAM, Persistent, PgChatMemory, PgChatRepository, PgCrudRepository, PgJobRepository, PgRepositoryBase, PgWhatsAppRepository, RamChatMemory, RamChatRepository, Random, RestControllerMetadataStore, SocketChannel, SocketChannelConfig, SocketServerProvider, Storable, TelegramChannel, TelegramChannelConfig, ValidationMetadataStore, WhatsApp, WhatsAppChannel, WhatsAppReceiver, WhatsAppReceiverByDevConnection, WhatsAppReceiverByWebHook, WhatsAppRepository, WhatsAppSender, WhatsAppSenderByCloudApi, WhatsAppSenderByDevConnection, WhatsappChannelConfig, chatBot, chatController, chatItemTypeOptions, cmd, command, commandHandler, container, get, inject, injectable, isArray, isBoolean, isDate, isModel, isNotEmpty, isNumber, isOptional, isPresent, isString, jwtGuard, max, middleware, min, mindset, mindsetFunction, mindsetModule, modelInfo, param, post, restController, runAsyncCommandHandlers, runChatControllers, runRestControllers, scoped, singleton, socket, telegram, validate, validateArray, validateIsBoolean, validateIsDate, validateIsNotEmpty, validateIsNumber, validateIsPresent, validateIsString, validateMax, validateMin, validateModel, whatsapp };
|
|
1308
|
+
export { Async, Auth, Chat, ChatAdapter, ChatBot, ChatBotMetadataStore, ChatItem, ChatMemory, ChatRepository, ChatResolver, ClaudeChatAdapter, CmdChannel, Command, CommandMetadataStore, Container, ControllerMetadataStore, CustomError, DeepSeekChatAdapter, Entity, Env, EnvWhatsAppRepository, ExpressProvider, GeminiChatAdapter, HtmlModule, HttpServerProvider, type IArrayValidationError, type IArrayValidationResult, type IBotMessageItem, type IChannelMessage, type IChannelMetadata, type IChatAdapter, type IChatAdapterNextItemReq, type IChatAdapterNextItemRes, type IChatBot, type IChatBotMetadata, type IChatChannel, type IChatConnection, type IChatControllerMetadata, type IChatData, type IChatItem, type IChatItemData, type IChatItemType, type IChatMemory, type IChatMessage, type IChatRepository, type IChatType, type ICommandConfig, type ICommandHandler, type ICommandHandlerConfig, type IConstructor, type ICrudRepository, type ICustomErrorData, type IEndPointMetadata, type IEntityData, type IEnvType, type IFunctionCall, type IFunctionCallItem, type IGetConfig, type IGetWhatsAppTemplateRequest, type IHtmlModuleOptions, type IHumanMessageItem, type IJobData, type IJobEvent, type IJobEventListener, type IJobRepository, type IJwtRefreshTokenData, type ILanguageModelUsage, type IListenWhatsAppMessageRequest, type IMessageContext, type IMessageMetadata, type IMiddleware, type IMiddlewareMetadata, type IMindset, type IMindsetDecoration, type IMindsetFunctionConfig, type IMindsetFunctionDecoration, type IMindsetFunctionMetadata, type IMindsetFunctionParamMetadata, type IMindsetIdentity, type IMindsetMetadata, type IMindsetModuleConfig, type IMindsetModuleDecoration, type IMindsetModuleMetadata, type IMindsetTool, type IMindsetToolParameter, type IModelValidationError, type IModelValidationResult, type IModelValidatorsInfo, type IParamConfig, type IParamDecoration, type IPersistentData, type IPgRepositoryConfig, type IPostConfig, type IPrimitive, type IPropertyValidatorInfo, type IReceivedMessage, type IRestControllerConfig, type IRestControllerMetadata, type ISendWhatsAppRequest, type ISendWhatsAppTemplateRequest, type ISocketChannelConfig, type ISocketChannelReceivedMessage, type IStorableData, type ITelegramChannelConfig, type IValidateArrayOptions, type IValidateArrayOptionsWithItemsValidators, type IValidateMaxOptions, type IValidateMinOptions, type IValidationError, type IValidationResult, type IValidator, type IValidatorMetadata, type IWhatsAppBusinessAccount, type IWhatsAppBusinessNumber, type IWhatsAppContact, type IWhatsAppData, type IWhatsAppMessage, type IWhatsAppMessageListener, type IWhatsAppRepository, type IWhatsAppSenderOptions, type IWhatsAppTemplate, type IWhatsAppTemplateComponent, type IWhatsAppTemplateMessage, type IWhatsAppTemplateParameter, type IWhatsAppTemplateResponse, type IWhatsAppWebhookPayload, type IWhatsappChannelConfig, type IchatControllerConfig, Job, JobRepository, JobRunner, JobsEventsHub, Jwt, JwtAccessAndRefreshTokenDto, JwtConfig, JwtGuardMiddleware, JwtRefreshToken, JwtRefreshTokenRepository, JwtSigner, JwtTokenDto, Lifecycle, Logger, MINDSET_DECORATION_MINDSET, MINDSET_FUNCTION_DECORATION_FUNCTION, MINDSET_MODULE_DECORATION_MODULE, Mapper, Mindset, MindsetMetadataStore, MindsetOperator, OpenaiChatAdapter, PARAM_DECORATION_IS_OPTIONAL, PARAM_DECORATION_PARAM, Persistent, PgChatMemory, PgChatRepository, PgCrudRepository, PgJobRepository, PgRepositoryBase, PgWhatsAppRepository, RamChatMemory, RamChatRepository, Random, RestControllerMetadataStore, SocketChannel, SocketChannelConfig, SocketServerProvider, Storable, TelegramChannel, TelegramChannelConfig, ValidationMetadataStore, WhatsApp, WhatsAppChannel, WhatsAppReceiver, WhatsAppReceiverByDevConnection, WhatsAppReceiverByWebHook, WhatsAppRepository, WhatsAppSender, WhatsAppSenderByCloudApi, WhatsAppSenderByDevConnection, WhatsappChannelConfig, chatBot, chatController, chatItemTypeOptions, cmd, command, commandHandler, container, get, inject, injectable, isArray, isBoolean, isDate, isModel, isNotEmpty, isNumber, isOptional, isPresent, isString, jwtGuard, max, middleware, min, mindset, mindsetFunction, mindsetModule, modelInfo, param, post, restController, runAsyncCommandHandlers, runChatControllers, runRestControllers, scoped, singleton, socket, telegram, validate, validateArray, validateIsBoolean, validateIsDate, validateIsNotEmpty, validateIsNumber, validateIsPresent, validateIsString, validateMax, validateMin, validateModel, whatsapp };
|
package/dist/src/index.js
CHANGED
|
@@ -61,6 +61,7 @@ export { SocketServerProvider } from './feature/socket/SocketServerProvider.js';
|
|
|
61
61
|
export { PgJobRepository } from './addon/async/pg/PgJobRepository.js';
|
|
62
62
|
export { ClaudeChatAdapter } from './addon/chat-bot/claude/ClaudeChatAdapter.js';
|
|
63
63
|
export { DeepSeekChatAdapter } from './addon/chat-bot/deepseek/DeepSeekChatAdapter.js';
|
|
64
|
+
export { GeminiChatAdapter } from './addon/chat-bot/gemini/GeminiChatAdapter.js';
|
|
64
65
|
export { OpenaiChatAdapter } from './addon/chat-bot/openia/OpenaiChatAdapter.js';
|
|
65
66
|
export { PgChatRepository } from './addon/chat-bot/pg/PgChatRepository.js';
|
|
66
67
|
export { PgChatMemory } from './addon/chat-bot/pg/PgChatMemory.js';
|