Skip to content

Commit

Permalink
Support identify internal calls via runtime tag (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
AsiaCao authored May 9, 2024
1 parent 719df6c commit 35dd2b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vision_agent/tools/tool_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
import os
from typing import Any, Dict

import requests
Expand All @@ -13,11 +14,14 @@
def _send_inference_request(
payload: Dict[str, Any], endpoint_name: str
) -> Dict[str, Any]:
# runtime_tag is used to differentiate different internal callers
runtime_tag = os.environ.get("RUNTIME_TAG", "")
res = requests.post(
f"{_LND_API_URL}/model/{endpoint_name}",
headers={
"Content-Type": "application/json",
"apikey": _LND_API_KEY,
"runtime-tag": runtime_tag,
},
json=payload,
)
Expand Down

0 comments on commit 35dd2b1

Please sign in to comment.