Skip to content

Add is_goal_completed#2

Open
SmartManoj wants to merge 2 commits intomaxi-w:mainfrom
SmartManoj:goal
Open

Add is_goal_completed#2
SmartManoj wants to merge 2 commits intomaxi-w:mainfrom
SmartManoj:goal

Conversation

@SmartManoj
Copy link

Fixes #1

Copy link
Owner

@maxi-w maxi-w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

thanks a lot for your contribution! I have two minor questions. I will try it out later and merge if everything works on my side.

Comment on lines +75 to +84
def is_goal_completed():
messages = [f"Goal: {goal}. Send <finish> if the goal is completed. Else explain why it is not completed."]
messages.append(computer.take_screenshot())
response = client.models.generate_content(
model='gemini-2.0-flash-exp', contents=messages
)

if "<screenshot>" in response.text:
print(response.text)
response_text = response.text
if "finish" in response_text:
return True, "Goal is completed."
return False, response_text
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you see improvements with this double check for goal completion vs just asking for a tag?

Copy link
Author

@SmartManoj SmartManoj Dec 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Since the terminal is active, alt f is not worked. Even the goal completion also gave wrong results even with gemini-exp-1206. Should replace with a more powerful vision model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 steps is not enough

2 participants