mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 10:26:53 +02:00
OpenAI: Function Based Testing (#5752)
* distinguish error forwarding * more coverage * rm comment
This commit is contained in:
parent
51b2fd299c
commit
c57317cbf0
2 changed files with 279 additions and 183 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue