Skip to content

Commit

Permalink
feat(tools): support Tool calls in the API (#1715)
Browse files Browse the repository at this point in the history
* feat(tools): support Tools in the API

Co-authored-by: =?UTF-8?q?Stephan=20A=C3=9Fmus?= <stephan.assmus@sap.com>

* feat(tools): support function streaming

* Adhere to new return types when using tools instead of functions

* Keep backward compatibility with function calling

* Evaluate function names in chat templates

* Disable recovery with --debug

* Correctly stream out the entire result

* Detect when llm chooses to reply and to not perform any action in SSE

* Feedback from code review

---------

Co-authored-by: =?UTF-8?q?Stephan=20A=C3=9Fmus?= <stephan.assmus@sap.com>
  • Loading branch information
mudler and stippi2 committed Feb 17, 2024
1 parent 6b539a2 commit c72808f
Show file tree
Hide file tree
Showing 6 changed files with 286 additions and 92 deletions.
6 changes: 5 additions & 1 deletion api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ func App(opts ...options.AppOption) (*fiber.App, error) {
}

// Default middleware config
app.Use(recover.New())

if !options.Debug {
app.Use(recover.New())
}

if options.Metrics != nil {
app.Use(metrics.APIMiddleware(options.Metrics))
}
Expand Down
Loading

0 comments on commit c72808f

Please sign in to comment.