Skip to content
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
65652b8
Update browser_toolkit.py
subway-jack Mar 17, 2025
03cd72a
Update browser_toolkit.py
subway-jack Mar 17, 2025
fb4657f
Update browser_toolkit.py
subway-jack Mar 17, 2025
7ac4c68
Update browser_toolkit.py
subway-jack Mar 17, 2025
cb5b691
Update browser_toolkit.py
subway-jack Mar 17, 2025
6151b8f
Add files via upload
subway-jack Mar 17, 2025
60c4d8c
Update browser_toolkit.py
subway-jack Mar 17, 2025
d2cbd52
Update browser_toolkit.py
subway-jack Mar 17, 2025
03ec919
Update browser_toolkit.py
subway-jack Mar 18, 2025
8c2ffdd
Update function_tool.py
subway-jack Mar 18, 2025
62f2be7
Update single_agent_worker.py
subway-jack Mar 18, 2025
b55d577
Update browser_toolkit.py
subway-jack Mar 18, 2025
fab659c
Update single_agent_worker.py
subway-jack Mar 18, 2025
83edcd6
Update browser_toolkit.py
subway-jack Mar 22, 2025
cfabb75
Update browser_toolkit.py
subway-jack Mar 22, 2025
97d6dd0
Update browser_toolkit.py
subway-jack Mar 22, 2025
7a388ab
Update browser_toolkit.py
subway-jack Mar 22, 2025
5835d23
Merge branch 'master' into BrowserToolkit-add-async-mode
subway-jack Mar 24, 2025
93e1a81
Update browser_toolkit.py
subway-jack Mar 27, 2025
63cf08a
Update browser_toolkit.py
subway-jack Mar 27, 2025
99f3711
Delete examples/toolkits/browser_toolkit.py
subway-jack Mar 27, 2025
9f2d4f6
Merge branch 'master' into BrowserToolkit-add-async-mode
Wendong-Fan Mar 27, 2025
68575d0
Update browser_toolkit.py
subway-jack Mar 29, 2025
0a9359d
Add files via upload
subway-jack Mar 29, 2025
8656d78
Update __init__.py
subway-jack Mar 29, 2025
7a0f603
Add files via upload
subway-jack Mar 29, 2025
5d16594
Add files via upload
subway-jack Mar 29, 2025
a11ac5a
Merge branch 'master' into BrowserToolkit-add-async-mode
subway-jack Mar 29, 2025
b973e20
fix circular import
fengju0213 Apr 12, 2025
b1fa0d5
Merge remote-tracking branch 'origin/master' into BrowserToolkit-add-…
subway-jack Apr 25, 2025
0dd510f
Dealing with conflict issues
subway-jack Apr 25, 2025
0d948aa
Merge remote-tracking branch 'origin/master' into BrowserToolkit-add-…
subway-jack May 9, 2025
cf109e6
"Update async_browser_toolkit to the latest version"
subway-jack May 10, 2025
1d306f6
Merge branch 'master' into BrowserToolkit-add-async-mode
subway-jack May 10, 2025
b9d3820
Update async_browser_toolkit.py
fengju0213 May 10, 2025
b028b24
fix pre-commit
fengju0213 May 10, 2025
14725c8
"Make function extract_function_name more robust"
subway-jack May 11, 2025
18205d6
Merge remote-tracking branch 'origin/master' into BrowserToolkit-add-…
subway-jack May 11, 2025
abff93a
"fix pre-commit"
subway-jack May 11, 2025
c73c647
Merge branch 'master' into BrowserToolkit-add-async-mode
Wendong-Fan May 11, 2025
753ff75
Merge branch 'master' into BrowserToolkit-add-async-mode
Wendong-Fan May 11, 2025
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 camel/societies/workforce/single_agent_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async def _process_task(
additional_info=task.additional_info,
)
try:
response = self.worker.step(prompt, response_format=TaskResult)
response = await self.worker.astep(prompt, response_format=TaskResult)
Copy link
Collaborator

Choose a reason for hiding this comment

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

will this leads to bug for other toolkits?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have tested it before and it works and it will distinguish between synchronous and asynchronous functions when calling toolkit_call later.

  async def async_call(self, *args: Any, **kwargs: Any) -> Any:
      if self.synthesize_output:
          result = self.synthesize_execution_output(args, kwargs)
          return result
      if self.is_async:
          return await self.func(*args, **kwargs)
      else:
          return self.func(*args, **kwargs)

except Exception as e:
print(
f"{Fore.RED}Error occurred while processing task {task.id}:"
Expand Down
2 changes: 2 additions & 0 deletions camel/toolkits/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
from .image_analysis_toolkit import ImageAnalysisToolkit
from .mcp_toolkit import MCPToolkit
from .browser_toolkit import BrowserToolkit
from .async_browser_toolkit import AsyncBrowserToolkit
from .file_write_toolkit import FileWriteToolkit
from .terminal_toolkit import TerminalToolkit
from .pubmed_toolkit import PubMedToolkit
Expand Down Expand Up @@ -115,6 +116,7 @@
'VideoAnalysisToolkit',
'ImageAnalysisToolkit',
'BrowserToolkit',
'AsyncBrowserToolkit',
'FileWriteToolkit',
'TerminalToolkit',
'PubMedToolkit',
Expand Down
Loading
Loading