Skip to content

Commit

Permalink
fix: together ai models
Browse files Browse the repository at this point in the history
  • Loading branch information
kangfenmao committed Sep 30, 2024
1 parent 85453f5 commit 31ab444
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/renderer/src/providers/OpenAIProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,18 @@ export default class OpenAIProvider extends BaseProvider {
.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 || []

return models.filter(isSupportedModel)
Expand Down

0 comments on commit 31ab444

Please sign in to comment.