feat(groq): add support for Groq using the OpenAI provider

This commit is contained in:
Hunter Casten
2025-04-24 22:48:48 -07:00
committed by Kujtim Hoxha
parent bd986442e8
commit 8f31eb3ba0
5 changed files with 153 additions and 57 deletions
+8
View File
@@ -107,6 +107,14 @@ func NewProvider(providerName models.ModelProvider, opts ...ProviderClientOption
options: clientOptions,
client: newBedrockClient(clientOptions),
}, nil
case models.ProviderGROQ:
clientOptions.openaiOptions = append(clientOptions.openaiOptions,
WithOpenAIBaseURL("https://api.groq.com/openai/v1"),
)
return &baseProvider[OpenAIClient]{
options: clientOptions,
client: newOpenAIClient(clientOptions),
}, nil
case models.ProviderMock:
// TODO: implement mock client for test
panic("not implemented")