add env var loading automation
- load config from env vars (eg. TABBY_NETWORK_HOST) - remove print statements - improve command line args automation
This commit is contained in:
parent
8e9344642e
commit
420fd84f6b
3 changed files with 26 additions and 19 deletions
8
main.py
8
main.py
|
|
@ -76,7 +76,9 @@ async def entrypoint_async():
|
|||
if config.lora.loras:
|
||||
lora_dir = pathlib.Path(config.lora.lora_dir)
|
||||
# TODO: remove model_dump()
|
||||
await model.container.load_loras(lora_dir.resolve(), **config.lora.model_dump())
|
||||
await model.container.load_loras(
|
||||
lora_dir.resolve(), **config.lora.model_dump()
|
||||
)
|
||||
|
||||
# If an initial embedding model name is specified, create a separate container
|
||||
# and load the model
|
||||
|
|
@ -87,7 +89,9 @@ async def entrypoint_async():
|
|||
|
||||
try:
|
||||
# TODO: remove model_dump()
|
||||
await model.load_embedding_model(embedding_model_path, **config.embeddings.model_dump())
|
||||
await model.load_embedding_model(
|
||||
embedding_model_path, **config.embeddings.model_dump()
|
||||
)
|
||||
except ImportError as ex:
|
||||
logger.error(ex.msg)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue