mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-21 19:15:00 +00:00
WIP
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
d7dee3a5ec
commit
8f507c39c0
6 changed files with 776 additions and 2 deletions
|
@ -2,6 +2,7 @@ package routes
|
|||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/websocket/v2"
|
||||
"github.com/mudler/LocalAI/core/application"
|
||||
"github.com/mudler/LocalAI/core/http/endpoints/localai"
|
||||
"github.com/mudler/LocalAI/core/http/endpoints/openai"
|
||||
|
@ -11,6 +12,9 @@ func RegisterOpenAIRoutes(app *fiber.App,
|
|||
application *application.Application) {
|
||||
// openAI compatible API endpoint
|
||||
|
||||
// realtime
|
||||
app.Get("/v1/realtime", websocket.New(openai.RegisterRealtime(cl, ml, appConfig)))
|
||||
|
||||
// chat
|
||||
app.Post("/v1/chat/completions",
|
||||
openai.ChatEndpoint(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue