Allow users to specify OpenAI embedding and chat models

This commit is contained in:
perf3ct
2025-03-17 20:07:53 +00:00
parent d95fd0b049
commit 4a4eac6f25
4 changed files with 309 additions and 79 deletions

View File

@@ -62,6 +62,7 @@ import otherRoute from "./api/other.js";
import shareRoutes from "../share/routes.js";
import embeddingsRoute from "./api/embeddings.js";
import ollamaRoute from "./api/ollama.js";
import openaiRoute from "./api/openai.js";
import llmRoute from "./api/llm.js";
import etapiAuthRoutes from "../etapi/auth.js";
@@ -408,6 +409,9 @@ function register(app: express.Application) {
// Ollama API endpoints
route(PST, "/api/ollama/list-models", [auth.checkApiAuth, csrfMiddleware], ollamaRoute.listModels, apiResultHandler);
// OpenAI API endpoints
route(PST, "/api/openai/list-models", [auth.checkApiAuth, csrfMiddleware], openaiRoute.listModels, apiResultHandler);
// API Documentation
apiDocsRoute.register(app);