HTTP Transport¶
FastAPI dependencies, SSE streaming, and HTTP-layer utilities. Connects the HTTP API to the chat and strategy services.
Overview¶
Dependencies — Request-scoped deps: auth, DB session, repository injection. Injected into router handlers.
Streaming — SSE (Server-Sent Events) for chat. Event formatting, chunk encoding, stream lifecycle.
Application Factory¶
Purpose: FastAPI application entrypoint. Creates the app with middleware, lifecycle management (database init, Redis, Qdrant), router registration, and startup background tasks (RAG ingestion).
Design: The factory pattern (create_app()) enables testing with different
configurations and ensures clean setup/teardown of database connections, Redis
pools, and Qdrant clients via FastAPI lifespan events.
FastAPI application entrypoint.
- veupath_chatbot.main.lifespan(app)[source]¶
Application lifespan handler.
- Return type:
AsyncGenerator[None]
Background Jobs¶
Purpose: Background job for RAG ingestion at API startup. Incrementally
ingests WDK catalog data and public strategies into Qdrant when
rag_enabled=true and OPENAI_API_KEY is set.
Developer Tools¶
Purpose: Developer tooling for keeping the OpenAPI spec in sync with the
FastAPI application. Generates packages/spec/openapi.yaml and
packages/shared-ts/src/openapi.generated.ts from the running app’s schema.
This is intentionally NOT run at runtime — it writes repo files during
development.
Developer tooling for keeping OpenAPI spec in sync.
This is intentionally NOT run by the API at runtime. It writes repo files.
Dependencies¶
Purpose: FastAPI dependencies. Provide auth context, DB session, repository injection, and experiment ownership checks. Used by routers.
Key functions: get_current_user_with_db_row(),
get_experiment_owned_by_user()
Dependency injection for HTTP routes.
- async veupath_chatbot.transport.http.deps.get_user_repo(session)[source]¶
Get user repository.
- Return type:
- async veupath_chatbot.transport.http.deps.get_control_set_repo(session)[source]¶
Get control set repository.
- Return type:
- async veupath_chatbot.transport.http.deps.get_stream_repo(session)[source]¶
Get stream repository.
- Return type:
- async veupath_chatbot.transport.http.deps.get_current_user_with_db_row(user_id, user_repo)[source]¶
Ensure authenticated users exist in the local DB.
We persist user IDs because many tables have a FK to users.id. Without this, first-time sessions can trigger integrity errors that bubble up as 500s.
- Return type:
- async veupath_chatbot.transport.http.deps.get_experiment_owned_by_user(experiment_id, user_id)[source]¶
Resolve an experiment by ID and verify the current user owns it.
- Return type:
SSE Helpers¶
Purpose: SSE event formatting utilities. Encode events as SSE-formatted
strings with proper data: prefixes and newline terminators.
Reusable SSE (Server-Sent Events) stream helpers for experiment endpoints.
All experiment SSE generators share a common pattern: 1. Create an asyncio queue for events 2. Launch a background task that produces events via the queue 3. Format each event as SSE text and yield to the client 4. Terminate when a sentinel event type is received
This module extracts that pattern into sse_stream().
- async veupath_chatbot.transport.http.sse.sse_stream(producer, end_event_types)[source]¶
Generic SSE event stream driven by an async producer function.
- Parameters:
producer (Callable[[Callable[[JSONObject], Awaitable[None]]], Awaitable[None]]) – An async callable that receives a
send(event)callback and pushes{"type": ..., "data": ...}dicts into it.end_event_types (set[str]) – Set of event type strings that signal end-of-stream. When the consumer sees one of these, it yields the final SSE frame and stops iterating.
- Return type:
If the producer raises without sending an end event, an
internal_errorevent is injected automatically so the consumer never hangs.
Routers¶
FastAPI routers that define the HTTP API surface. Each router handles a specific domain area.
Chat endpoint — starts a background chat operation.
- async veupath_chatbot.transport.http.routers.chat.chat(request, body, user_repo, stream_repo, user_id)[source]¶
Start a chat operation and return its operation ID.
The client subscribes to GET /operations/{operationId}/subscribe for SSE events.
- Return type:
JSONResponse
Site listing, record types, and search catalog endpoints.
- async veupath_chatbot.transport.http.routers.sites.catalog.list_sites()[source]¶
List all available VEuPathDB sites.
- Return type:
- async veupath_chatbot.transport.http.routers.sites.catalog.get_record_types(siteId)[source]¶
Get record types available on a site.
- Return type:
- async veupath_chatbot.transport.http.routers.sites.catalog.get_searches(siteId, record_type=None)[source]¶
Get searches available on a site, optionally filtered by record type.
- Return type:
Gene search and resolve endpoints.
- class veupath_chatbot.transport.http.routers.sites.genes.GeneSearchResultResponse(*, geneId, displayName='', organism='', product='', geneName='', geneType='', location='', matchedFields=[])[source]¶
Bases:
BaseModelA single gene result from site-search.
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.routers.sites.genes.GeneSearchResponse(*, results, totalCount, suggestedOrganisms=[])[source]¶
Bases:
BaseModelPaginated gene search response.
- results: list[GeneSearchResultResponse]¶
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.routers.sites.genes.GeneResolveRequest(*, geneIds)[source]¶
Bases:
BaseModelRequest body for gene ID resolution.
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.routers.sites.genes.ResolvedGeneResponse(*, geneId, displayName='', organism='', product='', geneName='', geneType='', location='')[source]¶
Bases:
BaseModelA resolved gene record.
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.routers.sites.genes.GeneResolveResponse(*, resolved, unresolved)[source]¶
Bases:
BaseModelGene ID resolution response.
- resolved: list[ResolvedGeneResponse]¶
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.routers.sites.genes.OrganismsResponse(*, organisms)[source]¶
Bases:
BaseModelAvailable organisms for a site.
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- async veupath_chatbot.transport.http.routers.sites.genes.list_organisms(siteId)[source]¶
Return all available organism names for a site via site-search.
- Return type:
- async veupath_chatbot.transport.http.routers.sites.genes.search_genes(siteId, q='', organism=None, limit=50, offset=0)[source]¶
Search genes by text using multi-strategy gene lookup.
- Return type:
- async veupath_chatbot.transport.http.routers.sites.genes.resolve_genes(siteId, payload)[source]¶
Resolve gene IDs to full records via WDK standard reporter.
- Return type:
Parameter-related endpoints: dependent params, validation, param specs.
- async veupath_chatbot.transport.http.routers.sites.params.validate_search_params(siteId, recordType, searchName, payload)[source]¶
Validate search parameters (UI-friendly).
- Return type:
- async veupath_chatbot.transport.http.routers.sites.params.get_param_specs_with_context(siteId, recordType, searchName, payload)[source]¶
Return normalized parameter specs, using contextual WDK vocab when provided.
- Return type:
Models endpoint — exposes available LLM models and their status.
- class veupath_chatbot.transport.http.routers.models.ModelCatalogEntryResponse(*, id, name, provider, model, description='', supportsReasoning=False, enabled=True, contextSize=0, defaultReasoningBudget=0, inputPrice=0.0, cachedInputPrice=0.0, outputPrice=0.0)[source]¶
Bases:
BaseModelA single model in the catalog — for API responses.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.routers.models.ModelListResponse(*, models, default, defaultReasoningEffort)[source]¶
Bases:
BaseModelResponse for the /models endpoint.
- models: list[ModelCatalogEntryResponse]¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- async veupath_chatbot.transport.http.routers.models.list_models()[source]¶
Return available models grouped by provider.
Models whose provider has no API key are returned with
enabled: falseso the frontend can render them as disabled in the picker.- Return type:
Health check endpoints.
- async veupath_chatbot.transport.http.routers.health.health_check()[source]¶
Liveness check - is the service running?
- Return type:
- async veupath_chatbot.transport.http.routers.health.system_config()[source]¶
Report whether the system has LLM provider keys configured.
This is unauthenticated so the frontend can show a setup-required screen before asking users to log in.
- Return type:
- async veupath_chatbot.transport.http.routers.health.readiness_check()[source]¶
Readiness check - is the service ready to accept requests?
Checks database connectivity and Qdrant availability (if RAG is enabled). Returns 503 if any dependency is unreachable.
- Return type:
HealthResponse | JSONResponse
CRUD endpoints for reusable control gene sets.
- class veupath_chatbot.transport.http.routers.control_sets.CreateControlSetRequest(*, name, siteId, recordType, positiveIds=<factory>, negativeIds=<factory>, source=None, tags=<factory>, provenanceNotes=None, isPublic=False)[source]¶
Bases:
BaseModelPayload for creating a new control set.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.routers.control_sets.ControlSetResponse(*, id, name, siteId, recordType, positiveIds, negativeIds, source=None, tags, provenanceNotes=None, version, isPublic, userId=None, createdAt)[source]¶
Bases:
BaseModelSerialized control set returned to the client.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- async veupath_chatbot.transport.http.routers.control_sets.list_control_sets(repo, user_id, site_id=Query(None), tags=None)[source]¶
List control sets visible to the current user.
- Return type:
- async veupath_chatbot.transport.http.routers.control_sets.get_control_set(control_set_id, repo, user_id)[source]¶
Get a single control set by ID.
- Return type:
- async veupath_chatbot.transport.http.routers.control_sets.create_control_set(body, repo, user_id)[source]¶
Create a new control set.
- Return type:
- async veupath_chatbot.transport.http.routers.control_sets.delete_control_set(control_set_id, repo, user_id)[source]¶
Delete a control set owned by the current user.
VEuPathDB OAuth login bridge.
On successful VEuPathDB login the endpoint also creates/looks-up the internal
Pathfinder user (via User.external_id = email) and returns a
pathfinder-auth token so the frontend has a stable identity across sessions.
- class veupath_chatbot.transport.http.routers.veupathdb_auth.LoginPayload(*, email, password)[source]¶
Bases:
BaseModel- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- async veupath_chatbot.transport.http.routers.veupathdb_auth.login_with_password(user_repo, payload=None, redirect_to=Query(None), site_id=Query(veupathdb))[source]¶
Login via VEuPathDB /login, link internal user, and store auth cookies.
- Return type:
JSONResponse
- async veupath_chatbot.transport.http.routers.veupathdb_auth.logout(site_id=Query(veupathdb))[source]¶
Clear local auth cookie and log out of VEuPathDB.
- Return type:
JSONResponse
- async veupath_chatbot.transport.http.routers.veupathdb_auth.refresh_internal_auth(request, user_repo, site_id=Query(veupathdb))[source]¶
Re-derive the internal
pathfinder-authtoken from a live VEuPathDB session.Called on page load when the internal token is missing/expired but the VEuPathDB
Authorizationcookie is still valid.- Return type:
JSONResponse
- async veupath_chatbot.transport.http.routers.veupathdb_auth.auth_status(request, site_id=Query(veupathdb))[source]¶
Return current VEuPathDB auth status.
In mock mode (
PATHFINDER_CHAT_PROVIDER=mock), a validpathfinder-authcookie is sufficient — the dev-login endpoint doesn’t create a VEuPathDB session, so we skip the real WDK call.- Return type:
_AuthStatusDict
Development-only endpoints (available only when chat_provider=mock).
- async veupath_chatbot.transport.http.routers.dev.dev_login(user_repo, user_id=None)[source]¶
Create a test user and return a valid auth token.
Only available when
PATHFINDER_CHAT_PROVIDER=mock(e2e / local dev).Pass
?user_id=worker-0to create isolated users per Playwright worker so parallel tests don’t share data.- Return type:
JSONResponse
Download endpoint for AI-generated export files.
- async veupath_chatbot.transport.http.routers.exports.download_export(export_id)[source]¶
Serve a previously generated export file.
Export IDs are uuid4 tokens with a 10-minute TTL. No auth required.
- Return type:
StreamingResponse
Gene set management endpoints.
Thin transport layer: parse HTTP request, call service, return HTTP response.
All business logic lives in services.gene_sets.operations.
- async veupath_chatbot.transport.http.routers.gene_sets.create_gene_set(request, body, user_id)[source]¶
Create a new gene set.
- Return type:
- async veupath_chatbot.transport.http.routers.gene_sets.list_gene_sets(user_id, site_id=Query(None))[source]¶
List all gene sets for the current user, optionally filtered by site.
- Return type:
- async veupath_chatbot.transport.http.routers.gene_sets.get_gene_set(gene_set_id, user_id)[source]¶
Get a gene set by ID.
- Return type:
- async veupath_chatbot.transport.http.routers.gene_sets.delete_gene_set(gene_set_id, user_id)[source]¶
Delete a gene set.
- async veupath_chatbot.transport.http.routers.gene_sets.set_operations(request, user_id)[source]¶
Perform set operations (intersect, union, minus) between two gene sets.
- Return type:
- async veupath_chatbot.transport.http.routers.gene_sets.reverse_search(body, user_id)[source]¶
Rank the user’s gene sets by how well they recover the given positive genes.
- Return type:
- async veupath_chatbot.transport.http.routers.gene_sets.ensemble_scoring(body, user_id)[source]¶
Score genes by frequency across multiple gene sets.
- Return type:
- async veupath_chatbot.transport.http.routers.gene_sets.enrich_gene_set(gene_set_id, request, user_id)[source]¶
Run enrichment analysis on a gene set.
- Return type:
- async veupath_chatbot.transport.http.routers.gene_sets.get_gene_set_attributes(gene_set_id, user_id)[source]¶
Get available attributes for a gene set’s record type.
- Return type:
- async veupath_chatbot.transport.http.routers.gene_sets.get_gene_set_records(gene_set_id, user_id, offset=Query(0), limit=Query(50), sort=None, dir='ASC', attributes=None, filter_attribute=Query(None), filter_value=Query(None))[source]¶
Get paginated result records for a gene set.
- Return type:
- async veupath_chatbot.transport.http.routers.gene_sets.get_gene_set_distribution(gene_set_id, attribute_name, user_id)[source]¶
Get distribution data for an attribute using the byValue column reporter.
- Return type:
- async veupath_chatbot.transport.http.routers.gene_sets.get_gene_set_record_detail(gene_set_id, body, user_id)[source]¶
Get a single record’s full details by primary key.
- Return type:
- async veupath_chatbot.transport.http.routers.gene_sets.gene_confidence(body)[source]¶
Compute per-gene composite confidence scores from classification data.
- Return type:
Internal endpoints — not for production use.
- class veupath_chatbot.transport.http.routers.internal.SSESchemaIndex(*, message_start=None, user_message=None, assistant_delta=None, assistant_message=None, tool_call_start=None, tool_call_end=None, subkani_task_start=None, subkani_tool_call_start=None, subkani_tool_call_end=None, subkani_task_end=None, token_usage_partial=None, model_selected=None, optimization_progress=None, optimization_trial=None, optimization_parameter_spec=None, error=None, graph_snapshot=None, strategy_meta=None, graph_plan=None, strategy_update=None, strategy_link=None, graph_cleared=None, executor_build_request=None, gene_set_summary=None, workbench_gene_set=None, citations=None, planning_artifact=None, reasoning=None, message_end=None)[source]¶
Bases:
BaseModelIndex of all SSE event data schemas. Never called – exists for OpenAPI generation.
- message_start: MessageStartEventData | None¶
- user_message: UserMessageEventData | None¶
- assistant_delta: AssistantDeltaEventData | None¶
- assistant_message: AssistantMessageEventData | None¶
- tool_call_start: ToolCallStartEventData | None¶
- tool_call_end: ToolCallEndEventData | None¶
- subkani_task_start: SubKaniTaskStartEventData | None¶
- subkani_tool_call_start: SubKaniToolCallStartEventData | None¶
- subkani_tool_call_end: SubKaniToolCallEndEventData | None¶
- subkani_task_end: SubKaniTaskEndEventData | None¶
- token_usage_partial: TokenUsagePartialEventData | None¶
- model_selected: ModelSelectedEventData | None¶
- optimization_progress: OptimizationProgressEventData | None¶
- optimization_trial: OptimizationTrialData | None¶
- optimization_parameter_spec: OptimizationParameterSpecData | None¶
- error: ErrorEventData | None¶
- graph_snapshot: GraphSnapshotEventData | None¶
- strategy_meta: StrategyMetaEventData | None¶
- graph_plan: GraphPlanEventData | None¶
- strategy_update: StrategyUpdateEventData | None¶
- strategy_link: StrategyLinkEventData | None¶
- graph_cleared: GraphClearedEventData | None¶
- executor_build_request: ExecutorBuildRequestEventData | None¶
- gene_set_summary: GeneSetSummary | None¶
- workbench_gene_set: WorkbenchGeneSetEventData | None¶
- citations: CitationsEventData | None¶
- planning_artifact: PlanningArtifactEventData | None¶
- reasoning: ReasoningEventData | None¶
- message_end: MessageEndEventData | None¶
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- async veupath_chatbot.transport.http.routers.internal.sse_schemas()[source]¶
SSE event data schemas – for OpenAPI generation only.
- Return type:
- class veupath_chatbot.transport.http.routers.internal.ExperimentSchemaIndex(*, experiment=None, experiment_summary=None, experiment_config=None, confusion_matrix=None, experiment_metrics=None, gene_info=None, fold_metrics=None, cross_validation_result=None, enrichment_term=None, enrichment_result=None, rank_metrics=None, confidence_interval=None, negative_set_variant=None, bootstrap_result=None, step_evaluation=None, operator_variant=None, operator_comparison=None, step_contribution=None, parameter_sweep_point=None, parameter_sensitivity=None, step_analysis_result=None, optimization_spec=None, threshold_knob=None, operator_knob=None, tree_optimization_trial=None, tree_optimization_result=None, trial_progress_data=None, step_analysis_progress_data=None, experiment_progress_data=None, optimization_result=None, control_set_summary=None, citation=None, planning_artifact=None)[source]¶
Bases:
BaseModelIndex of all experiment response schemas. Never called – exists for OpenAPI generation.
- experiment: ExperimentResponse | None¶
- experiment_summary: ExperimentSummaryResponse | None¶
- experiment_config: ExperimentConfigResponse | None¶
- confusion_matrix: ConfusionMatrixResponse | None¶
- experiment_metrics: ExperimentMetricsResponse | None¶
- gene_info: GeneInfoResponse | None¶
- fold_metrics: FoldMetricsResponse | None¶
- cross_validation_result: CrossValidationResultResponse | None¶
- enrichment_term: EnrichmentTermResponse | None¶
- enrichment_result: EnrichmentResultResponse | None¶
- rank_metrics: RankMetricsResponse | None¶
- confidence_interval: ConfidenceIntervalResponse | None¶
- negative_set_variant: NegativeSetVariantResponse | None¶
- bootstrap_result: BootstrapResultResponse | None¶
- step_evaluation: StepEvaluationResponse | None¶
- operator_variant: OperatorVariantResponse | None¶
- operator_comparison: OperatorComparisonResponse | None¶
- step_contribution: StepContributionResponse | None¶
- parameter_sweep_point: ParameterSweepPointResponse | None¶
- parameter_sensitivity: ParameterSensitivityResponse | None¶
- step_analysis_result: StepAnalysisResultResponse | None¶
- optimization_spec: OptimizationSpecResponse | None¶
- threshold_knob: ThresholdKnobResponse | None¶
- operator_knob: OperatorKnobResponse | None¶
- tree_optimization_trial: TreeOptimizationTrialResponse | None¶
- tree_optimization_result: TreeOptimizationResultResponse | None¶
- trial_progress_data: TrialProgressDataResponse | None¶
- step_analysis_progress_data: StepAnalysisProgressDataResponse | None¶
- experiment_progress_data: ExperimentProgressDataResponse | None¶
- optimization_result: OptimizationResultResponse | None¶
- control_set_summary: ControlSetSummaryResponse | None¶
- citation: CitationResponse | None¶
- planning_artifact: PlanningArtifactResponse | None¶
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- async veupath_chatbot.transport.http.routers.internal.experiment_schemas()[source]¶
Experiment response schemas – for OpenAPI generation only.
- Return type:
Operations endpoints: subscribe via Redis Streams, discover active operations.
- async veupath_chatbot.transport.http.routers.operations.subscribe(operation_id, session, user_id, last_event_id=Query(None))[source]¶
SSE stream backed by Redis Streams.
Catchup: replays events from lastEventId (or from the beginning). Live: uses XREAD BLOCK for new events until a terminal event is seen.
- Return type:
StreamingResponse
- async veupath_chatbot.transport.http.routers.operations.cancel(operation_id, session, user_id)[source]¶
Cancel a running operation.
For chat operations this cancels the background asyncio task running the LLM agent. The producer’s CancelledError handler emits a
message_endevent so any connected subscribers close cleanly.- Return type:
- async veupath_chatbot.transport.http.routers.operations.list_active(session, user_id, stream_id=Query(None), type=Query(None))[source]¶
List active operations, optionally filtered by stream and/or type.
- Return type:
Tools endpoint — returns the list of AI tools available to the agent.
- async veupath_chatbot.transport.http.routers.tools.list_tools()[source]¶
Return the list of AI tools registered on the agent.
- Return type:
User data management — purge endpoints.
- async veupath_chatbot.transport.http.routers.user_data.purge_user_data(user_id, stream_repo, site_id=Query(None), delete_wdk=Query(False))[source]¶
Purge user data from all local stores.
When
deleteWdk=false(default): non-WDK streams are hard-deleted, WDK-linked projections are dismissed so WDK sync won’t re-import them. The strategies remain on VEuPathDB but PathFinder ignores them.When
deleteWdk=true: everything is hard-deleted locally AND all WDK strategies are deleted from VEuPathDB.Always deletes: gene sets, experiments, control sets, Redis streams.
Pass
?siteId=Xto limit to one site, or omit for everything.- Return type:
Strategy CRUD endpoints — CQRS only (streams + stream_projections).
- async veupath_chatbot.transport.http.routers.strategies.crud.list_strategies(stream_repo, user_id, site_id=None)[source]¶
List user’s conversation streams (projections).
- Return type:
- async veupath_chatbot.transport.http.routers.strategies.crud.list_dismissed_strategies(stream_repo, user_id, site_id=None)[source]¶
List user’s dismissed (soft-deleted) strategies.
- Return type:
- async veupath_chatbot.transport.http.routers.strategies.crud.create_strategy(request, stream_repo, user_id)[source]¶
Create a new strategy (CQRS only).
- Return type:
- async veupath_chatbot.transport.http.routers.strategies.crud.get_strategy(strategyId, stream_repo, user_id)[source]¶
Get a strategy/stream by ID from the CQRS projection + Redis.
- Return type:
- async veupath_chatbot.transport.http.routers.strategies.crud.update_strategy(strategyId, request, stream_repo, user_id)[source]¶
Update a strategy (CQRS only).
- Return type:
- async veupath_chatbot.transport.http.routers.strategies.crud.delete_strategy(strategyId, stream_repo, user_id, delete_from_wdk=False)[source]¶
Delete a strategy: cancel ops, clean Redis stream, delete CQRS records.
For WDK-linked strategies with
deleteFromWdk=false(default), the strategy is soft-deleted (dismissed) instead of hard-deleted. This prevents WDK sync from re-importing it. Use the restore endpoint to un-dismiss.Pass
deleteFromWdk=trueto hard-delete from both PathFinder and WDK. Non-WDK strategies are always hard-deleted.- Return type:
Response
- async veupath_chatbot.transport.http.routers.strategies.crud.get_strategy_ast(strategyId, stream_repo, user_id)[source]¶
Return the raw plan AST from a strategy’s projection.
- Return type:
- async veupath_chatbot.transport.http.routers.strategies.crud.restore_strategy(strategyId, stream_repo, user_id)[source]¶
Restore a dismissed (soft-deleted) strategy.
Clears dismissed_at, resets plan to empty (triggers lazy WDK re-fetch), and wipes message history. The strategy reappears as if freshly imported.
- Return type:
Plan normalization endpoints (frontend-consumer alignment).
- async veupath_chatbot.transport.http.routers.strategies.plan.normalize_plan(payload)[source]¶
Normalize/coerce plan parameters using backend-owned rules.
This endpoint exists so the frontend can be a consumer of backend canonicalization (and avoid re-implementing CSV/JSON parsing and WDK quirks).
- Return type:
Strategy counts endpoints (WDK-backed).
- async veupath_chatbot.transport.http.routers.strategies.counts.compute_step_counts(request, user_id)[source]¶
Compute step counts by executing the plan in WDK.
- Return type:
WDK-backed strategy endpoints (open/import/sync/list).
- async veupath_chatbot.transport.http.routers.strategies.wdk_import.open_strategy(request, stream_repo, user_id)[source]¶
Open a strategy by local or WDK strategy.
- Return type:
- async veupath_chatbot.transport.http.routers.strategies.wdk_import.sync_all_wdk_strategies(site_id, stream_repo, user_id, background_tasks)[source]¶
Batch-sync all WDK strategies into the CQRS layer and return the full list.
- Return type:
CRUD endpoints for experiments: list, get, update, delete.
- class veupath_chatbot.transport.http.routers.experiments.crud.PatchExperimentRequest(*, notes=None)[source]¶
Bases:
BaseModelRequest body for PATCH /experiments/{experiment_id}.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- async veupath_chatbot.transport.http.routers.experiments.crud.list_experiments(user_id, siteId=None)[source]¶
List experiments owned by the current user, optionally filtered by site.
- Return type:
- async veupath_chatbot.transport.http.routers.experiments.crud.get_experiment(exp, user_id)[source]¶
Get full experiment details including all results.
- Return type:
- async veupath_chatbot.transport.http.routers.experiments.crud.update_experiment(exp, body, user_id)[source]¶
Update experiment metadata (e.g. notes).
- Return type:
- async veupath_chatbot.transport.http.routers.experiments.crud.delete_experiment(exp, user_id)[source]¶
Delete an experiment and clean up its WDK strategy.
- Return type:
Response
Experiment execution endpoints: create, batch, benchmark.
- async veupath_chatbot.transport.http.routers.experiments.execution.create_experiment(request, body, user_id)[source]¶
Create and run an experiment as a background task.
- Return type:
JSONResponse
- async veupath_chatbot.transport.http.routers.experiments.execution.create_batch_experiment(request, body, user_id)[source]¶
Run the same search across multiple organisms as a background task.
- Return type:
JSONResponse
- async veupath_chatbot.transport.http.routers.experiments.execution.create_benchmark(request, body, user_id)[source]¶
Run the same strategy against multiple control sets as a background task.
- Return type:
JSONResponse
- async veupath_chatbot.transport.http.routers.experiments.execution.seed_strategies(user_id, stream_repo, control_set_repo, site_id=None)[source]¶
Seed demo strategies and control sets across VEuPathDB sites.
If site_id is provided, only seeds for that database are created.
- Return type:
StreamingResponse
Evaluation endpoints: re-evaluate, threshold-sweep, export.
- async veupath_chatbot.transport.http.routers.experiments.evaluation.re_evaluate_experiment(exp, user_id)[source]¶
Re-run control evaluation against the (possibly modified) strategy.
- Return type:
- async veupath_chatbot.transport.http.routers.experiments.evaluation.threshold_sweep(exp, request, user_id)[source]¶
Sweep a parameter across a range and stream metrics as they complete.
- Return type:
StreamingResponse
- async veupath_chatbot.transport.http.routers.experiments.evaluation.get_experiment_report(exp, user_id)[source]¶
Generate and return a self-contained HTML report for an experiment.
- Return type:
StreamingResponse
Analysis endpoints: cross-validate, enrich, re-evaluate, threshold-sweep, etc.
Mounts sub-routers for each analysis domain. Non-parametric routes (overlap, enrichment-compare) are included first so they don’t get shadowed by /{experiment_id} parametric routes.
Cross-validation endpoint for experiments.
- async veupath_chatbot.transport.http.routers.experiments.cross_validation.run_cv(exp, request, user_id)[source]¶
Run cross-validation on an existing experiment.
- Return type:
Enrichment analysis endpoints for experiments.
- async veupath_chatbot.transport.http.routers.experiments.enrichment.run_enrichment(exp, request, user_id)[source]¶
Run enrichment analysis on an existing experiment’s results.
- Return type:
- async veupath_chatbot.transport.http.routers.experiments.enrichment.custom_enrichment(exp, request, user_id)[source]¶
Test enrichment of a custom gene set against the experiment results.
- Return type:
Cross-experiment comparison endpoints: overlap and enrichment comparison.
- async veupath_chatbot.transport.http.routers.experiments.comparison.compute_overlap(body, user_id)[source]¶
Compute pairwise gene set overlap between experiments.
- Return type:
- async veupath_chatbot.transport.http.routers.experiments.comparison.compare_enrichment(body, user_id)[source]¶
Compare enrichment results across experiments.
- Return type:
Workbench chat endpoints — conversational AI per experiment.
- async veupath_chatbot.transport.http.routers.experiments.chat.workbench_chat(experiment_id, body, user_repo, stream_repo, user_id)[source]¶
Start a conversational AI chat for an experiment.
Returns operation ID for SSE subscription via GET /operations/{operationId}/subscribe.
- Return type:
- async veupath_chatbot.transport.http.routers.experiments.chat.get_workbench_chat_messages(experiment_id, user_id, stream_repo, user_repo)[source]¶
Get conversation history for an experiment’s chat.
- Return type:
Results endpoints: records, record detail, attributes, distributions, refine.
- async veupath_chatbot.transport.http.routers.experiments.results.get_experiment_attributes(exp, user_id)[source]¶
Get available attributes for an experiment’s record type.
- Return type:
- async veupath_chatbot.transport.http.routers.experiments.results.get_experiment_records(exp, user_id, offset=Query(0), limit=Query(50), sort=None, dir='ASC', attributes=None, filter_attribute=Query(None), filter_value=Query(None))[source]¶
Get paginated result records for an experiment.
Requires a persisted WDK strategy (
wdkStepIdmust be set).- Return type:
- async veupath_chatbot.transport.http.routers.experiments.results.get_experiment_record_detail(exp, body, user_id)[source]¶
Get a single record’s full details by primary key.
- Return type:
- async veupath_chatbot.transport.http.routers.experiments.results.get_experiment_distribution(exp, attribute_name, user_id)[source]¶
Get distribution data for an attribute using the byValue column reporter.
- Return type:
Workbench Chat¶
Purpose: Workbench chat orchestration. Mirrors the main chat orchestrator but scoped to (user_id, experiment_id) pairs for experiment-context conversations.
Workbench chat orchestration entrypoint (service layer).
Mirrors services/chat/orchestrator.py but scoped to experiment-bound workbench conversations. Streams are keyed by (user_id, experiment_id) instead of an explicit strategy UUID.
AI-layer dependencies (workbench agent factory, model resolver) are
injected at startup via configure() — the transport layer calls
this once to wire the concrete implementations so that the services
layer never imports from veupath_chatbot.ai.
- veupath_chatbot.services.workbench_chat.orchestrator.configure(*, create_workbench_agent_fn, resolve_model_id_fn)[source]¶
Wire AI-layer implementations into the workbench chat orchestrator.
Called once at application startup from the composition root.
Parameters¶
- create_workbench_agent_fn:
Factory that builds a Kani workbench agent for a chat turn.
- resolve_model_id_fn:
Resolves the effective model ID from overrides and persisted state.
- async veupath_chatbot.services.workbench_chat.orchestrator.start_workbench_chat_stream(*, message, site_id, experiment_id, user_id, user_repo, stream_repo, provider_override=None, model_override=None, reasoning_effort=None)[source]¶
Start a background workbench chat operation and return its identifiers.
Returns
(operation_id, stream_id)so the caller can hand them to the client. The client subscribes toGET /operations/{operation_id}/subscribefor SSE events.Only fast, essential work runs synchronously (user lookup, stream resolution, operation registration, user_message emission). All heavy lifting is deferred into the background producer.
Schemas¶
Pydantic request/response models (DTOs) for the HTTP API.
Chat request/response DTOs.
- class veupath_chatbot.transport.http.schemas.chat.ChatMention(*, type, id, displayName)[source]¶
Bases:
BaseModelA reference to a strategy or experiment included via @-mention.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.chat.ChatRequest(*, strategyId=None, siteId, message, provider=None, model=None, reasoningEffort=None, disableRag=False, temperature=None, seed=None, contextSize=None, responseTokens=None, reasoningBudget=None, disabledTools=<factory>, mentions=<factory>)[source]¶
Bases:
BaseModelRequest to send a chat message.
- mentions: list[ChatMention]¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.chat.ToolCallResponse(*, id, name, arguments, result=None)[source]¶
Bases:
BaseModelTool call information.
- arguments: JSONObject¶
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.chat.SubKaniTokenUsageResponse(*, promptTokens, completionTokens, llmCallCount=0, estimatedCostUsd=0.0)[source]¶
Bases:
BaseModelToken usage for a single sub-kani agent.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.chat.SubKaniActivityResponse(*, calls, status, models=None, tokenUsage=None)[source]¶
Bases:
BaseModelSub-kani tool call activity.
- calls: dict[str, list[ToolCallResponse]]¶
- token_usage: dict[str, SubKaniTokenUsageResponse] | None¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.chat.ThinkingResponse(*, toolCalls=None, lastToolCalls=None, subKaniCalls=None, subKaniStatus=None, reasoning=None, updatedAt=None)[source]¶
Bases:
BaseModelIn-progress tool call state.
- tool_calls: list[ToolCallResponse] | None¶
- last_tool_calls: list[ToolCallResponse] | None¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.chat.TokenUsageResponse(*, promptTokens, completionTokens, totalTokens, cachedTokens=0, toolCallCount, registeredToolCount, llmCallCount=0, subKaniPromptTokens=0, subKaniCompletionTokens=0, subKaniCallCount=0, estimatedCostUsd=0.0, modelId='')[source]¶
Bases:
BaseModelToken usage statistics for a message turn.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.chat.CitationResponse(*, id, source, tag=None, title, url=None, authors=None, year=None, doi=None, pmid=None, snippet=None, accessedAt=None)[source]¶
Bases:
BaseModelCitation from research tools.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.chat.PlanningArtifactResponse(*, id, title, summaryMarkdown, assumptions=<factory>, parameters=<factory>, proposedStrategyPlan=None, createdAt)[source]¶
Bases:
BaseModelStrategy planning artifact.
- proposed_strategy_plan: JSONObject | None¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.chat.MessageResponse(*, role, content, modelId=None, toolCalls=None, subKaniActivity=None, citations=None, planningArtifacts=None, reasoning=None, optimizationProgress=None, tokenUsage=None, timestamp)[source]¶
Bases:
BaseModelChat message.
- tool_calls: list[ToolCallResponse] | None¶
- sub_kani_activity: SubKaniActivityResponse | None¶
- citations: list[CitationResponse] | None¶
- planning_artifacts: list[PlanningArtifactResponse] | None¶
- optimization_progress: OptimizationProgressEventData | None¶
- token_usage: TokenUsageResponse | None¶
- model_config = {'extra': 'ignore', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Strategy request/response DTOs.
- class veupath_chatbot.transport.http.schemas.strategies.StepCountsRequest(*, siteId, plan)[source]¶
Bases:
BaseModelRequest to compute step counts from a plan.
- plan: StrategyPlan¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.strategies.StepCountsResponse(*, counts)[source]¶
Bases:
BaseModelStep counts keyed by local step ID.
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.strategies.WdkStrategySummaryResponse(*, wdkStrategyId, name, siteId, wdkUrl=None, rootStepId=None, isSaved=None, isInternal=False)[source]¶
Bases:
BaseModelWDK strategy summary for list views (backend-only).
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.strategies.OpenStrategyRequest(*, strategyId=None, wdkStrategyId=None, siteId=None)[source]¶
Bases:
BaseModelRequest to open a strategy.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.strategies.OpenStrategyResponse(*, strategyId)[source]¶
Bases:
BaseModelOpen strategy response.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.strategies.StrategyResponse(*, id, name, title=None, description=None, siteId, recordType, steps=<factory>, rootStepId=None, wdkStrategyId=None, isSaved=False, messages=None, thinking=None, modelId=None, createdAt, updatedAt, stepCount=None, resultCount=None, wdkUrl=None, geneSetId=None, dismissedAt=None)[source]¶
Bases:
BaseModelUnified strategy response — used for both list and detail views.
List views:
stepsis[],stepCount/resultCountare populated. Detail views:stepsis populated, summary fields may also be set.- steps: list[StepResponse]¶
- messages: list[MessageResponse] | None¶
- thinking: ThinkingResponse | None¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.strategies.CreateStrategyRequest(*, name, siteId, plan)[source]¶
Bases:
BaseModelRequest to create a strategy.
- plan: StrategyPlan¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.strategies.UpdateStrategyRequest(*, name=None, plan=None, wdkStrategyId=None, isSaved=None)[source]¶
Bases:
BaseModelRequest to update a strategy.
- plan: StrategyPlan | None¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Strategy plan (DSL) request/response DTOs.
These models make the plan contract explicit in OpenAPI instead of using dict[str, Any], which is a major source of drift.
- class veupath_chatbot.transport.http.schemas.plan.PlanMetadata(*, name=None, description=None, siteId=None, createdAt=None)[source]¶
Bases:
BaseModel- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.plan.StepFilterSpec(*, name, value, disabled=False)[source]¶
Bases:
BaseModel- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.plan.StepAnalysisSpec(*, analysisType, parameters=<factory>, customName=None)[source]¶
Bases:
BaseModel- parameters: JSONObject¶
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.plan.StepReportSpec(*, reportName='standard', config=<factory>)[source]¶
Bases:
BaseModel- config: JSONObject¶
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.plan.BasePlanNode(*, id=None, displayName=None, filters=None, analyses=None, reports=None, **extra_data)[source]¶
Bases:
BaseModel- filters: list[StepFilterSpec] | None¶
- analyses: list[StepAnalysisSpec] | None¶
- reports: list[StepReportSpec] | None¶
- model_config = {'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.plan.ColocationParams(*, upstream, downstream, strand='both')[source]¶
Bases:
BaseModel- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.plan.PlanNode(*, id=None, displayName=None, filters=None, analyses=None, reports=None, searchName, parameters=<factory>, primaryInput=None, secondaryInput=None, operator=None, colocationParams=None, **extra_data)[source]¶
Bases:
BasePlanNodeUntyped recursive plan node (WDK-aligned).
Kind is inferred from structure: - combine: primaryInput + secondaryInput - transform: primaryInput only - search: no inputs
- parameters: JSONObject¶
- colocationParams: ColocationParams | None¶
- model_config = {'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.plan.StrategyPlan(*, recordType, root, metadata=None, **extra_data)[source]¶
Bases:
BaseModel- metadata: PlanMetadata | None¶
- model_config = {'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.plan.PlanNormalizeRequest(*, siteId, plan)[source]¶
Bases:
BaseModel- plan: StrategyPlan¶
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.plan.PlanNormalizeResponse(*, plan, warnings=None)[source]¶
Bases:
BaseModel- plan: StrategyPlan¶
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Sites request/response DTOs.
- class veupath_chatbot.transport.http.schemas.sites.SiteResponse(*, id, name, displayName, baseUrl, projectId, isPortal)[source]¶
Bases:
BaseModelVEuPathDB site information.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sites.RecordTypeResponse(*, name, displayName, description=None)[source]¶
Bases:
BaseModelRecord type information.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sites.SearchResponse(*, name, displayName, description=None, recordType)[source]¶
Bases:
BaseModelSearch information.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sites.DependentParamsRequest(*, parameterName, contextValues=<factory>)[source]¶
Bases:
BaseModelDependent parameter values request.
- context_values: JSONObject¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sites.SearchDetailsResponse(*, searchData=None, validation=None, searchConfig=None, parameters=None, paramMap=None, question=None, **extra_data)[source]¶
Bases:
BaseModelSearch details payload (UI-facing).
- search_data: JSONObject | None¶
- validation: JSONObject | None¶
- search_config: JSONObject | None¶
- param_map: JSONObject | None¶
- question: JSONObject | None¶
- model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sites.DependentParamsResponse(root=PydanticUndefined)[source]¶
Bases:
RootModel[JSONArray]Dependent parameter values response.
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sites.SearchValidationRequest(*, contextValues=<factory>)[source]¶
Bases:
BaseModelSearch parameter validation request.
- context_values: JSONObject¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sites.ParamSpecsRequest(*, contextValues=<factory>)[source]¶
Bases:
BaseModelParameter specs request (optionally contextual).
- context_values: JSONObject¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sites.SearchValidationErrors(*, general=<factory>, byKey=<factory>)[source]¶
Bases:
BaseModel- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sites.SearchValidationPayload(*, isValid, normalizedContextValues=<factory>, errors=<factory>)[source]¶
Bases:
BaseModel- normalized_context_values: JSONObject¶
- errors: SearchValidationErrors¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sites.SearchValidationResponse(*, validation)[source]¶
Bases:
BaseModelStable validation response for UI consumption.
- validation: SearchValidationPayload¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sites.ParamSpecResponse(*, name, displayName=None, type, allowEmptyValue=False, allowMultipleValues=None, multiPick=None, minSelectedCount=None, maxSelectedCount=None, countOnlyLeaves=False, initialDisplayValue=None, vocabulary=None, min=None, max=None, isNumber=False, increment=None, displayType=None, isVisible=True, group=None, dependentParams=<factory>, help=None)[source]¶
Bases:
BaseModelNormalized parameter spec (UI-friendly).
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Step request/response DTOs.
- class veupath_chatbot.transport.http.schemas.steps.StepFilterResponse(*, name, value, disabled=False)[source]¶
Bases:
BaseModelFilter attached to a step.
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.steps.StepFiltersResponse(*, filters)[source]¶
Bases:
BaseModelContainer for step filters.
- filters: list[StepFilterResponse]¶
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.steps.StepAnalysisResponse(*, analysisType, parameters=<factory>, customName=None)[source]¶
Bases:
BaseModelAnalysis configuration attached to a step.
- parameters: JSONObject¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.steps.StepReportResponse(*, reportName='standard', config=<factory>)[source]¶
Bases:
BaseModelReport configuration attached to a step.
- config: JSONObject¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.steps.StepAnalysisRunResponse(*, analysis, wdk=None)[source]¶
Bases:
BaseModelResult of running a step analysis.
- analysis: StepAnalysisResponse¶
- wdk: JSONObject | None¶
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.steps.StepReportRunResponse(*, report, wdk=None)[source]¶
Bases:
BaseModelResult of running a step report.
- report: StepReportResponse¶
- wdk: JSONObject | None¶
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.steps.StepResponse(*, id, kind=None, displayName, searchName=None, recordType=None, parameters=None, operator=None, colocationParams=None, primaryInputStepId=None, secondaryInputStepId=None, resultCount=None, wdkStepId=None, filters=None, analyses=None, reports=None, validationError=None)[source]¶
Bases:
BaseModelStrategy step.
- parameters: JSONObject | None¶
- colocation_params: ColocationParams | None¶
- filters: list[StepFilterResponse] | None¶
- analyses: list[StepAnalysisResponse] | None¶
- reports: list[StepReportResponse] | None¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.steps.StepFilterRequest(*, value, disabled=False)[source]¶
Bases:
BaseModelRequest to set or update a step filter.
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.steps.StepAnalysisRequest(*, analysisType, parameters=<factory>, customName=None)[source]¶
Bases:
BaseModelRequest to run a step analysis.
- parameters: JSONObject¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.steps.StepReportRequest(*, reportName='standard', config=<factory>)[source]¶
Bases:
BaseModelRequest to run a step report.
- config: JSONObject¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.steps.PrimaryKeyPart(*, name, value)[source]¶
Bases:
BaseModelA single part of a composite WDK primary key.
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.steps.RecordDetailRequest(*, primaryKey)[source]¶
Bases:
BaseModelRequest to fetch a single record by primary key.
- primary_key: list[PrimaryKeyPart]¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Experiment Lab request/response DTOs.
- class veupath_chatbot.transport.http.schemas.experiments.ThresholdKnobRequest(*, stepId, paramName, minVal=0, maxVal=1, stepSize=None)[source]¶
Bases:
BaseModelA numeric parameter knob for tree optimization.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiments.OperatorKnobRequest(*, combineNodeId, options=<factory>)[source]¶
Bases:
BaseModelA boolean-operator knob for tree optimization.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiments.OptimizationSpecRequest(*, name, type, min=None, max=None, step=None, choices=None)[source]¶
Bases:
BaseModelDescribes a single parameter to optimise.
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiments.CreateExperimentRequest(*, siteId, recordType, mode='single', searchName='', parameters=<factory>, stepTree=None, sourceStrategyId=None, optimizationTargetStep=None, positiveControls, negativeControls, controlsSearchName, controlsParamName, controlsValueFormat='newline', enableCrossValidation=False, kFolds=5, enrichmentTypes=<factory>, name='Untitled Experiment', description='', optimizationSpecs=None, optimizationBudget=30, optimizationObjective=None, parameterDisplayValues=None, enableStepAnalysis=False, stepAnalysisPhases=None, controlSetId=None, thresholdKnobs=None, operatorKnobs=None, treeOptimizationObjective='precision_at_50', treeOptimizationBudget=50, maxListSize=None, sortAttribute=None, sortDirection='ASC', parentExperimentId=None, targetGeneIds=None)[source]¶
Bases:
BaseModelRequest to create and run an experiment.
Supports three modes:
single(default),multi-step, andimport.- parameters: JSONObject¶
- optimization_specs: list[OptimizationSpecRequest] | None¶
- optimization_objective: Literal['f1', 'f_beta', 'recall', 'precision', 'specificity', 'balanced_accuracy', 'mcc', 'youdens_j', 'custom'] | None¶
- parameter_display_values: JSONObject | None¶
- threshold_knobs: list[ThresholdKnobRequest] | None¶
- operator_knobs: list[OperatorKnobRequest] | None¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiments.BatchOrganismTargetRequest(*, organism, positiveControls=None, negativeControls=None)[source]¶
Bases:
BaseModelPer-organism override for a cross-organism batch experiment.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiments.CreateBatchExperimentRequest(*, base, organismParamName, targetOrganisms)[source]¶
Bases:
BaseModelRequest to run the same search across multiple organisms.
- base: CreateExperimentRequest¶
- target_organisms: list[BatchOrganismTargetRequest]¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiments.RunCrossValidationRequest(*, kFolds=5)[source]¶
Bases:
BaseModelRequest to run cross-validation on an existing experiment.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiments.RunEnrichmentRequest(*, enrichmentTypes)[source]¶
Bases:
BaseModelRequest to run enrichment on an existing experiment.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiments.ThresholdSweepRequest(*, parameterName, sweepType='numeric', minValue=None, maxValue=None, steps=10, values=None)[source]¶
Bases:
BaseModelRequest to sweep a parameter across a range (numeric) or set of values (categorical).
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiments.RunAnalysisRequest(*, analysisName, parameters=<factory>)[source]¶
Bases:
BaseModelRequest to run a WDK step analysis.
- parameters: JSONObject¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiments.RefineRequest(*, action, searchName='', parameters=<factory>, operator='INTERSECT', transformName='')[source]¶
Bases:
BaseModelRequest to refine an experiment’s strategy.
- parameters: JSONObject¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiments.CustomEnrichRequest(*, geneSetName, geneIds)[source]¶
Bases:
BaseModelRequest to run a custom gene-set enrichment test.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiments.BenchmarkControlSet(*, label, positiveControls, negativeControls, controlSetId=None, isPrimary=False)[source]¶
Bases:
BaseModelA single control set within a benchmark suite.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiments.CreateBenchmarkRequest(*, base, controlSets)[source]¶
Bases:
BaseModelRequest to run a benchmark suite across multiple control sets.
- base: CreateExperimentRequest¶
- control_sets: list[BenchmarkControlSet]¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiments.OverlapRequest(*, experimentIds)[source]¶
Bases:
BaseModelRequest to compute pairwise gene set overlap between experiments.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiments.EnrichmentCompareRequest(*, experimentIds, analysisType=None)[source]¶
Bases:
BaseModelRequest to compare enrichment results across experiments.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiments.AiAssistRequest(*, siteId, step, message, context=<factory>, history=<factory>, model=None)[source]¶
Bases:
BaseModelRequest for the experiment wizard AI assistant.
- context: JSONObject¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Health request/response DTOs.
- class veupath_chatbot.transport.http.schemas.health.HealthResponse(*, status, version, timestamp)[source]¶
Bases:
BaseModelHealth check response.
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.health.ProviderStatus(*, openai, anthropic, google, ollama)[source]¶
Bases:
BaseModelPer-provider API-key availability.
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.health.SystemConfigResponse(*, chat_provider, llm_configured, providers)[source]¶
Bases:
BaseModelSystem configuration status (unauthenticated).
- providers: ProviderStatus¶
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
VEuPathDB auth request/response DTOs.
- class veupath_chatbot.transport.http.schemas.veupathdb_auth.AuthSuccessResponse(*, success)[source]¶
Bases:
BaseModelSuccess response. Auth token is set via httpOnly cookie only.
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.veupathdb_auth.AuthStatusResponse(*, signedIn, name=None, email=None)[source]¶
Bases:
BaseModelCurrent auth status response.
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
HTTP request/response schemas for gene sets.
- class veupath_chatbot.transport.http.schemas.gene_sets.CreateGeneSetRequest(*, name, siteId, geneIds, source='paste', wdkStrategyId=None, wdkStepId=None, searchName=None, recordType=None, parameters=None)[source]¶
Bases:
BaseModelCreate a gene set from IDs, strategy, or upload.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.gene_sets.GeneSetResponse(*, id, name, siteId, geneIds, source, geneCount, wdkStrategyId=None, wdkStepId=None, searchName=None, recordType=None, parameters=None, parentSetIds=<factory>, operation=None, createdAt, stepCount=1)[source]¶
Bases:
BaseModelGene set response DTO.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.gene_sets.SetOperationRequest(*, setAId, setBId, operation, name)[source]¶
Bases:
BaseModelPerform set operations between two gene sets.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.gene_sets.GeneSetEnrichRequest(*, enrichmentTypes)[source]¶
Bases:
BaseModelRun enrichment on a gene set.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.gene_sets.EnsembleScoringRequest(*, geneSetIds, positiveControls=None)[source]¶
Bases:
BaseModelCompute ensemble frequency scores across multiple gene sets.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.gene_sets.ReverseSearchRequest(*, positiveGeneIds, negativeGeneIds=None, siteId)[source]¶
Bases:
BaseModelRank user’s gene sets by recall of given positive genes.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.gene_sets.ReverseSearchResultItem(*, geneSetId, name, searchName=None, recall, precision, f1, resultCount, overlapCount)[source]¶
Bases:
BaseModelA single ranked gene set in reverse search results.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.gene_sets.RunGeneSetAnalysisRequest(*, analysisName, parameters=<factory>)[source]¶
Bases:
BaseModelRun a WDK step analysis on a gene set.
- parameters: JSONObject¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.gene_sets.GeneConfidenceRequest(*, tpIds, fpIds, fnIds, tnIds, ensembleScores=None, enrichmentGeneCounts=None, maxEnrichmentTerms=1)[source]¶
Bases:
BaseModelCompute per-gene confidence scores from classification data.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.gene_sets.GeneConfidenceScoreResponse(*, geneId, compositeScore, classificationScore, ensembleScore, enrichmentScore)[source]¶
Bases:
BaseModelSingle gene confidence score in the response.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Schemas for workbench chat endpoints.
- class veupath_chatbot.transport.http.schemas.workbench_chat.WorkbenchChatRequest(*, message, siteId, provider=None, model=None, reasoningEffort=None)[source]¶
Bases:
BaseModel- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.workbench_chat.WorkbenchChatResponse(*, operationId, streamId)[source]¶
Bases:
BaseModel- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Optimization event/response models shared by chat and SSE schemas.
- class veupath_chatbot.transport.http.schemas.optimization.OptimizationTrialData(*, trialNumber, parameters=<factory>, score=0.0, recall=None, falsePositiveRate=None, resultCount=None, positiveHits=None, negativeHits=None, totalPositives=None, totalNegatives=None)[source]¶
Bases:
BaseModelA single optimization trial result.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.optimization.OptimizationParameterSpecData(*, name, type, minValue=None, maxValue=None, logScale=None, choices=None)[source]¶
Bases:
BaseModelSpecification for one optimization parameter.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.optimization.OptimizationProgressEventData(*, optimizationId, status='', searchName=None, recordType=None, budget=None, objective=None, currentTrial=None, totalTrials=None, parameterSpecs=None, trial=None, bestTrial=None, recentTrials=None, allTrials=None, paretoFrontier=None, sensitivity=None, totalTimeSeconds=None, error=None)[source]¶
Bases:
BaseModelPayload for
optimization_progressSSE events.- parameter_specs: list[OptimizationParameterSpecData] | None¶
- trial: OptimizationTrialData | None¶
- best_trial: OptimizationTrialData | None¶
- recent_trials: list[OptimizationTrialData] | None¶
- all_trials: list[OptimizationTrialData] | None¶
- pareto_frontier: list[OptimizationTrialData] | None¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
SSE event payload schemas — typed Pydantic models for every SSE event.
- class veupath_chatbot.transport.http.schemas.sse.MessageStartEventData(*, strategyId=None, strategy=None)[source]¶
Bases:
BaseModelPayload for
message_startSSE events.- strategy: JSONObject | None¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.UserMessageEventData(*, messageId=None, content=None)[source]¶
Bases:
BaseModelPayload for
user_messageSSE events.- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.AssistantDeltaEventData(*, messageId=None, delta=None)[source]¶
Bases:
BaseModelPayload for
assistant_deltaSSE events (streaming tokens).- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.AssistantMessageEventData(*, messageId=None, content=None)[source]¶
Bases:
BaseModelPayload for
assistant_messageSSE events (complete message).- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.MessageEndEventData(*, modelId=None, promptTokens=None, completionTokens=None, totalTokens=None, cachedTokens=None, toolCallCount=None, registeredToolCount=None, llmCallCount=None, subKaniPromptTokens=None, subKaniCompletionTokens=None, subKaniCallCount=None, estimatedCostUsd=None)[source]¶
Bases:
BaseModelPayload for
message_endSSE events — mirrors TokenUsageResponse.- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.ToolCallStartEventData(*, id, name, arguments=None)[source]¶
Bases:
BaseModelPayload for
tool_call_startSSE events.- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.ToolCallEndEventData(*, id, result=None)[source]¶
Bases:
BaseModelPayload for
tool_call_endSSE events.- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.SubKaniTaskStartEventData(*, task=None, modelId=None)[source]¶
Bases:
BaseModelPayload for
subkani_task_startSSE events.- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.SubKaniToolCallStartEventData(*, task=None, id, name, arguments=None)[source]¶
Bases:
BaseModelPayload for
subkani_tool_call_startSSE events.- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.SubKaniToolCallEndEventData(*, task=None, id, result=None)[source]¶
Bases:
BaseModelPayload for
subkani_tool_call_endSSE events.- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.SubKaniTaskEndEventData(*, task=None, status=None, modelId=None, promptTokens=None, completionTokens=None, llmCallCount=None, estimatedCostUsd=None)[source]¶
Bases:
BaseModelPayload for
subkani_task_endSSE events.- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.TokenUsagePartialEventData(*, promptTokens=None, registeredToolCount=None)[source]¶
Bases:
BaseModelPayload for
token_usage_partialSSE events.- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.ModelSelectedEventData(*, modelId)[source]¶
Bases:
BaseModelPayload for
model_selectedSSE events.- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.ErrorEventData(*, error)[source]¶
Bases:
BaseModelPayload for
errorSSE events.- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.GraphSnapshotEventData(*, graphSnapshot=None)[source]¶
Bases:
BaseModelPayload for
graph_snapshotSSE events.- graph_snapshot: JSONObject | None¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.StrategyMetaEventData(*, graphId=None, graphName=None, name=None, description=None, recordType=None)[source]¶
Bases:
BaseModelPayload for
strategy_metaSSE events.- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.GraphPlanEventData(*, graphId=None, plan=None, name=None, recordType=None, description=None)[source]¶
Bases:
BaseModelPayload for
graph_planSSE events.- plan: JSONObject | None¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.StrategyUpdateEventData(*, graphId=None, step=None)[source]¶
Bases:
BaseModelPayload for
strategy_updateSSE events.- step: JSONObject | None¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.StrategyLinkEventData(*, graphId=None, wdkStrategyId=None, wdkUrl=None, name=None, description=None, isSaved=None)[source]¶
Bases:
BaseModelPayload for
strategy_linkSSE events.- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.GraphClearedEventData(*, graphId=None)[source]¶
Bases:
BaseModelPayload for
graph_clearedSSE events.- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.ExecutorBuildRequestEventData(*, executorBuildRequest=None)[source]¶
Bases:
BaseModelPayload for
executor_build_requestSSE events.- executor_build_request: JSONObject | None¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.GeneSetSummary(*, id=None, name=None, geneCount=None, source=None, siteId=None)[source]¶
Bases:
BaseModelSummary of a gene set — nested model, not a top-level event.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.WorkbenchGeneSetEventData(*, geneSet=None)[source]¶
Bases:
BaseModelPayload for
workbench_gene_setSSE events.- gene_set: GeneSetSummary | None¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.CitationsEventData(*, citations=None)[source]¶
Bases:
BaseModelPayload for
citationsSSE events.- citations: list[CitationResponse] | None¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.PlanningArtifactEventData(*, planningArtifact=None)[source]¶
Bases:
BaseModelPayload for
planning_artifactSSE events.- planning_artifact: PlanningArtifactResponse | None¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.sse.ReasoningEventData(*, reasoning=None)[source]¶
Bases:
BaseModelPayload for
reasoningSSE events.- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Pydantic response models for experiment types.
These models mirror the dataclasses in services.experiment.types but exist
in the transport layer so they appear in the OpenAPI schema and get
auto-generated as TypeScript types.
All field aliases use camelCase to match the existing to_json codec output.
- class veupath_chatbot.transport.http.schemas.experiment_responses.ConfusionMatrixResponse(*, truePositives, falsePositives, trueNegatives, falseNegatives)[source]¶
Bases:
BaseModel2x2 confusion matrix counts.
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.ExperimentMetricsResponse(*, confusionMatrix, sensitivity, specificity, precision, f1Score, mcc, balancedAccuracy, negativePredictiveValue=0.0, falsePositiveRate=0.0, falseNegativeRate=0.0, youdensJ=0.0, totalResults=0, totalPositives=0, totalNegatives=0)[source]¶
Bases:
BaseModelFull classification metrics derived from a confusion matrix.
- confusion_matrix: ConfusionMatrixResponse¶
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.GeneInfoResponse(*, id, name=None, organism=None, product=None)[source]¶
Bases:
BaseModelMinimal gene metadata.
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.FoldMetricsResponse(*, foldIndex, metrics, positiveControlIds=<factory>, negativeControlIds=<factory>)[source]¶
Bases:
BaseModelMetrics for a single cross-validation fold.
- metrics: ExperimentMetricsResponse¶
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.CrossValidationResultResponse(*, k, folds, meanMetrics, stdMetrics=<factory>, overfittingScore=0.0, overfittingLevel='low')[source]¶
Bases:
BaseModelAggregated cross-validation result.
- folds: list[FoldMetricsResponse]¶
- mean_metrics: ExperimentMetricsResponse¶
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.EnrichmentTermResponse(*, termId, termName, geneCount, backgroundCount, foldEnrichment, oddsRatio, pValue, fdr, bonferroni, genes=<factory>)[source]¶
Bases:
BaseModelSingle enriched term from WDK analysis.
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.EnrichmentResultResponse(*, analysisType, terms, totalGenesAnalyzed=0, backgroundSize=0, error=None)[source]¶
Bases:
BaseModelResults for a single enrichment analysis type.
- terms: list[EnrichmentTermResponse]¶
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.RankMetricsResponse(*, precisionAtK=<factory>, recallAtK=<factory>, enrichmentAtK=<factory>, prCurve=<factory>, listSizeVsRecall=<factory>, totalResults=0)[source]¶
Bases:
BaseModelRank-based evaluation metrics computed over an ordered result list.
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.ConfidenceIntervalResponse(*, lower=0.0, mean=0.0, upper=0.0, std=0.0)[source]¶
Bases:
BaseModelBootstrap confidence interval for a single metric.
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.NegativeSetVariantResponse(*, label, rankMetrics, negativeCount=0)[source]¶
Bases:
BaseModelRank metrics evaluated with an alternative negative control set.
- rank_metrics: RankMetricsResponse¶
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.BootstrapResultResponse(*, nIterations=0, metricCis=<factory>, rankMetricCis=<factory>, topKStability=0.0, negativeSetSensitivity=<factory>)[source]¶
Bases:
BaseModelRobustness assessment via bootstrap resampling.
- metric_cis: dict[str, ConfidenceIntervalResponse]¶
- rank_metric_cis: dict[str, ConfidenceIntervalResponse]¶
- negative_set_sensitivity: list[NegativeSetVariantResponse]¶
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.StepEvaluationResponse(*, stepId, searchName, displayName, resultCount, positiveHits, positiveTotal, negativeHits, negativeTotal, recall, falsePositiveRate, capturedPositiveIds=<factory>, capturedNegativeIds=<factory>, tpMovement=0, fpMovement=0, fnMovement=0)[source]¶
Bases:
BaseModelPer-leaf-step evaluation against controls.
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.OperatorVariantResponse(*, operator, positiveHits, negativeHits, totalResults, recall, falsePositiveRate, f1Score)[source]¶
Bases:
BaseModelMetrics for one boolean operator at a combine node.
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.OperatorComparisonResponse(*, combineNodeId, currentOperator, variants=<factory>, recommendation='', recommendedOperator='', precisionAtKDelta=<factory>)[source]¶
Bases:
BaseModelComparison of operators at a single combine node.
- variants: list[OperatorVariantResponse]¶
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.StepContributionResponse(*, stepId, searchName, baselineRecall, ablatedRecall, recallDelta, baselineFpr, ablatedFpr, fprDelta, verdict, enrichmentDelta=0.0, narrative='')[source]¶
Bases:
BaseModelAblation analysis for one leaf step.
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.ParameterSweepPointResponse(*, value, positiveHits, negativeHits, totalResults, recall, fpr, f1)[source]¶
Bases:
BaseModelOne data point in a parameter sensitivity sweep.
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.ParameterSensitivityResponse(*, stepId, paramName, currentValue, sweepPoints=<factory>, recommendedValue=0.0, recommendation='')[source]¶
Bases:
BaseModelSensitivity sweep for one numeric parameter on one leaf step.
- sweep_points: list[ParameterSweepPointResponse]¶
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.StepAnalysisResultResponse(*, stepEvaluations=<factory>, operatorComparisons=<factory>, stepContributions=<factory>, parameterSensitivities=<factory>)[source]¶
Bases:
BaseModelContainer for all deterministic step analysis results.
- step_evaluations: list[StepEvaluationResponse]¶
- operator_comparisons: list[OperatorComparisonResponse]¶
- step_contributions: list[StepContributionResponse]¶
- parameter_sensitivities: list[ParameterSensitivityResponse]¶
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.OptimizationSpecResponse(*, name, type, min=None, max=None, step=None, choices=None)[source]¶
Bases:
BaseModelDescribes a single parameter to optimise.
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.ThresholdKnobResponse(*, stepId, paramName, minVal, maxVal, stepSize=None)[source]¶
Bases:
BaseModelA numeric parameter on a leaf step that can be tuned.
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.OperatorKnobResponse(*, combineNodeId, options=<factory>)[source]¶
Bases:
BaseModelA combine-node operator that can be switched during optimization.
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.TreeOptimizationTrialResponse(*, trialNumber, parameters=<factory>, score=0.0, rankMetrics=None, listSize=0)[source]¶
Bases:
BaseModelOne trial during tree-knob optimization.
- rank_metrics: RankMetricsResponse | None¶
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.TreeOptimizationResultResponse(*, bestTrial=None, allTrials=<factory>, totalTimeSeconds=0.0, objective='')[source]¶
Bases:
BaseModelResult of multi-step tree-knob optimization.
- best_trial: TreeOptimizationTrialResponse | None¶
- all_trials: list[TreeOptimizationTrialResponse]¶
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.ExperimentConfigResponse(*, siteId, recordType, searchName, parameters, positiveControls, negativeControls, controlsSearchName, controlsParamName, controlsValueFormat='newline', enableCrossValidation=False, kFolds=5, enrichmentTypes=<factory>, name='', description='', optimizationSpecs=None, optimizationBudget=30, optimizationObjective='balanced_accuracy', parameterDisplayValues=None, mode='single', stepTree=None, sourceStrategyId=None, optimizationTargetStep=None, enableStepAnalysis=False, stepAnalysisPhases=<factory>, controlSetId=None, thresholdKnobs=None, operatorKnobs=None, treeOptimizationObjective='precision_at_50', treeOptimizationBudget=50, maxListSize=None, sortAttribute=None, sortDirection='ASC', parentExperimentId=None, targetGeneIds=None)[source]¶
Bases:
BaseModelFull configuration for an experiment run.
- parameters: JSONObject¶
- optimization_specs: list[OptimizationSpecResponse] | None¶
- optimization_objective: Literal['f1', 'f_beta', 'recall', 'precision', 'specificity', 'balanced_accuracy', 'mcc', 'youdens_j', 'custom']¶
- threshold_knobs: list[ThresholdKnobResponse] | None¶
- operator_knobs: list[OperatorKnobResponse] | None¶
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.ExperimentResponse(*, id, config, userId=None, status='pending', metrics=None, crossValidation=None, enrichmentResults=<factory>, truePositiveGenes=<factory>, falseNegativeGenes=<factory>, falsePositiveGenes=<factory>, trueNegativeGenes=<factory>, error=None, totalTimeSeconds=None, createdAt='', completedAt=None, batchId=None, benchmarkId=None, controlSetLabel=None, isPrimaryBenchmark=False, optimizationResult=None, wdkStrategyId=None, wdkStepId=None, notes=None, stepAnalysis=None, rankMetrics=None, robustness=None, treeOptimization=None)[source]¶
Bases:
BaseModelFull experiment with config and results.
- config: ExperimentConfigResponse¶
- metrics: ExperimentMetricsResponse | None¶
- cross_validation: CrossValidationResultResponse | None¶
- enrichment_results: list[EnrichmentResultResponse]¶
- true_positive_genes: list[GeneInfoResponse]¶
- false_negative_genes: list[GeneInfoResponse]¶
- false_positive_genes: list[GeneInfoResponse]¶
- true_negative_genes: list[GeneInfoResponse]¶
- optimization_result: JSONObject | None¶
- step_analysis: StepAnalysisResultResponse | None¶
- rank_metrics: RankMetricsResponse | None¶
- robustness: BootstrapResultResponse | None¶
- tree_optimization: TreeOptimizationResultResponse | None¶
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.ExperimentSummaryResponse(*, id, name, siteId, searchName, recordType, mode, status, f1Score=None, sensitivity=None, specificity=None, totalPositives, totalNegatives, createdAt, batchId=None, benchmarkId=None, controlSetLabel=None, isPrimaryBenchmark=False)[source]¶
Bases:
BaseModelLightweight experiment summary for list views.
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.TrialProgressDataResponse(*, trialNumber, totalTrials, status, score=None, recall=None, falsePositiveRate=None, resultCount=None, parameters=None)[source]¶
Bases:
BaseModelProgress data for a single optimization trial.
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.StepAnalysisProgressDataResponse(*, phase, currentStep=None, totalSteps=None, stepId=None, searchName=None, message=None)[source]¶
Bases:
BaseModelProgress data for step analysis.
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.ExperimentProgressDataResponse(*, phase, message=None, trialProgress=None, stepAnalysisProgress=None)[source]¶
Bases:
BaseModelProgress data for experiment execution.
- trial_progress: TrialProgressDataResponse | None¶
- step_analysis_progress: StepAnalysisProgressDataResponse | None¶
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.OptimizationResultResponse(*, optimizationId, status, bestTrial=None, allTrials=<factory>, paretoFrontier=<factory>, sensitivity=<factory>, totalTimeSeconds=0, totalTrials=0)[source]¶
Bases:
BaseModelComplete optimization result.
- best_trial: OptimizationTrialData | None¶
- all_trials: list[OptimizationTrialData]¶
- pareto_frontier: list[OptimizationTrialData]¶
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class veupath_chatbot.transport.http.schemas.experiment_responses.ControlSetSummaryResponse(*, id, name, source, organism=None, positiveCount, negativeCount)[source]¶
Bases:
BaseModelControl set summary for listing.
- model_config = {'from_attributes': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].