Skip to content

Commit 1c772e2

Browse files
committed
pass sdk version number to api for debug
1 parent ca22d08 commit 1c772e2

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"stagehand": patch
3+
---
4+
5+
Pass sdk version number to API for debugging

stagehand/api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import json
22
from datetime import datetime
3+
from importlib.metadata import version as get_version
34
from typing import Any
45

56
from .utils import convert_dict_keys_to_camel_case
@@ -70,6 +71,7 @@ async def _create_session(self):
7071
"Content-Type": "application/json",
7172
"x-sent-at": datetime.now().isoformat(),
7273
"x-language": "python",
74+
"x-sdk-version": get_version("stagehand"),
7375
}
7476

7577
# async with self._client:

0 commit comments

Comments
 (0)