@kevisual/ai 0.0.11 → 0.0.12
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/ai-provider-browser.d.ts +9 -7
- package/dist/ai-provider-browser.js +374 -5953
- package/dist/ai-provider.d.ts +9 -7
- package/dist/ai-provider.js +104 -5683
- package/package.json +10 -10
- package/src/provider/chat-adapter/ollama.ts +2 -2
- package/src/provider/chat-adapter/siliconflow.ts +1 -1
- package/src/provider/core/chat.ts +105 -18
- package/src/provider/core/index.ts +0 -11
- package/src/provider/knowledge-adapter/siliconflow.ts +2 -2
- package/src/test/aliyun/test.ts +46 -13
|
@@ -81,16 +81,20 @@ declare class BaseChat implements BaseChatInterface, BaseChatUsageInterface {
|
|
|
81
81
|
prompt_tokens: number;
|
|
82
82
|
total_tokens: number;
|
|
83
83
|
completion_tokens: number;
|
|
84
|
+
responseText: string;
|
|
84
85
|
constructor(options: BaseChatOptions);
|
|
86
|
+
post(url?: string, opts?: {
|
|
87
|
+
headers?: Record<string, string>;
|
|
88
|
+
data?: any;
|
|
89
|
+
}): Promise<Response>;
|
|
90
|
+
get<T = any>(url?: string, opts?: {
|
|
91
|
+
headers?: Record<string, string>;
|
|
92
|
+
}): Promise<T>;
|
|
85
93
|
/**
|
|
86
94
|
* 聊天
|
|
87
95
|
*/
|
|
88
96
|
chat(messages: ChatMessage[], options?: ChatMessageOptions): Promise<ChatMessageComplete>;
|
|
89
97
|
chatStream(messages: ChatMessage[], options?: ChatMessageOptions): Promise<ChatStream>;
|
|
90
|
-
/**
|
|
91
|
-
* 测试
|
|
92
|
-
*/
|
|
93
|
-
test(): Promise<OpenAI$1.Chat.Completions.ChatCompletion>;
|
|
94
98
|
/**
|
|
95
99
|
* 获取聊天使用情况
|
|
96
100
|
* @returns
|
|
@@ -295,9 +299,7 @@ declare class KnowledgeBase extends BaseChat {
|
|
|
295
299
|
declare class SiliconFlowKnowledge extends KnowledgeBase {
|
|
296
300
|
static BASE_URL: string;
|
|
297
301
|
constructor(options: KnowledgeOptions);
|
|
298
|
-
rerank(data: RerankOptions): Promise<
|
|
299
|
-
_request_id?: string | null;
|
|
300
|
-
}>;
|
|
302
|
+
rerank(data: RerankOptions): Promise<Response>;
|
|
301
303
|
}
|
|
302
304
|
type RerankOptions = {
|
|
303
305
|
model: string;
|