Skip to content

openai_models

OpenAI-Compatible Models API.

Provides API endpoints for models using the OpenAI API Models specification.

Attributes

RESOURCE_MODELS module-attribute

RESOURCE_MODELS = 'Models'

models_router module-attribute

models_router = APIRouter(
    prefix=format_path(RESOURCE_MODELS),
    tags=[RESOURCE_MODELS],
    responses=DEFAULT_HTTP_ERROR_RESPONSES,
)

Classes

Functions

list_models async

list_models(
    sa_session: SASession = Depends(db_session_dependency),
    neo4j_session: NJSession = Depends(
        neo4j_session_dependency
    ),
    job_pool: ThreadPoolExecutor = Depends(
        job_pool_dependency
    ),
)

Lists the currently available models, and provides basic information about each one such as the owner and availability. Models are namespace specific and follow the following convention: [namespace.name]-[model_ref]. The [model_ref] value must be present configured in the Eleanor Framework backend configuration.