fix: together ai models

This commit is contained in:
kangfenmao 2024-09-30 20:45:51 +08:00
parent 85453f5a3a
commit 31ab444300

View File

@ -283,6 +283,18 @@ export default class OpenAIProvider extends BaseProvider {
.filter(isSupportedModel) .filter(isSupportedModel)
} }
if (this.provider.id === 'together') {
// @ts-ignore key is not typed
return response?.body
.map((model: any) => ({
id: model.id,
description: model.display_name,
object: 'model',
owned_by: model.organization
}))
.filter(isSupportedModel)
}
const models = response?.data || [] const models = response?.data || []
return models.filter(isSupportedModel) return models.filter(isSupportedModel)