feat: refactor
This commit is contained in:
+16
-23
@@ -10,7 +10,7 @@ import (
|
||||
type GroqProvider struct{}
|
||||
|
||||
func (p *GroqProvider) Name() string {
|
||||
return "groq"
|
||||
return ProviderGroq
|
||||
}
|
||||
|
||||
func (p *GroqProvider) RequiresAPIKey() bool {
|
||||
@@ -36,9 +36,10 @@ func (p *GroqProvider) Models() []Model {
|
||||
Name: "Whisper Large v3",
|
||||
Description: "Full Whisper v3 model, best accuracy",
|
||||
Type: Transcription,
|
||||
Streaming: false,
|
||||
SupportsBatch: true,
|
||||
SupportsStreaming: false,
|
||||
Local: false,
|
||||
AdapterType: "openai",
|
||||
AdapterType: AdapterOpenAI,
|
||||
SupportedLanguages: allLangs,
|
||||
Endpoint: &EndpointConfig{BaseURL: "https://api.groq.com/openai", Path: "/v1/audio/transcriptions"},
|
||||
DocsURL: docsURL,
|
||||
@@ -48,34 +49,24 @@ func (p *GroqProvider) Models() []Model {
|
||||
Name: "Whisper Large v3 Turbo",
|
||||
Description: "Faster Whisper v3 with slightly lower accuracy",
|
||||
Type: Transcription,
|
||||
Streaming: false,
|
||||
SupportsBatch: true,
|
||||
SupportsStreaming: false,
|
||||
Local: false,
|
||||
AdapterType: "openai",
|
||||
AdapterType: AdapterOpenAI,
|
||||
SupportedLanguages: allLangs,
|
||||
Endpoint: &EndpointConfig{BaseURL: "https://api.groq.com/openai", Path: "/v1/audio/transcriptions"},
|
||||
DocsURL: docsURL,
|
||||
},
|
||||
{
|
||||
ID: "distil-whisper-large-v3-en",
|
||||
Name: "Distil Whisper Large v3 EN",
|
||||
Description: "English-only, fastest option",
|
||||
Type: Transcription,
|
||||
Streaming: false,
|
||||
Local: false,
|
||||
AdapterType: "openai",
|
||||
SupportedLanguages: []string{"en"},
|
||||
Endpoint: &EndpointConfig{BaseURL: "https://api.groq.com/openai", Path: "/v1/audio/transcriptions"},
|
||||
DocsURL: docsURL,
|
||||
},
|
||||
// LLM models
|
||||
{
|
||||
ID: "llama-3.3-70b-versatile",
|
||||
Name: "Llama 3.3 70B Versatile",
|
||||
Description: "Most capable Llama model",
|
||||
Type: LLM,
|
||||
Streaming: false,
|
||||
SupportsBatch: true,
|
||||
SupportsStreaming: false,
|
||||
Local: false,
|
||||
AdapterType: "openai",
|
||||
AdapterType: AdapterOpenAI,
|
||||
SupportedLanguages: allLangs,
|
||||
Endpoint: &EndpointConfig{BaseURL: "https://api.groq.com/openai", Path: "/v1/chat/completions"},
|
||||
},
|
||||
@@ -84,9 +75,10 @@ func (p *GroqProvider) Models() []Model {
|
||||
Name: "Llama 3.1 8B Instant",
|
||||
Description: "Fast and efficient",
|
||||
Type: LLM,
|
||||
Streaming: false,
|
||||
SupportsBatch: true,
|
||||
SupportsStreaming: false,
|
||||
Local: false,
|
||||
AdapterType: "openai",
|
||||
AdapterType: AdapterOpenAI,
|
||||
SupportedLanguages: allLangs,
|
||||
Endpoint: &EndpointConfig{BaseURL: "https://api.groq.com/openai", Path: "/v1/chat/completions"},
|
||||
},
|
||||
@@ -95,9 +87,10 @@ func (p *GroqProvider) Models() []Model {
|
||||
Name: "Mixtral 8x7B",
|
||||
Description: "Mixture of experts model",
|
||||
Type: LLM,
|
||||
Streaming: false,
|
||||
SupportsBatch: true,
|
||||
SupportsStreaming: false,
|
||||
Local: false,
|
||||
AdapterType: "openai",
|
||||
AdapterType: AdapterOpenAI,
|
||||
SupportedLanguages: allLangs,
|
||||
Endpoint: &EndpointConfig{BaseURL: "https://api.groq.com/openai", Path: "/v1/chat/completions"},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user