Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/askui/tools/agent_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def type(self, text: str, typing_speed: int = 50) -> None:
Args:
text (str): The text to be typed.
typing_speed (int, optional): The speed of typing in characters per
minute. Defaults to `50`.
second. Defaults to `50`.
"""
raise NotImplementedError

Expand Down
4 changes: 2 additions & 2 deletions src/askui/tools/computer/type_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, agent_os: AgentOs | None = None) -> None:
"typing_speed": {
"type": "integer",
"description": (
"The speed of typing in characters per minute."
"The speed of typing in characters per second."
" Defaults to 50"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@programminx-askui should we increase the default value?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Would be nice, if we could set the default as a a config value so that it can be easily set per project. For example when operating a VNC window, a too high typing speed will lead to some characters being not typed....

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since the agent can modify the value, even changing the default doesn’t guarantee it will be used.
btw, are you sure that the value is per second ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The agent usually does not modify the value unless it is specifically prompted to do so. Also, it would make more sense to set it once for these specific scenarios so that the agent does not need to do it for every type call. However, this is a low priority issue in my opinion so I would not add it to this PR for now.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I have the feeling something is off. And either the typeing speed in the API, the gloabl config is not working or the Agent is randomly changing the speed which leads in chars which are not recognized by the application.

We need first to do a proper testing, but I woul do it in another bug ticket.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It seems to work as expected on mac, so this might be a windows issue?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Anyways, the descriptions should be changed from minutes to seconds (as done in this PR) in order to align with the definition of the API.

),
"default": 50,
Expand All @@ -35,5 +35,5 @@ def __call__(self, text: str, typing_speed: int = 50) -> str:
self.agent_os.type(text, typing_speed)
return (
f"Text was typed: {text} with typing speed: "
f" {typing_speed} characters per minute."
f" {typing_speed} characters per second."
)
Loading