From b006582e4c7323821eb836080a9bc9ec24243a47 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 1 Apr 2026 13:00:40 +0300 Subject: zr: add Gemini-backed translation provider --- internal/processor/processor.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'internal/processor/processor.go') diff --git a/internal/processor/processor.go b/internal/processor/processor.go index d52ca53..94b0448 100644 --- a/internal/processor/processor.go +++ b/internal/processor/processor.go @@ -32,12 +32,13 @@ type Processor struct { // NewProcessor creates a new word processor func NewProcessor(flags *cli.Flags) *Processor { - apiKey := cli.GetOpenAIKey() + openAIKey := cli.GetOpenAIKey() + translationProvider := translation.Provider(viper.GetString("translation.provider")) return &Processor{ flags: flags, - translator: translation.NewTranslator(apiKey), + translator: translation.NewTranslator(&translation.Config{Provider: translationProvider, OpenAIKey: openAIKey, GoogleAPIKey: cli.GetGoogleAPIKey()}), translationCache: translation.NewTranslationCache(), - phoneticFetcher: phonetic.NewFetcher(apiKey), + phoneticFetcher: phonetic.NewFetcher(openAIKey), } } -- cgit v1.2.3