dataflow.api.llms.api¶
API endpoints for LLM model information and availability.
This module provides FastAPI endpoints to access and manage LLM model data stored in Supabase. It helps bridge the client application with the database while providing additional server-side logic.
Attributes¶
Functions¶
Get all possible LLM capabilities. |
|
|
Get a specific model by ID with all related information. |
|
Get all models from the database. |
Get all possible LLM operation modes. |
|
|
Get all providers from the database. |
|
Get a specific model by ID. |
|
Get all models with optional filtering. |
Get all LLM providers. |
|
|
Get recommended models based on capabilities and task requirements. |
Module Contents¶
- async dataflow.api.llms.api.get_capabilities()¶
Get all possible LLM capabilities.
- dataflow.api.llms.api.get_model_by_id(model_id: str) dict[str, Any] | None¶
Get a specific model by ID with all related information.
- Parameters:
model_id – The model ID to look up
- Returns:
Model data with capabilities and pricing, or None if not found
- dataflow.api.llms.api.get_models(provider: str | None = None) list[dict[str, Any]]¶
Get all models from the database.
- Parameters:
provider – Optional provider name to filter by
- Returns:
List of models with their capabilities and pricing
- async dataflow.api.llms.api.get_modes()¶
Get all possible LLM operation modes.
- dataflow.api.llms.api.get_providers() list[haive.dataflow.api.llms.api.llms.models.Provider]¶
Get all providers from the database.
- async dataflow.api.llms.api.read_models(provider: str | None = None, capability: str | None = None)¶
Get all models with optional filtering.
- Parameters:
provider – Filter by provider name
capability – Filter by capability (e.g., ‘vision’, ‘function_calling’)
- async dataflow.api.llms.api.read_providers()¶
Get all LLM providers.
- async dataflow.api.llms.api.recommended_models(task: str | None = None, vision: bool | None = False, function_calling: bool | None = False, audio: bool | None = False, web_search: bool | None = False)¶
Get recommended models based on capabilities and task requirements.
- Parameters:
task – The type of task (chat, completion, embedding, etc.)
vision – Whether vision capabilities are required
function_calling – Whether function calling is required
audio – Whether audio processing is required
web_search – Whether web search is required
- dataflow.api.llms.api.SUPABASE_KEY¶
- dataflow.api.llms.api.SUPABASE_URL¶
- dataflow.api.llms.api.app¶
- dataflow.api.llms.api.supabase¶