koishi-plugin-chatluna 1.3.3 → 1.3.4
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/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.mjs +1 -1
- package/lib/llm-core/agent/openai/index.d.ts +1 -1
- package/lib/llm-core/platform/model.cjs +2 -0
- package/lib/llm-core/platform/model.d.ts +4 -0
- package/lib/llm-core/platform/model.mjs +2 -0
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -24,5 +24,5 @@ export declare const inject2: {
|
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
export declare let logger: Logger;
|
|
27
|
-
export declare const usage = "\n## chatluna v1.3
|
|
27
|
+
export declare const usage = "\n## chatluna v1.3\n\nChatLuna \u63D2\u4EF6\u4EA4\u6D41 QQ \u7FA4\uFF1A282381753 \uFF08\u6709\u95EE\u9898\u6216\u51FA\u73B0 Bug \u5148\u52A0\u7FA4\u95EE\uFF09\n\n\u7FA4\u91CC\u76EE\u524D\u6CA1\u6709\u642D\u8F7D\u8BE5\u63D2\u4EF6\u7684 bot\uFF0C\u52A0\u7FA4\u7684\u8BDD\u6700\u597D\u662F\u6765\u8BE2\u95EE\u95EE\u9898\u6216\u8005\u63D0\u51FA\u610F\u89C1\u7684\u3002\n\n\u8BBF\u95EE [https://chatluna.chat](https://chatluna.chat) \u6765\u4E86\u89E3\u5982\u4F55\u4F7F\u7528 Chatluna\u3002\n\u4E5F\u53EF\u4EE5\u8BBF\u95EE [https://preset.chatluna.chat](https://preset.chatluna.chat) \u8FDB\u5165\u5728\u7EBF\u9884\u8BBE\u7F16\u8F91\u5668\u3002\u66F4\u6709\u9884\u8BBE\u5E7F\u573A\u6765\u6D4F\u89C8\u548C\u4E0B\u8F7D\u4F60\u5FC3\u4EEA\u7684\u9884\u8BBE\u3002\n";
|
|
28
28
|
export declare function apply(ctx: Context, config: Config): void;
|
package/lib/index.mjs
CHANGED
|
@@ -22,4 +22,4 @@ export type CreateOpenAIAgentParams = {
|
|
|
22
22
|
};
|
|
23
23
|
export declare function createOpenAIAgent({ llm, tools, prompt }: CreateOpenAIAgentParams): RunnableSequence<{
|
|
24
24
|
steps: AgentStep[];
|
|
25
|
-
}, AgentAction |
|
|
25
|
+
}, AgentAction | AgentAction[] | AgentFinish>;
|
|
@@ -217,6 +217,7 @@ var ChatLunaChatModel = class extends import_chat_models.BaseChatModel {
|
|
|
217
217
|
"logitBias",
|
|
218
218
|
"id",
|
|
219
219
|
"variables_hide",
|
|
220
|
+
"overrideRequestParams",
|
|
220
221
|
"stream",
|
|
221
222
|
"tools"
|
|
222
223
|
];
|
|
@@ -244,6 +245,7 @@ var ChatLunaChatModel = class extends import_chat_models.BaseChatModel {
|
|
|
244
245
|
maxTokens: options?.maxTokens ?? this._options.maxTokens,
|
|
245
246
|
maxTokenLimit,
|
|
246
247
|
variables: options?.["variables_hide"] ?? {},
|
|
248
|
+
overrideRequestParams: options?.overrideRequestParams ?? this._options.overrideRequestParams ?? {},
|
|
247
249
|
stop: options?.stop ?? this._options.stop,
|
|
248
250
|
stream: options?.stream ?? this._options.stream,
|
|
249
251
|
tools: options?.tools ?? this._options.tools,
|
|
@@ -37,6 +37,10 @@ export interface ChatLunaModelCallOptions extends BaseChatModelCallOptions {
|
|
|
37
37
|
tool_choice?: string;
|
|
38
38
|
variables?: Record<string, any>;
|
|
39
39
|
variables_hide?: Record<string, any>;
|
|
40
|
+
/**
|
|
41
|
+
* Override request params for this request only.
|
|
42
|
+
*/
|
|
43
|
+
overrideRequestParams?: Record<string, any>;
|
|
40
44
|
}
|
|
41
45
|
export interface ChatLunaModelInput extends ChatLunaModelCallOptions {
|
|
42
46
|
llmType?: string;
|
|
@@ -199,6 +199,7 @@ var ChatLunaChatModel = class extends BaseChatModel {
|
|
|
199
199
|
"logitBias",
|
|
200
200
|
"id",
|
|
201
201
|
"variables_hide",
|
|
202
|
+
"overrideRequestParams",
|
|
202
203
|
"stream",
|
|
203
204
|
"tools"
|
|
204
205
|
];
|
|
@@ -226,6 +227,7 @@ var ChatLunaChatModel = class extends BaseChatModel {
|
|
|
226
227
|
maxTokens: options?.maxTokens ?? this._options.maxTokens,
|
|
227
228
|
maxTokenLimit,
|
|
228
229
|
variables: options?.["variables_hide"] ?? {},
|
|
230
|
+
overrideRequestParams: options?.overrideRequestParams ?? this._options.overrideRequestParams ?? {},
|
|
229
231
|
stop: options?.stop ?? this._options.stop,
|
|
230
232
|
stream: options?.stream ?? this._options.stream,
|
|
231
233
|
tools: options?.tools ?? this._options.tools,
|