mirror of
https://github.com/crewAIInc/crewAI.git
synced 2025-12-16 12:28:30 +00:00
Merge branch 'main' into gl/fix/ensure-complete-tool-signature
This commit is contained in:
@@ -326,7 +326,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"tab": "AMP",
|
"tab": "AOP",
|
||||||
"icon": "briefcase",
|
"icon": "briefcase",
|
||||||
"groups": [
|
"groups": [
|
||||||
{
|
{
|
||||||
@@ -753,7 +753,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"tab": "AMP",
|
"tab": "AOP",
|
||||||
"icon": "briefcase",
|
"icon": "briefcase",
|
||||||
"groups": [
|
"groups": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ mode: "wide"
|
|||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
CrewAI AOP(Agent Management Platform) provides a platform for deploying, monitoring, and scaling your crews and agents in a production environment.
|
CrewAI AOP(Agent Operations Platform) provides a platform for deploying, monitoring, and scaling your crews and agents in a production environment.
|
||||||
|
|
||||||
<Frame>
|
<Frame>
|
||||||
<img src="/images/enterprise/crewai-enterprise-dashboard.png" alt="CrewAI AOP Dashboard" />
|
<img src="/images/enterprise/crewai-enterprise-dashboard.png" alt="CrewAI AOP Dashboard" />
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ mode: "wide"
|
|||||||
|
|
||||||
## 소개
|
## 소개
|
||||||
|
|
||||||
CrewAI AOP(Agent Management Platform)는 프로덕션 환경에서 crew와 agent를 배포, 모니터링, 확장할 수 있는 플랫폼을 제공합니다.
|
CrewAI AOP(Agent Operation Platform)는 프로덕션 환경에서 crew와 agent를 배포, 모니터링, 확장할 수 있는 플랫폼을 제공합니다.
|
||||||
|
|
||||||
<Frame>
|
<Frame>
|
||||||
<img src="/images/enterprise/crewai-enterprise-dashboard.png" alt="CrewAI AOP Dashboard" />
|
<img src="/images/enterprise/crewai-enterprise-dashboard.png" alt="CrewAI AOP Dashboard" />
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ mode: "wide"
|
|||||||
|
|
||||||
## Introdução
|
## Introdução
|
||||||
|
|
||||||
CrewAI AOP(Agent Management Platform) fornece uma plataforma para implementar, monitorar e escalar seus crews e agentes em um ambiente de produção.
|
CrewAI AOP(Agent Operation Platform) fornece uma plataforma para implementar, monitorar e escalar seus crews e agentes em um ambiente de produção.
|
||||||
|
|
||||||
<Frame>
|
<Frame>
|
||||||
<img src="/images/enterprise/crewai-enterprise-dashboard.png" alt="CrewAI AOP Dashboard" />
|
<img src="/images/enterprise/crewai-enterprise-dashboard.png" alt="CrewAI AOP Dashboard" />
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ dependencies = [
|
|||||||
"pytube>=15.0.0",
|
"pytube>=15.0.0",
|
||||||
"requests>=2.32.5",
|
"requests>=2.32.5",
|
||||||
"docker>=7.1.0",
|
"docker>=7.1.0",
|
||||||
"crewai==1.5.0",
|
"crewai==1.6.0",
|
||||||
"lancedb>=0.5.4",
|
"lancedb>=0.5.4",
|
||||||
"tiktoken>=0.8.0",
|
"tiktoken>=0.8.0",
|
||||||
"beautifulsoup4>=4.13.4",
|
"beautifulsoup4>=4.13.4",
|
||||||
|
|||||||
@@ -291,4 +291,4 @@ __all__ = [
|
|||||||
"ZapierActionTools",
|
"ZapierActionTools",
|
||||||
]
|
]
|
||||||
|
|
||||||
__version__ = "1.5.0"
|
__version__ = "1.6.0"
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ Repository = "https://github.com/crewAIInc/crewAI"
|
|||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
tools = [
|
tools = [
|
||||||
"crewai-tools==1.5.0",
|
"crewai-tools==1.6.0",
|
||||||
]
|
]
|
||||||
embeddings = [
|
embeddings = [
|
||||||
"tiktoken~=0.8.0"
|
"tiktoken~=0.8.0"
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ def _suppress_pydantic_deprecation_warnings() -> None:
|
|||||||
|
|
||||||
_suppress_pydantic_deprecation_warnings()
|
_suppress_pydantic_deprecation_warnings()
|
||||||
|
|
||||||
__version__ = "1.5.0"
|
__version__ = "1.6.0"
|
||||||
_telemetry_submitted = False
|
_telemetry_submitted = False
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ CLI_SETTINGS_KEYS = [
|
|||||||
"oauth2_audience",
|
"oauth2_audience",
|
||||||
"oauth2_client_id",
|
"oauth2_client_id",
|
||||||
"oauth2_domain",
|
"oauth2_domain",
|
||||||
|
"oauth2_extra",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Default values for CLI settings
|
# Default values for CLI settings
|
||||||
@@ -82,6 +83,7 @@ DEFAULT_CLI_SETTINGS = {
|
|||||||
"oauth2_audience": CREWAI_ENTERPRISE_DEFAULT_OAUTH2_AUDIENCE,
|
"oauth2_audience": CREWAI_ENTERPRISE_DEFAULT_OAUTH2_AUDIENCE,
|
||||||
"oauth2_client_id": CREWAI_ENTERPRISE_DEFAULT_OAUTH2_CLIENT_ID,
|
"oauth2_client_id": CREWAI_ENTERPRISE_DEFAULT_OAUTH2_CLIENT_ID,
|
||||||
"oauth2_domain": CREWAI_ENTERPRISE_DEFAULT_OAUTH2_DOMAIN,
|
"oauth2_domain": CREWAI_ENTERPRISE_DEFAULT_OAUTH2_DOMAIN,
|
||||||
|
"oauth2_extra": {},
|
||||||
}
|
}
|
||||||
|
|
||||||
# Readonly settings - cannot be set by the user
|
# Readonly settings - cannot be set by the user
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ description = "{{name}} using crewAI"
|
|||||||
authors = [{ name = "Your Name", email = "you@example.com" }]
|
authors = [{ name = "Your Name", email = "you@example.com" }]
|
||||||
requires-python = ">=3.10,<3.14"
|
requires-python = ">=3.10,<3.14"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crewai[tools]==1.5.0"
|
"crewai[tools]==1.6.0"
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ description = "{{name}} using crewAI"
|
|||||||
authors = [{ name = "Your Name", email = "you@example.com" }]
|
authors = [{ name = "Your Name", email = "you@example.com" }]
|
||||||
requires-python = ">=3.10,<3.14"
|
requires-python = ">=3.10,<3.14"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crewai[tools]==1.5.0"
|
"crewai[tools]==1.6.0"
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ from crewai.utilities.paths import db_storage_path
|
|||||||
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
|
from crewai.crew import Crew
|
||||||
from crewai.rag.core.base_client import BaseClient
|
from crewai.rag.core.base_client import BaseClient
|
||||||
from crewai.rag.core.base_embeddings_provider import BaseEmbeddingsProvider
|
from crewai.rag.core.base_embeddings_provider import BaseEmbeddingsProvider
|
||||||
from crewai.rag.embeddings.types import ProviderSpec
|
from crewai.rag.embeddings.types import ProviderSpec
|
||||||
@@ -32,16 +33,16 @@ class RAGStorage(BaseRAGStorage):
|
|||||||
self,
|
self,
|
||||||
type: str,
|
type: str,
|
||||||
allow_reset: bool = True,
|
allow_reset: bool = True,
|
||||||
embedder_config: ProviderSpec | BaseEmbeddingsProvider | None = None,
|
embedder_config: ProviderSpec | BaseEmbeddingsProvider[Any] | None = None,
|
||||||
crew: Any = None,
|
crew: Crew | None = None,
|
||||||
path: str | None = None,
|
path: str | None = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
super().__init__(type, allow_reset, embedder_config, crew)
|
super().__init__(type, allow_reset, embedder_config, crew)
|
||||||
agents = crew.agents if crew else []
|
crew_agents = crew.agents if crew else []
|
||||||
agents = [self._sanitize_role(agent.role) for agent in agents]
|
sanitized_roles = [self._sanitize_role(agent.role) for agent in crew_agents]
|
||||||
agents = "_".join(agents)
|
agents_str = "_".join(sanitized_roles)
|
||||||
self.agents = agents
|
self.agents = agents_str
|
||||||
self.storage_file_name = self._build_storage_file_name(type, agents)
|
self.storage_file_name = self._build_storage_file_name(type, agents_str)
|
||||||
|
|
||||||
self.type = type
|
self.type = type
|
||||||
self._client: BaseClient | None = None
|
self._client: BaseClient | None = None
|
||||||
@@ -96,6 +97,10 @@ class RAGStorage(BaseRAGStorage):
|
|||||||
ChromaEmbeddingFunctionWrapper, embedding_function
|
ChromaEmbeddingFunctionWrapper, embedding_function
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if self.path:
|
||||||
|
config.settings.persist_directory = self.path
|
||||||
|
|
||||||
self._client = create_client(config)
|
self._client = create_client(config)
|
||||||
|
|
||||||
def _get_client(self) -> BaseClient:
|
def _get_client(self) -> BaseClient:
|
||||||
|
|||||||
@@ -72,7 +72,8 @@ class TestSettings(unittest.TestCase):
|
|||||||
@patch("crewai.cli.config.TokenManager")
|
@patch("crewai.cli.config.TokenManager")
|
||||||
def test_reset_settings(self, mock_token_manager):
|
def test_reset_settings(self, mock_token_manager):
|
||||||
user_settings = {key: f"value_for_{key}" for key in USER_SETTINGS_KEYS}
|
user_settings = {key: f"value_for_{key}" for key in USER_SETTINGS_KEYS}
|
||||||
cli_settings = {key: f"value_for_{key}" for key in CLI_SETTINGS_KEYS}
|
cli_settings = {key: f"value_for_{key}" for key in CLI_SETTINGS_KEYS if key != "oauth2_extra"}
|
||||||
|
cli_settings["oauth2_extra"] = {"scope": "xxx", "other": "yyy"}
|
||||||
|
|
||||||
settings = Settings(
|
settings = Settings(
|
||||||
config_path=self.config_path, **user_settings, **cli_settings
|
config_path=self.config_path, **user_settings, **cli_settings
|
||||||
|
|||||||
82
lib/crewai/tests/rag/test_rag_storage_path.py
Normal file
82
lib/crewai/tests/rag/test_rag_storage_path.py
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
"""Tests for RAGStorage custom path functionality."""
|
||||||
|
|
||||||
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
|
from crewai.memory.storage.rag_storage import RAGStorage
|
||||||
|
|
||||||
|
|
||||||
|
@patch("crewai.memory.storage.rag_storage.create_client")
|
||||||
|
@patch("crewai.memory.storage.rag_storage.build_embedder")
|
||||||
|
def test_rag_storage_custom_path(
|
||||||
|
mock_build_embedder: MagicMock,
|
||||||
|
mock_create_client: MagicMock,
|
||||||
|
) -> None:
|
||||||
|
"""Test RAGStorage uses custom path when provided."""
|
||||||
|
mock_build_embedder.return_value = MagicMock(return_value=[[0.1, 0.2, 0.3]])
|
||||||
|
mock_create_client.return_value = MagicMock()
|
||||||
|
|
||||||
|
custom_path = "/custom/memory/path"
|
||||||
|
embedder_config = {"provider": "openai", "config": {"model": "text-embedding-3-small"}}
|
||||||
|
|
||||||
|
RAGStorage(
|
||||||
|
type="short_term",
|
||||||
|
crew=None,
|
||||||
|
path=custom_path,
|
||||||
|
embedder_config=embedder_config,
|
||||||
|
)
|
||||||
|
|
||||||
|
mock_create_client.assert_called_once()
|
||||||
|
config_arg = mock_create_client.call_args[0][0]
|
||||||
|
assert config_arg.settings.persist_directory == custom_path
|
||||||
|
|
||||||
|
|
||||||
|
@patch("crewai.memory.storage.rag_storage.create_client")
|
||||||
|
@patch("crewai.memory.storage.rag_storage.build_embedder")
|
||||||
|
def test_rag_storage_default_path_when_none(
|
||||||
|
mock_build_embedder: MagicMock,
|
||||||
|
mock_create_client: MagicMock,
|
||||||
|
) -> None:
|
||||||
|
"""Test RAGStorage uses default path when no custom path is provided."""
|
||||||
|
mock_build_embedder.return_value = MagicMock(return_value=[[0.1, 0.2, 0.3]])
|
||||||
|
mock_create_client.return_value = MagicMock()
|
||||||
|
|
||||||
|
embedder_config = {"provider": "openai", "config": {"model": "text-embedding-3-small"}}
|
||||||
|
|
||||||
|
storage = RAGStorage(
|
||||||
|
type="short_term",
|
||||||
|
crew=None,
|
||||||
|
path=None,
|
||||||
|
embedder_config=embedder_config,
|
||||||
|
)
|
||||||
|
|
||||||
|
mock_create_client.assert_called_once()
|
||||||
|
assert storage.path is None
|
||||||
|
|
||||||
|
|
||||||
|
@patch("crewai.memory.storage.rag_storage.create_client")
|
||||||
|
@patch("crewai.memory.storage.rag_storage.build_embedder")
|
||||||
|
def test_rag_storage_custom_path_with_batch_size(
|
||||||
|
mock_build_embedder: MagicMock,
|
||||||
|
mock_create_client: MagicMock,
|
||||||
|
) -> None:
|
||||||
|
"""Test RAGStorage uses custom path with batch_size in config."""
|
||||||
|
mock_build_embedder.return_value = MagicMock(return_value=[[0.1, 0.2, 0.3]])
|
||||||
|
mock_create_client.return_value = MagicMock()
|
||||||
|
|
||||||
|
custom_path = "/custom/batch/path"
|
||||||
|
embedder_config = {
|
||||||
|
"provider": "openai",
|
||||||
|
"config": {"model": "text-embedding-3-small", "batch_size": 100},
|
||||||
|
}
|
||||||
|
|
||||||
|
RAGStorage(
|
||||||
|
type="long_term",
|
||||||
|
crew=None,
|
||||||
|
path=custom_path,
|
||||||
|
embedder_config=embedder_config,
|
||||||
|
)
|
||||||
|
|
||||||
|
mock_create_client.assert_called_once()
|
||||||
|
config_arg = mock_create_client.call_args[0][0]
|
||||||
|
assert config_arg.settings.persist_directory == custom_path
|
||||||
|
assert config_arg.batch_size == 100
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
"""CrewAI development tools."""
|
"""CrewAI development tools."""
|
||||||
|
|
||||||
__version__ = "1.5.0"
|
__version__ = "1.6.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user