stagehand
stagehand copied to clipboard
LLM Inference Logging Save problems
I've followed the offcial docs to set log_inference_to_file=True to save LLM Inference Logging, but stagehand didn't creates inference_summary/ directory.
The code I write shows below :
stagehand = Stagehand(
env="LOCAL",
headless=False, # Show browser window - False
log_inference_to_file=True, # Creates inference_summary/ directory
verbose=2,
local_browser_launch_options={
"devtools": True, # Open developer tools
"viewport": {"width": 1280, "height": 720},
"executable_path": r'C:\Program Files\Google\Chrome\Application\chrome.exe', # Custom Chrome path
"args": [
"--no-sandbox",
"--disable-setuid-sandbox",
"--disable-web-security",
"--allow-running-insecure-content",
],
"env": {
"NODE_ENV": "development",
"DEBUG": "true",
},
},
model_name="openai/gpt-4.1-mini",
model_api_key=os.getenv("OpenAI_API_KEY")
)
p.s.
- It seems that the official documentation has not been updated in time, and some configurations have become invalid. It is recommended to update the documentation.
- I'm trying to custom Chrome path, but it also failed.
- The introduction of how to use Agent is not sufficient, especially the model setting. Does it only can use computer-use-preview for OpenAI ? I'm trying to use gpt-4o, but it suggests me it's not available.
this is JS code?
this is JS code?
It's python.