Skip to content

Commit

Permalink
fix: runtime_tag added as header instead of payload (#315)
Browse files Browse the repository at this point in the history
runtime_tag added as header instead of payload
  • Loading branch information
camiloaz authored Dec 4, 2024
1 parent 5df1b80 commit 15e9461
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions vision_agent/tools/tool_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ def send_inference_request(
metadata_payload: Optional[Dict[str, Any]] = None,
is_form: bool = False,
) -> Any:
# TODO: runtime_tag and function_name should be metadata_payload and not included
# in the service payload
if runtime_tag := os.environ.get("RUNTIME_TAG", ""):
payload["runtime_tag"] = runtime_tag

url = f"{_LND_API_URL_v2 if v2 else _LND_API_URL}/{endpoint_name}"
if "TOOL_ENDPOINT_URL" in os.environ:
url = os.environ["TOOL_ENDPOINT_URL"]
Expand All @@ -55,6 +50,9 @@ def send_inference_request(
headers["Authorization"] = os.environ["TOOL_ENDPOINT_AUTH"]
headers.pop("apikey")

if runtime_tag := os.environ.get("RUNTIME_TAG", ""):
headers["runtime_tag"] = runtime_tag

session = _create_requests_session(
url=url,
num_retry=3,
Expand Down

0 comments on commit 15e9461

Please sign in to comment.