AxiomAi.EnvironmentManager (AxiomAI v0.1.11)
View SourceEnvironment Manager for handling different Python environments for various AI models.
This module provides functionality to create, manage, and switch between different Python environments tailored for specific AI model categories.
Summary
Functions
Create a new environment configuration.
Check if an environment is loaded and ready.
Execute code in a specific environment.
Get environment information for a specific category.
Get the list of available model environments.
Load environment dependencies for a specific model category.
Remove an environment configuration.
Functions
Create a new environment configuration.
Parameters
category: Model categorydependencies: List of Python dependenciespython_version: Python version (optional)
Returns
:okon success{:error, reason}on failure
Check if an environment is loaded and ready.
Parameters
category: Model category
Returns
trueif environment is loadedfalseif not loaded
Execute code in a specific environment.
Parameters
category: Model categorycode: Python code to executeauto_load: Whether to auto-load environment if not loaded (default: true)
Returns
{:ok, result}on success{:error, reason}on failure
Get environment information for a specific category.
Parameters
category: Model category
Returns
{:ok, info}with environment information{:error, reason}on failure
Get the list of available model environments.
Returns
- List of available environment categories
Load environment dependencies for a specific model category.
Parameters
category: Model category (e.g., :qwen, :llama, :whisper, :vision, :embeddings)force_reload: Whether to force reload the environment (default: false)
Returns
{:ok, deps}with list of dependencies{:error, reason}on failure
Remove an environment configuration.
Parameters
category: Model category to remove
Returns
:okon success{:error, reason}on failure