add gpt-4o-transcribe models to openai provider
This commit is contained in:
+22
-22
@@ -41,6 +41,28 @@ func (p *OpenAIProvider) Models() []Model {
|
||||
SupportedLanguages: allLangs,
|
||||
Endpoint: &EndpointConfig{BaseURL: "https://api.openai.com", Path: "/v1/audio/transcriptions"},
|
||||
},
|
||||
{
|
||||
ID: "gpt-4o-transcribe",
|
||||
Name: "GPT-4o Transcribe",
|
||||
Description: "High quality transcription with GPT-4o",
|
||||
Type: Transcription,
|
||||
Streaming: false,
|
||||
Local: false,
|
||||
AdapterType: "openai",
|
||||
SupportedLanguages: allLangs,
|
||||
Endpoint: &EndpointConfig{BaseURL: "https://api.openai.com", Path: "/v1/audio/transcriptions"},
|
||||
},
|
||||
{
|
||||
ID: "gpt-4o-mini-transcribe",
|
||||
Name: "GPT-4o Mini Transcribe",
|
||||
Description: "Fast transcription with GPT-4o Mini",
|
||||
Type: Transcription,
|
||||
Streaming: false,
|
||||
Local: false,
|
||||
AdapterType: "openai",
|
||||
SupportedLanguages: allLangs,
|
||||
Endpoint: &EndpointConfig{BaseURL: "https://api.openai.com", Path: "/v1/audio/transcriptions"},
|
||||
},
|
||||
// LLM models
|
||||
{
|
||||
ID: "gpt-4o-mini",
|
||||
@@ -64,28 +86,6 @@ func (p *OpenAIProvider) Models() []Model {
|
||||
SupportedLanguages: allLangs,
|
||||
Endpoint: &EndpointConfig{BaseURL: "https://api.openai.com", Path: "/v1/chat/completions"},
|
||||
},
|
||||
{
|
||||
ID: "gpt-4-turbo",
|
||||
Name: "GPT-4 Turbo",
|
||||
Description: "Faster GPT-4 with large context window",
|
||||
Type: LLM,
|
||||
Streaming: false,
|
||||
Local: false,
|
||||
AdapterType: "openai",
|
||||
SupportedLanguages: allLangs,
|
||||
Endpoint: &EndpointConfig{BaseURL: "https://api.openai.com", Path: "/v1/chat/completions"},
|
||||
},
|
||||
{
|
||||
ID: "gpt-3.5-turbo",
|
||||
Name: "GPT-3.5 Turbo",
|
||||
Description: "Fast and cost-effective",
|
||||
Type: LLM,
|
||||
Streaming: false,
|
||||
Local: false,
|
||||
AdapterType: "openai",
|
||||
SupportedLanguages: allLangs,
|
||||
Endpoint: &EndpointConfig{BaseURL: "https://api.openai.com", Path: "/v1/chat/completions"},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -176,11 +176,13 @@ func TestModelsOfType(t *testing.T) {
|
||||
trans := ModelsOfType(p, Transcription)
|
||||
llm := ModelsOfType(p, LLM)
|
||||
|
||||
if len(trans) != 1 {
|
||||
t.Errorf("ModelsOfType(Transcription) = %d, want 1", len(trans))
|
||||
// OpenAI has 3 transcription models: whisper-1, gpt-4o-transcribe, gpt-4o-mini-transcribe
|
||||
if len(trans) != 3 {
|
||||
t.Errorf("ModelsOfType(Transcription) = %d, want 3", len(trans))
|
||||
}
|
||||
if len(llm) != 4 {
|
||||
t.Errorf("ModelsOfType(LLM) = %d, want 4", len(llm))
|
||||
// OpenAI has 2 LLM models: gpt-4o-mini, gpt-4o
|
||||
if len(llm) != 2 {
|
||||
t.Errorf("ModelsOfType(LLM) = %d, want 2", len(llm))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user