from tinyfish import TinyFish, EventType, RunStatusclient = TinyFish()with client.agent.stream( url="https://example.com/contact", goal="""Fill in the contact form: - Name field: "John Doe" - Email field: "john@example.com" - Message field: "I am interested in your services." Then click the Submit button and extract the success message. """,) as stream: for event in stream: if event.type == EventType.COMPLETE and event.status == RunStatus.COMPLETED: print("Result:", event.result_json)
Output:
{ "success": true, "message": "Thank you for contacting us!"}