bpsa 1.23.0__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.
- bpsa/__init__.py +45 -0
- bpsa-1.23.0.dist-info/METADATA +723 -0
- bpsa-1.23.0.dist-info/RECORD +37 -0
- bpsa-1.23.0.dist-info/WHEEL +5 -0
- bpsa-1.23.0.dist-info/entry_points.txt +5 -0
- bpsa-1.23.0.dist-info/licenses/LICENSE +201 -0
- bpsa-1.23.0.dist-info/licenses/NOTICE +7 -0
- bpsa-1.23.0.dist-info/top_level.txt +2 -0
- smolagents/__init__.py +32 -0
- smolagents/_function_type_hints_utils.py +431 -0
- smolagents/agent_types.py +284 -0
- smolagents/agents.py +2155 -0
- smolagents/bp_ad_infinitum.py +402 -0
- smolagents/bp_cli.py +1665 -0
- smolagents/bp_compression.py +717 -0
- smolagents/bp_executors.py +227 -0
- smolagents/bp_session.py +345 -0
- smolagents/bp_thinkers.py +1091 -0
- smolagents/bp_tools.py +2840 -0
- smolagents/bp_tools_browser.py +190 -0
- smolagents/bp_utils.py +128 -0
- smolagents/cli.py +294 -0
- smolagents/default_tools.py +661 -0
- smolagents/gradio_ui.py +509 -0
- smolagents/local_python_executor.py +1693 -0
- smolagents/mcp_client.py +171 -0
- smolagents/memory.py +319 -0
- smolagents/models.py +2205 -0
- smolagents/monitoring.py +265 -0
- smolagents/prompts/code_agent.yaml +323 -0
- smolagents/prompts/structured_code_agent.yaml +257 -0
- smolagents/prompts/toolcalling_agent.yaml +185 -0
- smolagents/remote_executors.py +1136 -0
- smolagents/tool_validation.py +263 -0
- smolagents/tools.py +1422 -0
- smolagents/utils.py +597 -0
- smolagents/vision_web_browser.py +247 -0
bpsa/__init__.py
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""bpsa — transparent namespace alias for smolagents.
|
|
2
|
+
|
|
3
|
+
``import bpsa`` is identical to ``import smolagents``.
|
|
4
|
+
Sub-module access (``from bpsa.agents import CodeAgent``) works via a
|
|
5
|
+
meta-path finder that redirects ``bpsa.*`` imports to ``smolagents.*``.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import importlib
|
|
9
|
+
import importlib.abc
|
|
10
|
+
import importlib.util
|
|
11
|
+
import sys
|
|
12
|
+
|
|
13
|
+
from smolagents import * # noqa: F403
|
|
14
|
+
from smolagents import __version__ # noqa: F401
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class _BpsaLoader(importlib.abc.Loader):
|
|
18
|
+
"""Loader that returns an already-imported smolagents module."""
|
|
19
|
+
|
|
20
|
+
def __init__(self, module):
|
|
21
|
+
self._module = module
|
|
22
|
+
|
|
23
|
+
def create_module(self, spec):
|
|
24
|
+
return self._module
|
|
25
|
+
|
|
26
|
+
def exec_module(self, module):
|
|
27
|
+
pass # Already fully loaded
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class _BpsaFinder(importlib.abc.MetaPathFinder):
|
|
31
|
+
"""Meta-path finder that redirects bpsa.* imports to smolagents.*."""
|
|
32
|
+
|
|
33
|
+
def find_spec(self, fullname, path, target=None):
|
|
34
|
+
if not fullname.startswith("bpsa."):
|
|
35
|
+
return None
|
|
36
|
+
real_name = "smolagents" + fullname[len("bpsa"):]
|
|
37
|
+
try:
|
|
38
|
+
real_mod = importlib.import_module(real_name)
|
|
39
|
+
except ImportError:
|
|
40
|
+
return None
|
|
41
|
+
sys.modules[fullname] = real_mod
|
|
42
|
+
return importlib.util.spec_from_loader(fullname, loader=_BpsaLoader(real_mod))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
sys.meta_path.insert(0, _BpsaFinder())
|