generated from tailored/app-template
update for baseURL
This commit is contained in:
@@ -3,8 +3,9 @@ import { BaseChat, BaseChatOptions } from '../core/chat.ts';
|
||||
|
||||
export type ModelScopeOptions = Partial<BaseChatOptions>;
|
||||
export class ModelScope extends BaseChat {
|
||||
static BASE_URL = 'https://api-inference.modelscope.cn/v1/';
|
||||
constructor(options: ModelScopeOptions) {
|
||||
const baseURL = options.baseURL || 'https://api-inference.modelscope.cn/v1/';
|
||||
const baseURL = options.baseURL || ModelScope.BASE_URL;
|
||||
super({ ...options, baseURL: baseURL } as any);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user