mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 08:38:30 +00:00
refactor: move rag package to lib/core and extract standalone utilities
This commit is contained in:
1
lib/core/.python-version
Normal file
1
lib/core/.python-version
Normal file
@@ -0,0 +1 @@
|
||||
3.13
|
||||
56
lib/core/pyproject.toml
Normal file
56
lib/core/pyproject.toml
Normal file
@@ -0,0 +1,56 @@
|
||||
[project]
|
||||
name = "crewai-core"
|
||||
dynamic = ["version"]
|
||||
description = ""
|
||||
readme = "README.md"
|
||||
authors = [
|
||||
{ name = "Greyson Lalonde", email = "greyson.r.lalonde@gmail.com" }
|
||||
]
|
||||
keywords = [
|
||||
"crewai",
|
||||
"ai",
|
||||
"agents",
|
||||
"framework",
|
||||
"orchestration",
|
||||
"llm",
|
||||
"core",
|
||||
"typed",
|
||||
]
|
||||
classifiers = [
|
||||
"Development Status :: 3 - Alpha",
|
||||
"Intended Audience :: Developers",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
"Topic :: Software Development :: Libraries :: Python Modules",
|
||||
"Typing :: Typed",
|
||||
]
|
||||
requires-python = ">=3.10, <3.14"
|
||||
dependencies = [
|
||||
"chromadb~=1.1.0",
|
||||
"pydantic-settings>=2.10.1",
|
||||
"uv>=0.4.25",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://crewai.com"
|
||||
Documentation = "https://docs.crewai.com"
|
||||
Repository = "https://github.com/crewAIInc/crewAI"
|
||||
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
asyncio_mode = "strict"
|
||||
asyncio_default_fixture_loop_scope = "function"
|
||||
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.version]
|
||||
path = "src/crewai/core/__init__.py"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/crewai"]
|
||||
1
lib/core/src/crewai/core/__init__.py
Normal file
1
lib/core/src/crewai/core/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
__version__ = "1.0.0a0"
|
||||
0
lib/core/src/crewai/core/py.typed
Normal file
0
lib/core/src/crewai/core/py.typed
Normal file
0
lib/core/src/crewai/core/rag/chromadb/__init__.py
Normal file
0
lib/core/src/crewai/core/rag/chromadb/__init__.py
Normal file
@@ -31,7 +31,7 @@ from crewai.rag.core.base_client import (
|
||||
BaseCollectionParams,
|
||||
)
|
||||
from crewai.rag.types import SearchResult
|
||||
from crewai.utilities.logger_utils import suppress_logging
|
||||
from crewai.core.utilities.logger_utils import suppress_logging
|
||||
|
||||
|
||||
class ChromaDBClient(BaseClient):
|
||||
@@ -3,7 +3,7 @@
|
||||
import re
|
||||
from typing import Final
|
||||
|
||||
from crewai.utilities.paths import db_storage_path
|
||||
from crewai.core.utilities.paths import db_storage_path
|
||||
|
||||
DEFAULT_TENANT: Final[str] = "default_tenant"
|
||||
DEFAULT_DATABASE: Final[str] = "default_database"
|
||||
@@ -11,7 +11,7 @@ from crewai.rag.config.constants import (
|
||||
from crewai.rag.config.types import RagConfigType
|
||||
from crewai.rag.core.base_client import BaseClient
|
||||
from crewai.rag.factory import create_client
|
||||
from crewai.utilities.import_utils import require
|
||||
from crewai.core.utilities.import_utils import require
|
||||
|
||||
|
||||
class RagContext(BaseModel):
|
||||
@@ -9,7 +9,7 @@ from typing_extensions import deprecated
|
||||
|
||||
from crewai.rag.core.base_embeddings_callable import EmbeddingFunction
|
||||
from crewai.rag.core.base_embeddings_provider import BaseEmbeddingsProvider
|
||||
from crewai.utilities.import_utils import import_and_validate_definition
|
||||
from crewai.core.utilities.import_utils import import_and_validate_definition
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from chromadb.utils.embedding_functions.amazon_bedrock_embedding_function import (
|
||||
@@ -8,7 +8,7 @@ from crewai.rag.config.optional_imports.protocols import (
|
||||
)
|
||||
from crewai.rag.config.types import RagConfigType
|
||||
from crewai.rag.core.base_client import BaseClient
|
||||
from crewai.utilities.import_utils import require
|
||||
from crewai.core.utilities.import_utils import require
|
||||
|
||||
|
||||
def create_client(config: RagConfigType) -> BaseClient:
|
||||
@@ -5,7 +5,7 @@ from typing import Final
|
||||
|
||||
from qdrant_client.models import Distance, VectorParams
|
||||
|
||||
from crewai.utilities.paths import db_storage_path
|
||||
from crewai.core.utilities.paths import db_storage_path
|
||||
|
||||
DEFAULT_VECTOR_PARAMS: Final = VectorParams(size=384, distance=Distance.COSINE)
|
||||
DEFAULT_EMBEDDING_MODEL: Final[str] = "sentence-transformers/all-MiniLM-L6-v2"
|
||||
1
lib/core/src/crewai/core/utilities/__init__.py
Normal file
1
lib/core/src/crewai/core/utilities/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Core utilities for CrewAI."""
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user