computer-use-ootb-internal 0.0.135__py3-none-any.whl → 0.0.137__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- computer_use_ootb_internal/app_teachmode.py +533 -533
- computer_use_ootb_internal/computer_use_demo/animation/test_animation.py +39 -39
- computer_use_ootb_internal/computer_use_demo/gui_agent/llm_utils/llm_utils.py +0 -1
- computer_use_ootb_internal/computer_use_demo/gui_agent/llm_utils/oai.py +1 -13
- computer_use_ootb_internal/computer_use_demo/gui_agent/llm_utils/run_litellm.py +1 -12
- computer_use_ootb_internal/guard_service.py +835 -840
- computer_use_ootb_internal/preparation/star_rail_prepare.py +86 -64
- computer_use_ootb_internal/run_teachmode_ootb_args.py +5 -1
- computer_use_ootb_internal/service_manager.py +194 -194
- {computer_use_ootb_internal-0.0.135.dist-info → computer_use_ootb_internal-0.0.137.dist-info}/METADATA +8 -9
- {computer_use_ootb_internal-0.0.135.dist-info → computer_use_ootb_internal-0.0.137.dist-info}/RECORD +13 -13
- computer_use_ootb_internal-0.0.137.dist-info/entry_points.txt +2 -0
- computer_use_ootb_internal-0.0.135.dist-info/entry_points.txt +0 -4
- {computer_use_ootb_internal-0.0.135.dist-info → computer_use_ootb_internal-0.0.137.dist-info}/WHEEL +0 -0
@@ -1,40 +1,40 @@
|
|
1
|
-
"""
|
2
|
-
Test script to verify cursor animation is working
|
3
|
-
"""
|
4
|
-
import asyncio
|
5
|
-
import sys
|
6
|
-
import time
|
7
|
-
from pathlib import Path
|
8
|
-
from computer_use_ootb_internal.computer_use_demo.tools.computer import ComputerTool
|
9
|
-
|
10
|
-
async def test_animations():
|
11
|
-
|
12
|
-
# Initialize the computer tool
|
13
|
-
computer = ComputerTool()
|
14
|
-
|
15
|
-
# Test mouse move animation
|
16
|
-
print("Testing mouse move animation...")
|
17
|
-
await computer(action="mouse_move_windll", coordinate=(500, 500))
|
18
|
-
print("Waiting 2 seconds...")
|
19
|
-
await asyncio.sleep(2)
|
20
|
-
|
21
|
-
# Test click animation
|
22
|
-
print("Testing click animation...")
|
23
|
-
await computer(action="left_click_windll", coordinate=(700, 300))
|
24
|
-
print("Waiting 2 seconds...")
|
25
|
-
await asyncio.sleep(2)
|
26
|
-
|
27
|
-
# Test another move
|
28
|
-
print("Testing move and click sequence...")
|
29
|
-
await computer(action="mouse_move_windll", coordinate=(300, 300))
|
30
|
-
await asyncio.sleep(1)
|
31
|
-
await computer(action="left_click_windll", coordinate=(300, 300))
|
32
|
-
|
33
|
-
# Wait for animations to complete
|
34
|
-
print("Waiting for animations to complete...")
|
35
|
-
await asyncio.sleep(3)
|
36
|
-
|
37
|
-
print("Test completed")
|
38
|
-
|
39
|
-
if __name__ == "__main__":
|
1
|
+
"""
|
2
|
+
Test script to verify cursor animation is working
|
3
|
+
"""
|
4
|
+
import asyncio
|
5
|
+
import sys
|
6
|
+
import time
|
7
|
+
from pathlib import Path
|
8
|
+
from computer_use_ootb_internal.computer_use_demo.tools.computer import ComputerTool
|
9
|
+
|
10
|
+
async def test_animations():
|
11
|
+
|
12
|
+
# Initialize the computer tool
|
13
|
+
computer = ComputerTool()
|
14
|
+
|
15
|
+
# Test mouse move animation
|
16
|
+
print("Testing mouse move animation...")
|
17
|
+
await computer(action="mouse_move_windll", coordinate=(500, 500))
|
18
|
+
print("Waiting 2 seconds...")
|
19
|
+
await asyncio.sleep(2)
|
20
|
+
|
21
|
+
# Test click animation
|
22
|
+
print("Testing click animation...")
|
23
|
+
await computer(action="left_click_windll", coordinate=(700, 300))
|
24
|
+
print("Waiting 2 seconds...")
|
25
|
+
await asyncio.sleep(2)
|
26
|
+
|
27
|
+
# Test another move
|
28
|
+
print("Testing move and click sequence...")
|
29
|
+
await computer(action="mouse_move_windll", coordinate=(300, 300))
|
30
|
+
await asyncio.sleep(1)
|
31
|
+
await computer(action="left_click_windll", coordinate=(300, 300))
|
32
|
+
|
33
|
+
# Wait for animations to complete
|
34
|
+
print("Waiting for animations to complete...")
|
35
|
+
await asyncio.sleep(3)
|
36
|
+
|
37
|
+
print("Test completed")
|
38
|
+
|
39
|
+
if __name__ == "__main__":
|
40
40
|
asyncio.run(test_animations())
|
@@ -4,19 +4,7 @@ import logging
|
|
4
4
|
import base64
|
5
5
|
import requests
|
6
6
|
|
7
|
-
|
8
|
-
def is_image_path(text):
|
9
|
-
# Checking if the input text ends with typical image file extensions
|
10
|
-
image_extensions = (".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tiff", ".tif")
|
11
|
-
if text.endswith(image_extensions):
|
12
|
-
return True
|
13
|
-
else:
|
14
|
-
return False
|
15
|
-
|
16
|
-
def encode_image(image_path):
|
17
|
-
"""Encode image file to base64."""
|
18
|
-
with open(image_path, "rb") as image_file:
|
19
|
-
return base64.b64encode(image_file.read()).decode("utf-8")
|
7
|
+
from .llm_utils import is_image_path, encode_image
|
20
8
|
|
21
9
|
|
22
10
|
|
@@ -4,19 +4,8 @@ import logging
|
|
4
4
|
import base64
|
5
5
|
from litellm import completion
|
6
6
|
|
7
|
+
from .llm_utils import is_image_path, encode_image
|
7
8
|
|
8
|
-
def is_image_path(text):
|
9
|
-
# Checking if the input text ends with typical image file extensions
|
10
|
-
image_extensions = (".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tiff", ".tif")
|
11
|
-
if text.endswith(image_extensions):
|
12
|
-
return True
|
13
|
-
else:
|
14
|
-
return False
|
15
|
-
|
16
|
-
def encode_image(image_path):
|
17
|
-
"""Encode image file to base64."""
|
18
|
-
with open(image_path, "rb") as image_file:
|
19
|
-
return base64.b64encode(image_file.read()).decode("utf-8")
|
20
9
|
|
21
10
|
def run_litellm(messages: list, system: str, llm: str, max_tokens=256, temperature=0):
|
22
11
|
"""
|