修复
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user