This repository has been archived on 2024-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
2024-05-07 17:03:41 -06:00
|
|
|
from pydantic import BaseModel
|
|
|
|
|
2024-05-07 12:20:53 -06:00
|
|
|
from llm_server.config.global_config import GlobalConfig
|
|
|
|
|
|
|
|
|
|
|
|
def cluster_worker_count():
|
|
|
|
count = 0
|
|
|
|
for item in GlobalConfig.get().cluster:
|
2024-05-07 17:03:41 -06:00
|
|
|
count += item.concurrent_gens
|
2024-05-07 12:20:53 -06:00
|
|
|
return count
|
2023-08-21 21:28:52 -06:00
|
|
|
|
2023-08-23 23:11:12 -06:00
|
|
|
|
2024-05-07 17:03:41 -06:00
|
|
|
class ModeUINameStr(BaseModel):
|
|
|
|
name: str
|
|
|
|
api_name: str
|
|
|
|
streaming_name: str
|
|
|
|
|
|
|
|
|
|
|
|
MODE_UI_NAMES = {
|
|
|
|
'ooba': ModeUINameStr(name='Text Gen WebUI (ooba)', api_name='Blocking API url', streaming_name='Streaming API url'),
|
|
|
|
'vllm': ModeUINameStr(name='Text Gen WebUI (ooba)', api_name='Blocking API url', streaming_name='Streaming API url'),
|
2023-08-23 23:11:12 -06:00
|
|
|
}
|