This commit is contained in:
史悦
2025-08-13 19:58:47 +08:00
parent 92f32a08ba
commit 3bf1912ee9

View File

@@ -18,6 +18,11 @@ import (
"time" "time"
) )
// abortCodex is a helper function to abort requests with a specific message.
func abortCodex(c *gin.Context, message string) {
c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"error": message})
}
// GetEngine returns information about a specific engine. // GetEngine returns information about a specific engine.
func GetEngine(c *gin.Context) { func GetEngine(c *gin.Context) {
modelName := os.Getenv("CODEX_API_MODEL_NAME") modelName := os.Getenv("CODEX_API_MODEL_NAME")
@@ -31,7 +36,6 @@ func GetEngine(c *gin.Context) {
}) })
} }
// CodeCompletions code代码补全接口 // CodeCompletions code代码补全接口
func CodeCompletions(c *gin.Context) { func CodeCompletions(c *gin.Context) {
ctx := c.Request.Context() ctx := c.Request.Context()