This commit is contained in:
2025-12-04 12:43:16 +08:00
parent 961970f8a6
commit edeaff8a9e
3 changed files with 4 additions and 4 deletions

View File

@@ -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",

View File

@@ -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<string, string>, data?: any } = {}) {
let _url = url.startsWith('http') ? url : this.baseURL + url;

View File

@@ -3,3 +3,5 @@ export * from './chat.ts';
export * from './knowledge.ts';
export * from './utils/index.ts';
export { AIUtils } from './core/utils/index.ts';