diff --git a/guardrails/cli/server/hub_client.py b/guardrails/cli/server/hub_client.py index d29bf2781..9b343f929 100644 --- a/guardrails/cli/server/hub_client.py +++ b/guardrails/cli/server/hub_client.py @@ -1,4 +1,5 @@ import sys +from importlib.metadata import version from string import Template from typing import Any, Dict, Optional @@ -18,6 +19,7 @@ TOKEN_INVALID_MESSAGE = f"""Your token is invalid. Please run `guardrails configure`\ to update your token. {FIND_NEW_TOKEN}""" +GUARDRAILS_VERSION = version("guardrails-ai") validator_hub_service = "https://so4sg4q4pb.execute-api.us-east-1.amazonaws.com" validator_manifest_endpoint = Template( @@ -49,6 +51,7 @@ def fetch(url: str, token: Optional[str], anonymousUserId: Optional[str]): headers = { "Authorization": f"Bearer {token}", "x-anonymous-user-id": anonymousUserId, + "x-guardrails-version": GUARDRAILS_VERSION, } req = requests.get(url, headers=headers) body = req.json() diff --git a/pyproject.toml b/pyproject.toml index a4bab62a7..933ff6f3d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "guardrails-ai" -version = "0.5.0a10" +version = "0.5.0a11" description = "Adding guardrails to large language models." authors = ["Guardrails AI "] license = "Apache License 2.0"