refactor: consolidate OpenAI adapter to accept EndpointConfig
- OpenAIAdapter now accepts EndpointConfig for custom endpoints - added language code conversion via ToProviderFormat - backward-compatible NewOpenAIAdapterFromConfig for migration - works with OpenAI, Groq, and Mistral endpoints
This commit is contained in:
@@ -38,7 +38,7 @@ func NewTranscriber(config Config) (Transcriber, error) {
|
||||
if config.APIKey == "" {
|
||||
return nil, fmt.Errorf("OpenAI API key required")
|
||||
}
|
||||
adapter = NewOpenAIAdapter(config)
|
||||
adapter = NewOpenAIAdapterFromConfig(config)
|
||||
|
||||
case "groq-transcription":
|
||||
if config.APIKey == "" {
|
||||
|
||||
Reference in New Issue
Block a user