Skip to content

Commit 511be19

Browse files
authored
add missing sent at header (#119)
* add missing sent at header * formatting
1 parent 7a5e940 commit 511be19

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Stagehand Python Changelog

CHANGELOG.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

stagehand/api.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import json
2+
from datetime import datetime
23
from typing import Any
34

45
from .utils import convert_dict_keys_to_camel_case
@@ -67,6 +68,7 @@ async def _create_session(self):
6768
"x-bb-project-id": self.browserbase_project_id,
6869
"x-model-api-key": self.model_api_key,
6970
"Content-Type": "application/json",
71+
"x-sent-at": datetime.now().isoformat(),
7072
"x-language": "python",
7173
}
7274

@@ -96,6 +98,7 @@ async def _execute(self, method: str, payload: dict[str, Any]) -> Any:
9698
"x-bb-project-id": self.browserbase_project_id,
9799
"Content-Type": "application/json",
98100
"Connection": "keep-alive",
101+
"x-sent-at": datetime.now().isoformat(),
99102
# Always enable streaming for better log handling
100103
"x-stream-response": "true",
101104
}

0 commit comments

Comments
 (0)