@kevisual/ai 0.0.8 → 0.0.10

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.
@@ -1,8 +1,7 @@
1
1
  import * as openai_resources_index_mjs from 'openai/resources/index.mjs';
2
2
  import OpenAI, { OpenAI as OpenAI$1 } from 'openai';
3
3
  import * as openai_resources_embeddings_mjs from 'openai/resources/embeddings.mjs';
4
- import * as _kevisual_permission from '@kevisual/permission';
5
- import { Permission } from '@kevisual/permission';
4
+ import { Permission as Permission$1 } from '@kevisual/permission';
6
5
 
7
6
  type ChatMessage = OpenAI.Chat.Completions.ChatCompletionMessageParam;
8
7
  type ChatMessageOptions = Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams> & {
@@ -57,7 +56,7 @@ type BaseChatOptions<T = Record<string, any>> = {
57
56
  */
58
57
  stream?: boolean;
59
58
  } & T;
60
- declare const getIsBrowser: () => any;
59
+ declare const getIsBrowser: () => boolean;
61
60
  declare class BaseChat implements BaseChatInterface, BaseChatUsageInterface {
62
61
  /**
63
62
  * 默认baseURL
@@ -178,7 +177,7 @@ declare class SiliconFlow extends BaseChat {
178
177
  static BASE_URL: string;
179
178
  constructor(options: SiliconFlowOptions);
180
179
  getUsageInfo(): Promise<SiliconFlowUsageResponse>;
181
- chat(messages: OpenAI$1.Chat.Completions.ChatCompletionMessageParam[], options?: Partial<OpenAI$1.Chat.Completions.ChatCompletionCreateParams>): Promise<OpenAI$1.Chat.Completions.ChatCompletion>;
180
+ chat(messages: OpenAI$1.Chat.Completions.ChatCompletionMessageParam[], options?: ChatMessageOptions): Promise<OpenAI$1.Chat.Completions.ChatCompletion>;
182
181
  }
183
182
 
184
183
  type OllamaOptions = BaseChatOptions;
@@ -296,7 +295,9 @@ declare class KnowledgeBase extends BaseChat {
296
295
  declare class SiliconFlowKnowledge extends KnowledgeBase {
297
296
  static BASE_URL: string;
298
297
  constructor(options: KnowledgeOptions);
299
- rerank(data: RerankOptions): Promise<any>;
298
+ rerank(data: RerankOptions): Promise<{
299
+ _request_id?: string | null;
300
+ }>;
300
301
  }
301
302
  type RerankOptions = {
302
303
  model: string;
@@ -349,7 +350,7 @@ type AIConfig = {
349
350
  description?: string;
350
351
  models: AIModel[];
351
352
  secretKeys: SecretKey[];
352
- permission?: Permission;
353
+ permission?: Permission$1;
353
354
  filter?: {
354
355
  objectKey: string;
355
356
  type: 'array' | 'object';
@@ -434,7 +435,7 @@ declare class AIConfigParser {
434
435
  title?: string;
435
436
  description?: string;
436
437
  models?: AIModel[];
437
- permission?: _kevisual_permission.Permission;
438
+ permission?: Permission;
438
439
  filter?: {
439
440
  objectKey: string;
440
441
  type: "array" | "object";