Compare commits

..

1 Commits

Author SHA1 Message Date
Devin AI
9113b9100e fix(mem0_storage): ensure memory_config is set correctly when config is provided
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-04-16 05:34:30 +00:00
5 changed files with 5 additions and 67 deletions

View File

@@ -1,33 +0,0 @@
name: Notify Downstream
on:
push:
branches:
- main
permissions:
contents: read
jobs:
notify-downstream:
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App token
id: app-token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.OSS_SYNC_APP_ID }}
private_key: ${{ secrets.OSS_SYNC_APP_PRIVATE_KEY }}
- name: Notify Repo B
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ steps.app-token.outputs.token }}
repository: ${{ secrets.OSS_SYNC_DOWNSTREAM_REPO }}
event-type: upstream-commit
client-payload: |
{
"commit_sha": "${{ github.sha }}"
}

View File

@@ -17,9 +17,9 @@ dependencies = [
"pdfplumber>=0.11.4",
"regex>=2024.9.11",
# Telemetry and Monitoring
"opentelemetry-api==1.32.1",
"opentelemetry-sdk==1.32.1",
"opentelemetry-exporter-otlp-proto-http==1.32.1",
"opentelemetry-api>=1.30.0",
"opentelemetry-sdk>=1.30.0",
"opentelemetry-exporter-otlp-proto-http>=1.30.0",
# Data Handling
"chromadb>=0.5.23",
"openpyxl>=3.1.5",

View File

@@ -21,7 +21,7 @@ class SQLiteFlowPersistence(FlowPersistence):
moderate performance requirements.
"""
db_path: str
db_path: str # Type annotation for instance variable
def __init__(self, db_path: Optional[str] = None):
"""Initialize SQLite persistence.

View File

@@ -24,7 +24,7 @@ class Mem0Storage(Storage):
self.crew = crew
self.config = config or {}
# TODO: Memory config will be removed in the future the config will be passed as a parameter
self.memory_config = self.config or getattr(crew, "memory_config", {}) or {}
self.memory_config = self.config if config is not None else getattr(crew, "memory_config", {}) or {}
# User ID is required for user memory type "user" since it's used as a unique identifier for the user.
user_id = self._get_user_id()

View File

@@ -1,29 +0,0 @@
import sys
from unittest.mock import MagicMock, patch
import pytest
def test_openlit_compatibility():
"""Test that OpenLit can be imported and initialized with CrewAI."""
try:
import openlit
except ImportError:
pytest.skip("OpenLit not installed, skipping compatibility test")
with patch.object(openlit, 'init', return_value=None) as mock_init:
openlit.init(disable_metrics=True)
mock_init.assert_called_once_with(disable_metrics=True)
assert True
def test_opentelemetry_version_compatibility():
"""Test that the OpenTelemetry version is compatible with OpenLit."""
pytest.importorskip("openlit")
import pkg_resources
otel_api_version = pkg_resources.get_distribution("opentelemetry-api").version
otel_sdk_version = pkg_resources.get_distribution("opentelemetry-sdk").version
assert otel_api_version == "1.32.1", f"Expected opentelemetry-api==1.32.1, got {otel_api_version}"
assert otel_sdk_version == "1.32.1", f"Expected opentelemetry-sdk==1.32.1, got {otel_sdk_version}"