Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/tower/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def run_app(
ctx = TowerContext.build()
client = _env_client(ctx)
run_params = RunAppParamsParameters()
parent_run_id = ctx.run_id

if not environment:
environment = ctx.environment
Expand All @@ -84,6 +85,7 @@ def run_app(
input_body = RunAppParams(
environment=environment,
parameters=run_params,
parent_run_id=parent_run_id,
)

try:
Expand Down
4 changes: 4 additions & 0 deletions src/tower/_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def __init__(
tower_url: str,
environment: str,
api_key: str = None,
run_id: str = None,
inference_router: str = None,
inference_router_api_key: str = None,
inference_provider: str = None,
Expand All @@ -15,6 +16,7 @@ def __init__(
self.tower_url = tower_url
self.environment = environment
self.api_key = api_key
self.run_id = run_id
self.jwt = jwt
self.inference_router = inference_router
self.inference_router_api_key = inference_router_api_key
Expand All @@ -34,6 +36,7 @@ def build(cls):
tower_environment = os.getenv("TOWER_ENVIRONMENT", "default")
tower_api_key = os.getenv("TOWER_API_KEY")
tower_jwt = os.getenv("TOWER_JWT")
tower_run_id = os.getenv("TOWER__RUNTIME__RUN_ID")

# Replaces the deprecated hugging_face_provider and hugging_face_api_key
inference_router = os.getenv("TOWER_INFERENCE_ROUTER")
Expand All @@ -44,6 +47,7 @@ def build(cls):
tower_url=tower_url,
environment=tower_environment,
api_key=tower_api_key,
run_id=tower_run_id,
inference_router=inference_router,
inference_router_api_key=inference_router_api_key,
inference_provider=inference_provider,
Expand Down
Loading