mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-14 15:57:27 +00:00
Async generation helps remove many roadblocks to managing tasks using threads. It should allow for abortables and modern-day paradigms. NOTE: Exllamav2 itself is not an asynchronous library. It's just been added into tabby's async nature to allow for a fast and concurrent API server. It's still being debated to run stream_ex in a separate thread or manually manage it using asyncio.sleep(0) Signed-off-by: kingbri <bdashore3@proton.me>
15 lines
383 B
Python
15 lines
383 B
Python
import pathlib
|
|
|
|
from endpoints.OAI.types.lora import LoraCard, LoraList
|
|
|
|
|
|
def get_lora_list(lora_path: pathlib.Path):
|
|
"""Get the list of Lora cards from the provided path."""
|
|
lora_list = LoraList()
|
|
for path in lora_path.iterdir():
|
|
if path.is_dir():
|
|
lora_card = LoraCard(id=path.name)
|
|
lora_list.data.append(lora_card)
|
|
|
|
return lora_list
|