udpate
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -3,3 +3,5 @@ export * from './chat.ts';
|
||||
export * from './knowledge.ts';
|
||||
|
||||
export * from './utils/index.ts';
|
||||
|
||||
export { AIUtils } from './core/utils/index.ts';
|
||||
Reference in New Issue
Block a user