diff --git a/package.json b/package.json index 57a6d89..c398801 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kevisual/ai", - "version": "0.0.13", + "version": "0.0.14", "description": "AI Center Services", "main": "index.js", "basename": "/root/ai-center-services", diff --git a/src/provider/core/chat.ts b/src/provider/core/chat.ts index 7072993..c806304 100644 --- a/src/provider/core/chat.ts +++ b/src/provider/core/chat.ts @@ -1,4 +1,3 @@ -import { OpenAI } from 'openai'; import type { BaseChatInterface, ChatMessageComplete, @@ -51,12 +50,11 @@ export class BaseChat implements BaseChatInterface, BaseChatUsageInterface { total_tokens: number; completion_tokens: number; responseText: string; - utils: AIUtils; + utils = AIUtils; constructor(options: BaseChatOptions) { this.baseURL = options.baseURL; this.model = options.model; this.apiKey = options.apiKey; - this.utils = new AIUtils(); } post(url = '', opts: { headers?: Record, data?: any } = {}) { let _url = url.startsWith('http') ? url : this.baseURL + url; diff --git a/src/provider/index.ts b/src/provider/index.ts index 0c03e4d..b39df7c 100644 --- a/src/provider/index.ts +++ b/src/provider/index.ts @@ -3,3 +3,5 @@ export * from './chat.ts'; export * from './knowledge.ts'; export * from './utils/index.ts'; + +export { AIUtils } from './core/utils/index.ts'; \ No newline at end of file