Files
CLIProxyAPI/sdk/translator/builtin/builtin.go
Luis Pater 2f477df97e feat(translator): add built-in translator registry and helpers
- Introduced `builtin` package exposing a default registry and pipeline for built-in translators.
- Added format constants for common schemas (e.g., OpenAI, Gemini, Codex).
- Implemented helper functions for schema translation using format name strings.
- Provided example usage for integration with translator helpers.
2025-10-30 12:20:46 +08:00

19 lines
588 B
Go

// Package builtin exposes the built-in translator registrations for SDK users.
package builtin
import (
sdktranslator "github.com/router-for-me/CLIProxyAPI/v6/sdk/translator"
_ "github.com/router-for-me/CLIProxyAPI/v6/internal/translator"
)
// Registry exposes the default registry populated with all built-in translators.
func Registry() *sdktranslator.Registry {
return sdktranslator.Default()
}
// Pipeline returns a pipeline that already contains the built-in translators.
func Pipeline() *sdktranslator.Pipeline {
return sdktranslator.NewPipeline(sdktranslator.Default())
}