mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
feat: use AI provider chat APIs (#25415)
This commit is contained in:
@@ -1202,6 +1202,17 @@ func New(options *Options) *API {
|
||||
r.Delete("/", api.deleteUserSkill)
|
||||
})
|
||||
})
|
||||
r.Route("/users/{user}/ai-provider-keys", func(r chi.Router) {
|
||||
r.Use(
|
||||
apiKeyMiddleware,
|
||||
httpmw.ExtractUserParam(options.Database),
|
||||
)
|
||||
r.Get("/", api.listUserAIProviderKeyConfigs)
|
||||
r.Route("/{aiProvider}", func(r chi.Router) {
|
||||
r.Put("/", api.upsertUserAIProviderKey)
|
||||
r.Delete("/", api.deleteUserAIProviderKey)
|
||||
})
|
||||
})
|
||||
r.Route("/chats", func(r chi.Router) {
|
||||
r.Use(
|
||||
apiKeyMiddleware,
|
||||
|
||||
Reference in New Issue
Block a user