Documentation
¶
Index ¶
Constants ¶
View Source
const ( ExitCodeOK = 0 ExitCodeFail = 1 DefaultExceedThreshold = 4000 DefaultOpenAIModel = "gpt-5-nano" DefaultGeminiModel = "gemini-2.0-flash-lite" )
Variables ¶
View Source
var (
Version string
)
Functions ¶
This section is empty.
Types ¶
type CLI ¶
type CLI struct {
// contains filtered or unexported fields
}
CLI holds the input/output streams and the Translator.
func NewCLI ¶
func NewCLI(outStream, errStream io.Writer, inputStream io.Reader, tr Translator, isStdinTerminal bool) *CLI
NewCLI returns a new CLI instance.
type GeminiTranslator ¶ added in v0.2.0
type GeminiTranslator struct {
// contains filtered or unexported fields
}
GeminiTranslator implements the Translator interface using the Gemini API client.
func NewGeminiTranslator ¶ added in v0.2.0
func NewGeminiTranslator(apiKey string) (*GeminiTranslator, error)
NewGeminiTranslator creates a new GeminiTranslator with the given API key.
type Translator ¶
type Translator interface {
// contains filtered or unexported methods
}
Translator is the interface used to request a response.
func NewOpenAITranslator ¶ added in v0.2.0
func NewOpenAITranslator(apiKey string) (Translator, error)
NewOpenAITranslator creates a new translator using the OpenAI API.
Click to show internal directories.
Click to hide internal directories.