Skip to content

Commit

Permalink
update env vars for hosted langserve (#347)
Browse files Browse the repository at this point in the history
Modifies the env vars we send to hosted langserve to uniquely identify
the piece of code that created the env var
  • Loading branch information
jakerachleff authored Dec 24, 2023
1 parent cf180b8 commit 76669c2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions langserve/api_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,18 @@ def _update_config_with_defaults(

if _is_hosted():
hosted_metadata = {
"__langserve_hosted_git_commit_sha": os.environ.get(
"HOSTED_LANGSERVE_GIT_COMMIT", ""
"__langserve_hosted_git_ref": os.environ.get(
"HOSTED_LANGSERVE_GIT_REF", ""
),
"__langserve_hosted_repo_subdirectory_path": os.environ.get(
"HOSTED_LANGSERVE_GIT_REPO_PATH", ""
),
"__langserve_hosted_repo_url": os.environ.get(
"HOSTED_LANGSERVE_GIT_REPO", ""
),
"__langserve_hosted_revision_id": os.environ.get(
"HOSTED_LANGSERVE_REVISION_ID", ""
),
"__langserve_hosted_is_hosted": "true",
}
metadata.update(hosted_metadata)
Expand Down

0 comments on commit 76669c2

Please sign in to comment.