mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-23 16:54:56 +00:00
Added flag for chat completion, switch in OpenAI client
This commit is contained in:
parent
81534f7c8a
commit
59b08a1aa9
3 changed files with 45 additions and 9 deletions
|
|
@ -152,7 +152,7 @@ class APIServer(ABC):
|
|||
self.eval_sem.update_weight(weight)
|
||||
|
||||
@abstractmethod
|
||||
async def check_server_status_task(self):
|
||||
async def check_server_status_task(self, chat_completion: bool = True):
|
||||
"""
|
||||
Check the status of the server. Should be overridden by the child class.
|
||||
Set self.server_healthy to True if the server is healthy.
|
||||
|
|
@ -320,7 +320,7 @@ class APIServer(ABC):
|
|||
if (
|
||||
self.config.base_url is not None
|
||||
): # skip health check if using OpenAI API
|
||||
self.check_task = asyncio.create_task(self.check_server_status_task())
|
||||
self.check_task = asyncio.create_task(self.check_server_status_task(chat_completion=False))
|
||||
else:
|
||||
self.server_healthy = True
|
||||
self.initialized = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue