-
Notifications
You must be signed in to change notification settings - Fork 246
improved prompting, fixed extract #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improved prompting, fixed extract #25
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, we can merge on work on the other outstanding unchecked items
}, | ||
}, | ||
required: ["action"], | ||
}, | ||
}, | ||
{ | ||
name: "stagehand_extract", | ||
description: `Extracts structured data from the web page based on an instruction and a JSON schema.`, | ||
description: `Extracts structured data from the web page based on an instruction and a JSON schema (Zod schema). Extract works best for extracting TEXT in a structured format.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its absolutely crazy this prompt update made this work lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right? are we good to merge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@miguelg719 yes good to merge this. I am now working on:
- Using resources for async result loading. It seems that Claude, for example, makes the request to the MCP server and if it takes x amount of time it will try to continuously call the resources to get the updated result. This might fix timeout errors w/ inspector and other clients.
- Test with cline. Here's a guide on how to test it and would be great to sync w/ Sophie once we integrate it as an MCP server to come up with use cases that can be advertised together. I think that the improvements will make Cline perform much better
will open a new PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, that's what I saw with claude! perfect
@@ -382,20 +391,13 @@ async function handleToolCall( | |||
schema: zodSchema, | |||
useTextExtract: true, | |||
}); | |||
if (!data || typeof data !== "object" || !("data" in data)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@filip-michalsky this was also causing an issue with extract
extract now works, refined prompting a bit. Other potential improvements:
currently: