diff --git a/run.sh b/run.sh index 0fffd92..2b79123 100755 --- a/run.sh +++ b/run.sh @@ -8,4 +8,4 @@ else export LLAMA_N_CTX=8182 fi -poetry run python -m uvicorn skynet.main:app --reload +poetry run python -m skynet.main diff --git a/skynet/http_client.py b/skynet/http_client.py index 4d6bbdf..44cebcb 100644 --- a/skynet/http_client.py +++ b/skynet/http_client.py @@ -18,9 +18,9 @@ def _get_session(): return _session -async def get(url, type='json'): +async def get(url, type='json', **kwargs): session = _get_session() - async with session.get(url) as response: + async with session.get(url, **kwargs) as response: if type == 'json': return await response.json() diff --git a/skynet/modules/ttt/openai_api/app.py b/skynet/modules/ttt/openai_api/app.py index 307beae..2b6d647 100644 --- a/skynet/modules/ttt/openai_api/app.py +++ b/skynet/modules/ttt/openai_api/app.py @@ -3,7 +3,7 @@ from fastapi import FastAPI from skynet import http_client -from skynet.env import app_port, llama_n_ctx, llama_path, openai_api_base_url, use_vllm +from skynet.env import app_port, app_uuid, llama_n_ctx, llama_path, openai_api_base_url, use_vllm from skynet.logs import get_logger from skynet.utils import dependencies, responses @@ -51,7 +51,11 @@ async def is_ready(): url = f'{openai_api_base_url}/health' if use_vllm else openai_api_base_url try: - response = await http_client.get(url, 'text') + response = await http_client.get( + url, + 'text', + headers={'X-Skynet-UUID': app_uuid}, + ) if use_vllm: return response == ''