nat.plugins.eval.fastapi.routes#

Evaluation route registration.

Attributes#

Functions#

_add_evaluate_route(worker, app, session_manager)

Add the evaluate endpoint to the FastAPI app.

_add_evaluate_item_route(worker, app, session_manager)

Add the single-item evaluation endpoint to the FastAPI app.

add_evaluate_routes(worker, app, session_manager)

Add the evaluate and evaluate_item routes to the FastAPI app.

Module Contents#

logger#
async _add_evaluate_route(
worker: Any,
app: fastapi.FastAPI,
session_manager: nat.runtime.session.SessionManager,
)#

Add the evaluate endpoint to the FastAPI app.

async _add_evaluate_item_route(
worker: Any,
app: fastapi.FastAPI,
session_manager: nat.runtime.session.SessionManager,
)#

Add the single-item evaluation endpoint to the FastAPI app.

async add_evaluate_routes(
worker: Any,
app: fastapi.FastAPI,
session_manager: nat.runtime.session.SessionManager,
)#

Add the evaluate and evaluate_item routes to the FastAPI app.