Open aimzieslol opened 1 month ago
@aimzieslol the stopping condition is supposed to be a callable function, i think what you're looking for is the stopping_token="finish"
, let me know if this works!
@aimzieslol did it work well?
Latest test using the same code from before produces this error:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-4-527ba3a8ba9b>](https://localhost:8080/#) in <cell line: 1>()
----> 1 from swarms import Agent, OpenAIChat
2
3 agent = Agent(
4 agent_name="API Requester",
5 agent_description="This agent is responsible for making API requests.",
6 frames
[/usr/local/lib/python3.10/dist-packages/swarms/__init__.py](https://localhost:8080/#) in <module>
----> 1 from swarms.telemetry.bootup import bootup # noqa: E402, F403
2 from swarms.telemetry.sentry_active import activate_sentry
3
4 bootup()
5 activate_sentry()
[/usr/local/lib/python3.10/dist-packages/swarms/telemetry/bootup.py](https://localhost:8080/#) in <module>
4
5 from swarms.telemetry.auto_upgrade_swarms import auto_update
----> 6 from swarms.utils.disable_logging import disable_logging
7
8
[/usr/local/lib/python3.10/dist-packages/swarms/utils/__init__.py](https://localhost:8080/#) in <module>
1 from swarms.utils.class_args_wrapper import print_class_parameters
----> 2 from swarms.tools.prebuilt.code_interpreter import (
3 SubprocessCodeInterpreter,
4 )
5 from swarms.utils.data_to_text import (
[/usr/local/lib/python3.10/dist-packages/swarms/tools/__init__.py](https://localhost:8080/#) in <module>
3 tool_find_by_name,
4 )
----> 5 from swarms.tools.func_calling_executor import openai_tool_executor
6 from swarms.tools.pydantic_to_json import (
7 _remove_a_key,
[/usr/local/lib/python3.10/dist-packages/swarms/tools/func_calling_executor.py](https://localhost:8080/#) in <module>
1 import concurrent.futures
2 from typing import Callable, Any, Dict, List
----> 3 from swarms.utils.loguru_logger import logger
4
5
[/usr/local/lib/python3.10/dist-packages/swarms/utils/loguru_logger.py](https://localhost:8080/#) in <module>
8
9 logger.add(
---> 10 os.path.join(WORKSPACE_DIR, "swarms.log"),
11 level="INFO",
12 colorize=True,
[/usr/lib/python3.10/posixpath.py](https://localhost:8080/#) in join(a, *p)
74 will be discarded. An empty last part will result in a path that
75 ends with a separator."""
---> 76 a = os.fspath(a)
77 sep = _get_sep(a)
78 path = a
TypeError: expected str, bytes or os.PathLike object, not NoneType
Describe the bug
When using a very basic
Agent
to test functionality, after adding thestopping_condition
as a string to theAgent()
class construction, I see the error shown in the issue title.To Reproduce
This is the
Agent
code:This is how I run it:
Despite a successful run on the first "loop," the agent runs to the maximum loop number because there's no stopping condition.
Upvote & Fund