mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-11 00:07:07 +00:00
OpenAI: Function Based Testing (#5752)
* distinguish error forwarding * more coverage * rm comment
This commit is contained in:
@@ -877,6 +877,7 @@ func ChatMiddleware() gin.HandlerFunc {
|
||||
chatReq, err := fromChatRequest(req)
|
||||
if err != nil {
|
||||
c.AbortWithStatusJSON(http.StatusBadRequest, NewError(http.StatusBadRequest, err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
if err := json.NewEncoder(&b).Encode(chatReq); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user