Class: APIServer

APIServer()

APIServer class that encapsulates the entire API server functionality

Constructor

new APIServer()

Source:

Methods

(async) createEmbeddingConnector()

Create embedding connector using configuration-driven factory pattern

.

Create embedding connector using configuration-driven factory pattern

Source:

createHandler()

Helper function to create route handlers

.

Helper function to create route handlers

Source:

(async) createLLMConnector()

Create LLM connector based on configuration priority

.

Create LLM connector based on configuration priority

Source:

createStreamHandler()

Helper function to create streaming route handlers

.

Helper function to create streaming route handlers

Source:

(async) getModelConfig()

Get working model names from configuration

.

Get working model names from configuration

Source:

(async) initializeAPIs()

Initialize API endpoints

.

Initialize API endpoints

Source:

(async) initializeComponents()

Initialize API components

.

Initialize API components

Source:

initializeMiddleware()

Initialize all middleware

.

Initialize all middleware

Source:

setupRoutes()

Set up API routes

.

Set up API routes

Source:

setupSignalHandlers()

Setup signal handlers for graceful shutdown

.

Setup signal handlers for graceful shutdown

Source:

(async) start()

Start the API server

.

Start the API server

Source: