Skip to content

Commit

Permalink
OpenAI: Function Based Testing (ollama#5752)
Browse files Browse the repository at this point in the history
* distinguish error forwarding

* more coverage

* rm comment
  • Loading branch information
royjhan authored Jul 19, 2024
1 parent 51b2fd2 commit c57317c
Show file tree
Hide file tree
Showing 2 changed files with 266 additions and 170 deletions.
1 change: 1 addition & 0 deletions openai/openai.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading

0 comments on commit c57317c

Please sign in to comment.