support /v1/embeddings (#4)

This commit is contained in:
Benson Wong
2024-12-17 17:23:26 -08:00
parent 7f45493a37
commit 6fe37c3abf
2 changed files with 15 additions and 0 deletions

View File

@@ -49,6 +49,9 @@ func New(config *Config) *ProxyManager {
// Set up routes using the Gin engine
pm.ginEngine.POST("/v1/chat/completions", pm.proxyChatRequestHandler)
// Support embeddings
pm.ginEngine.POST("/v1/embeddings", pm.proxyChatRequestHandler)
// Support legacy /v1/completions api, see issue #12
pm.ginEngine.POST("/v1/completions", pm.proxyChatRequestHandler)