docs: add upage usage instructions document

This commit is contained in:
LIlGG
2025-09-28 18:01:20 +08:00
parent cf35ba7399
commit 1d944e54e8
11 changed files with 130 additions and 102 deletions

View File

@@ -58,9 +58,10 @@ export default class TogetherProvider extends BaseProvider {
getModelInstance(options: { model: string; providerSettings?: Record<string, IProviderSetting> }): LanguageModel {
const { model, providerSettings } = options;
const { baseUrl, apiKey } = this.getProviderBaseUrlAndKey(providerSettings?.[this.name]);
const { baseUrl: fetchBaseUrl, apiKey } = this.getProviderBaseUrlAndKey(providerSettings?.[this.name]);
const baseUrl = fetchBaseUrl || 'https://api.together.xyz/v1';
if (!baseUrl || !apiKey) {
if (!apiKey) {
throw new Error(`Missing configuration for ${this.name} provider`);
}