mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-14 15:57:27 +00:00
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:
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user