mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-27 17:23:08 +00:00
refactor to not mess up process...
This commit is contained in:
parent
6e9405ba95
commit
df62979b90
5 changed files with 346 additions and 424 deletions
|
|
@ -9,6 +9,7 @@ from pydantic import BaseModel, Field
|
|||
|
||||
from atroposlib.envs.server_handling.openai_server import OpenAIServer
|
||||
from atroposlib.envs.server_handling.server_baseline import (
|
||||
APIServer,
|
||||
APIServerConfig,
|
||||
ServerBaseline,
|
||||
)
|
||||
|
|
@ -29,11 +30,11 @@ class ServerManager:
|
|||
def __init__(
|
||||
self,
|
||||
configs: Union[ServerBaseline, List[APIServerConfig]],
|
||||
server_class=None,
|
||||
server_class: APIServer = APIServer,
|
||||
slurm=False,
|
||||
testing=False,
|
||||
):
|
||||
if server_class is None:
|
||||
if type(server_class) is APIServer:
|
||||
if isinstance(configs, ServerBaseline):
|
||||
if configs.server_type == "openai":
|
||||
server_class = OpenAIServer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue