feat(kiro): 代码优化重构 + OpenAI翻译器实现

This commit is contained in:
Ravens2121
2025-12-14 06:58:50 +08:00
parent 1ea0cff3a4
commit 01cf221167
19 changed files with 3898 additions and 3293 deletions
+20
View File
@@ -0,0 +1,20 @@
// Package openai provides translation between OpenAI Chat Completions and Kiro formats.
package openai
import (
. "github.com/router-for-me/CLIProxyAPI/v6/internal/constant"
"github.com/router-for-me/CLIProxyAPI/v6/internal/interfaces"
"github.com/router-for-me/CLIProxyAPI/v6/internal/translator/translator"
)
func init() {
translator.Register(
OpenAI, // source format
Kiro, // target format
ConvertOpenAIRequestToKiro,
interfaces.TranslateResponse{
Stream: ConvertKiroStreamToOpenAI,
NonStream: ConvertKiroNonStreamToOpenAI,
},
)
}