fix docstring missing + better exit if error
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
|
import sys
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from app.configs import AppConfig
|
from app.configs import AppConfig
|
||||||
from app.interface import *
|
from app.interface import *
|
||||||
@@ -34,3 +35,4 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(f"Application failed to start: {e}")
|
logging.error(f"Application failed to start: {e}")
|
||||||
|
sys.exit(1)
|
||||||
|
|||||||
@@ -154,8 +154,7 @@ class AgentsConfigs(BaseModel):
|
|||||||
Validate that the default models and strategy exist in the provided configurations.
|
Validate that the default models and strategy exist in the provided configurations.
|
||||||
If any default is not found, a ValueError is raised.
|
If any default is not found, a ValueError is raised.
|
||||||
Args:
|
Args:
|
||||||
models: ModelsConfig instance containing all available models.
|
configs: the AppConfig instance containing models and strategies.
|
||||||
strategies: list of Strategy instances containing all available strategies.
|
|
||||||
Raises:
|
Raises:
|
||||||
ValueError if any default model or strategy is not found.
|
ValueError if any default model or strategy is not found.
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user