mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-02 04:20:50 +08:00
- 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.
19 lines
588 B
Go
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())
|
|
}
|