repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/telemetry/posthog.py
embedchain/embedchain/telemetry/posthog.py
import json import logging import os import uuid from posthog import Posthog import embedchain from embedchain.constants import CONFIG_DIR, CONFIG_FILE class AnonymousTelemetry: def __init__(self, host="https://app.posthog.com", enabled=True): self.project_api_key = "phc_PHQDA5KwztijnSojsxJ2c1DuJd52QCzJ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/telemetry/__init__.py
embedchain/embedchain/telemetry/__init__.py
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/image.py
embedchain/embedchain/loaders/image.py
import base64 import hashlib import os from pathlib import Path from openai import OpenAI from embedchain.helpers.json_serializable import register_deserializable from embedchain.loaders.base_loader import BaseLoader DESCRIBE_IMAGE_PROMPT = "Describe the image:" @register_deserializable class ImageLoader(BaseLoade...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/web_page.py
embedchain/embedchain/loaders/web_page.py
import hashlib import logging from typing import Any, Optional import requests try: from bs4 import BeautifulSoup except ImportError: raise ImportError( "Webpage requires extra dependencies. Install with `pip install beautifulsoup4==4.12.3`" ) from None from embedchain.helpers.json_serializable i...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/discord.py
embedchain/embedchain/loaders/discord.py
import hashlib import logging import os from embedchain.helpers.json_serializable import register_deserializable from embedchain.loaders.base_loader import BaseLoader logger = logging.getLogger(__name__) @register_deserializable class DiscordLoader(BaseLoader): """ Load data from a Discord Channel ID. "...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/sitemap.py
embedchain/embedchain/loaders/sitemap.py
import concurrent.futures import hashlib import logging import os from urllib.parse import urlparse import requests from tqdm import tqdm try: from bs4 import BeautifulSoup from bs4.builder import ParserRejectedMarkup except ImportError: raise ImportError( "Sitemap requires extra dependencies. Ins...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/docs_site_loader.py
embedchain/embedchain/loaders/docs_site_loader.py
import hashlib import logging from urllib.parse import urljoin, urlparse import requests try: from bs4 import BeautifulSoup except ImportError: raise ImportError( "DocsSite requires extra dependencies. Install with `pip install beautifulsoup4==4.12.3`" ) from None from embedchain.helpers.json_se...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/pdf_file.py
embedchain/embedchain/loaders/pdf_file.py
import hashlib from langchain_community.document_loaders import PyPDFLoader from embedchain.helpers.json_serializable import register_deserializable from embedchain.loaders.base_loader import BaseLoader from embedchain.utils.misc import clean_string @register_deserializable class PdfFileLoader(BaseLoader): def ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/substack.py
embedchain/embedchain/loaders/substack.py
import hashlib import logging import time from xml.etree import ElementTree import requests from embedchain.helpers.json_serializable import register_deserializable from embedchain.loaders.base_loader import BaseLoader from embedchain.utils.misc import is_readable logger = logging.getLogger(__name__) @register_des...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/audio.py
embedchain/embedchain/loaders/audio.py
import hashlib import os import validators from embedchain.helpers.json_serializable import register_deserializable from embedchain.loaders.base_loader import BaseLoader try: from deepgram import DeepgramClient, PrerecordedOptions except ImportError: raise ImportError( "Audio file requires extra depe...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/excel_file.py
embedchain/embedchain/loaders/excel_file.py
import hashlib import importlib.util try: import unstructured # noqa: F401 from langchain_community.document_loaders import UnstructuredExcelLoader except ImportError: raise ImportError( 'Excel file requires extra dependencies. Install with `pip install "unstructured[local-inference, all-docs]"`' ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/base_loader.py
embedchain/embedchain/loaders/base_loader.py
from typing import Any, Optional from embedchain.helpers.json_serializable import JSONSerializable class BaseLoader(JSONSerializable): def __init__(self): pass def load_data(self, url, **kwargs: Optional[dict[str, Any]]): """ Implemented by child classes """ pass
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/xml.py
embedchain/embedchain/loaders/xml.py
import hashlib try: import unstructured # noqa: F401 from langchain_community.document_loaders import UnstructuredXMLLoader except ImportError: raise ImportError( 'XML file requires extra dependencies. Install with `pip install "unstructured[local-inference, all-docs]"`' ) from None from embed...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/youtube_video.py
embedchain/embedchain/loaders/youtube_video.py
import hashlib import json import logging try: from youtube_transcript_api import YouTubeTranscriptApi except ImportError: raise ImportError("YouTube video requires extra dependencies. Install with `pip install youtube-transcript-api`") try: from langchain_community.document_loaders import YoutubeLoader ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/unstructured_file.py
embedchain/embedchain/loaders/unstructured_file.py
import hashlib from embedchain.helpers.json_serializable import register_deserializable from embedchain.loaders.base_loader import BaseLoader from embedchain.utils.misc import clean_string @register_deserializable class UnstructuredLoader(BaseLoader): def load_data(self, url): """Load data from an Unstru...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/mysql.py
embedchain/embedchain/loaders/mysql.py
import hashlib import logging from typing import Any, Optional from embedchain.loaders.base_loader import BaseLoader from embedchain.utils.misc import clean_string logger = logging.getLogger(__name__) class MySQLLoader(BaseLoader): def __init__(self, config: Optional[dict[str, Any]]): super().__init__()...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/postgres.py
embedchain/embedchain/loaders/postgres.py
import hashlib import logging from typing import Any, Optional from embedchain.loaders.base_loader import BaseLoader logger = logging.getLogger(__name__) class PostgresLoader(BaseLoader): def __init__(self, config: Optional[dict[str, Any]] = None): super().__init__() if not config: r...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/docx_file.py
embedchain/embedchain/loaders/docx_file.py
import hashlib try: from langchain_community.document_loaders import Docx2txtLoader except ImportError: raise ImportError("Docx file requires extra dependencies. Install with `pip install docx2txt==0.8`") from None from embedchain.helpers.json_serializable import register_deserializable from embedchain.loaders...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/beehiiv.py
embedchain/embedchain/loaders/beehiiv.py
import hashlib import logging import time from xml.etree import ElementTree import requests from embedchain.helpers.json_serializable import register_deserializable from embedchain.loaders.base_loader import BaseLoader from embedchain.utils.misc import is_readable logger = logging.getLogger(__name__) @register_des...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/mdx.py
embedchain/embedchain/loaders/mdx.py
import hashlib from embedchain.helpers.json_serializable import register_deserializable from embedchain.loaders.base_loader import BaseLoader @register_deserializable class MdxLoader(BaseLoader): def load_data(self, url): """Load data from a mdx file.""" with open(url, "r", encoding="utf-8") as i...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/discourse.py
embedchain/embedchain/loaders/discourse.py
import hashlib import logging import time from typing import Any, Optional import requests from embedchain.loaders.base_loader import BaseLoader from embedchain.utils.misc import clean_string logger = logging.getLogger(__name__) class DiscourseLoader(BaseLoader): def __init__(self, config: Optional[dict[str, A...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/youtube_channel.py
embedchain/embedchain/loaders/youtube_channel.py
import concurrent.futures import hashlib import logging from tqdm import tqdm from embedchain.loaders.base_loader import BaseLoader from embedchain.loaders.youtube_video import YoutubeVideoLoader logger = logging.getLogger(__name__) class YoutubeChannelLoader(BaseLoader): """Loader for youtube channel.""" ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/__init__.py
embedchain/embedchain/loaders/__init__.py
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/rss_feed.py
embedchain/embedchain/loaders/rss_feed.py
import hashlib from embedchain.helpers.json_serializable import register_deserializable from embedchain.loaders.base_loader import BaseLoader @register_deserializable class RSSFeedLoader(BaseLoader): """Loader for RSS Feed.""" def load_data(self, url): """Load data from a rss feed.""" output...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/slack.py
embedchain/embedchain/loaders/slack.py
import hashlib import logging import os import ssl from typing import Any, Optional import certifi from embedchain.loaders.base_loader import BaseLoader from embedchain.utils.misc import clean_string SLACK_API_BASE_URL = "https://www.slack.com/api/" logger = logging.getLogger(__name__) class SlackLoader(BaseLoade...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/text_file.py
embedchain/embedchain/loaders/text_file.py
import hashlib import os from embedchain.helpers.json_serializable import register_deserializable from embedchain.loaders.base_loader import BaseLoader @register_deserializable class TextFileLoader(BaseLoader): def load_data(self, url: str): """Load data from a text file located at a local path.""" ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/json.py
embedchain/embedchain/loaders/json.py
import hashlib import json import os import re from typing import Union import requests from embedchain.loaders.base_loader import BaseLoader from embedchain.utils.misc import clean_string, is_valid_json_string class JSONReader: def __init__(self) -> None: """Initialize the JSONReader.""" pass ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/local_qna_pair.py
embedchain/embedchain/loaders/local_qna_pair.py
import hashlib from embedchain.helpers.json_serializable import register_deserializable from embedchain.loaders.base_loader import BaseLoader @register_deserializable class LocalQnaPairLoader(BaseLoader): def load_data(self, content): """Load data from a local QnA pair.""" question, answer = cont...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/directory_loader.py
embedchain/embedchain/loaders/directory_loader.py
import hashlib import logging from pathlib import Path from typing import Any, Optional from embedchain.config import AddConfig from embedchain.data_formatter.data_formatter import DataFormatter from embedchain.helpers.json_serializable import register_deserializable from embedchain.loaders.base_loader import BaseLoad...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/dropbox.py
embedchain/embedchain/loaders/dropbox.py
import hashlib import os from dropbox.files import FileMetadata from embedchain.helpers.json_serializable import register_deserializable from embedchain.loaders.base_loader import BaseLoader from embedchain.loaders.directory_loader import DirectoryLoader @register_deserializable class DropboxLoader(BaseLoader): ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/google_drive.py
embedchain/embedchain/loaders/google_drive.py
import hashlib import re try: from googleapiclient.errors import HttpError except ImportError: raise ImportError( "Google Drive requires extra dependencies. Install with `pip install embedchain[googledrive]`" ) from None from langchain_community.document_loaders import GoogleDriveLoader as Loader ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/gmail.py
embedchain/embedchain/loaders/gmail.py
import base64 import hashlib import logging import os from email import message_from_bytes from email.utils import parsedate_to_datetime from textwrap import dedent from typing import Optional from bs4 import BeautifulSoup try: from google.auth.transport.requests import Request from google.oauth2.credentials ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/github.py
embedchain/embedchain/loaders/github.py
import concurrent.futures import hashlib import logging import re import shlex from typing import Any, Optional from tqdm import tqdm from embedchain.loaders.base_loader import BaseLoader from embedchain.utils.misc import clean_string GITHUB_URL = "https://github.com" GITHUB_API_URL = "https://api.github.com" VALID...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/local_text.py
embedchain/embedchain/loaders/local_text.py
import hashlib from embedchain.helpers.json_serializable import register_deserializable from embedchain.loaders.base_loader import BaseLoader @register_deserializable class LocalTextLoader(BaseLoader): def load_data(self, content): """Load data from a local text file.""" url = "local" met...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/notion.py
embedchain/embedchain/loaders/notion.py
import hashlib import logging import os from typing import Any, Optional import requests from embedchain.helpers.json_serializable import register_deserializable from embedchain.loaders.base_loader import BaseLoader from embedchain.utils.misc import clean_string logger = logging.getLogger(__name__) class NotionDoc...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/csv.py
embedchain/embedchain/loaders/csv.py
import csv import hashlib from io import StringIO from urllib.parse import urlparse import requests from embedchain.loaders.base_loader import BaseLoader class CsvLoader(BaseLoader): @staticmethod def _detect_delimiter(first_line): delimiters = [",", "\t", ";", "|"] counts = {delimiter: firs...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/loaders/openapi.py
embedchain/embedchain/loaders/openapi.py
import hashlib from io import StringIO from urllib.parse import urlparse import requests import yaml from embedchain.loaders.base_loader import BaseLoader class OpenAPILoader(BaseLoader): @staticmethod def _get_file_content(content): url = urlparse(content) if all([url.scheme, url.netloc]) a...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/test_app.py
embedchain/tests/test_app.py
import os import pytest import yaml from embedchain import App from embedchain.config import ChromaDbConfig from embedchain.embedder.base import BaseEmbedder from embedchain.llm.base import BaseLlm from embedchain.vectordb.base import BaseVectorDB from embedchain.vectordb.chroma import ChromaDB @pytest.fixture def ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/test_factory.py
embedchain/tests/test_factory.py
import os import pytest import embedchain import embedchain.embedder.gpt4all import embedchain.embedder.huggingface import embedchain.embedder.openai import embedchain.embedder.vertexai import embedchain.llm.anthropic import embedchain.llm.openai import embedchain.vectordb.chroma import embedchain.vectordb.elasticsea...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/test_utils.py
embedchain/tests/test_utils.py
import yaml from embedchain.utils.misc import validate_config CONFIG_YAMLS = [ "configs/anthropic.yaml", "configs/azure_openai.yaml", "configs/chroma.yaml", "configs/chunker.yaml", "configs/cohere.yaml", "configs/together.yaml", "configs/ollama.yaml", "configs/full-stack.yaml", "co...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/conftest.py
embedchain/tests/conftest.py
import os import pytest from sqlalchemy import MetaData, create_engine from sqlalchemy.orm import sessionmaker @pytest.fixture(autouse=True) def clean_db(): db_path = os.path.expanduser("~/.embedchain/embedchain.db") db_url = f"sqlite:///{db_path}" engine = create_engine(db_url) metadata = MetaData()...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/__init__.py
embedchain/tests/__init__.py
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/test_client.py
embedchain/tests/test_client.py
import pytest from embedchain import Client class TestClient: @pytest.fixture def mock_requests_post(self, mocker): return mocker.patch("embedchain.client.requests.post") def test_valid_api_key(self, mock_requests_post): mock_requests_post.return_value.status_code = 200 client = ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/vectordb/test_pinecone.py
embedchain/tests/vectordb/test_pinecone.py
import pytest from embedchain.config.vector_db.pinecone import PineconeDBConfig from embedchain.vectordb.pinecone import PineconeDB @pytest.fixture def pinecone_pod_config(): return PineconeDBConfig( index_name="test_collection", api_key="test_api_key", vector_dimension=3, pod_con...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/vectordb/test_elasticsearch_db.py
embedchain/tests/vectordb/test_elasticsearch_db.py
import os import unittest from unittest.mock import patch from embedchain import App from embedchain.config import AppConfig, ElasticsearchDBConfig from embedchain.embedder.gpt4all import GPT4AllEmbedder from embedchain.vectordb.elasticsearch import ElasticsearchDB class TestEsDB(unittest.TestCase): @patch("embe...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/vectordb/test_weaviate.py
embedchain/tests/vectordb/test_weaviate.py
import unittest from unittest.mock import patch from embedchain import App from embedchain.config import AppConfig from embedchain.config.vector_db.pinecone import PineconeDBConfig from embedchain.embedder.base import BaseEmbedder from embedchain.vectordb.weaviate import WeaviateDB def mock_embedding_fn(texts: list[...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/vectordb/test_chroma_db.py
embedchain/tests/vectordb/test_chroma_db.py
import os import shutil from unittest.mock import patch import pytest from chromadb.config import Settings from embedchain import App from embedchain.config import AppConfig, ChromaDbConfig from embedchain.vectordb.chroma import ChromaDB os.environ["OPENAI_API_KEY"] = "test-api-key" @pytest.fixture def chroma_db()...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/vectordb/test_qdrant.py
embedchain/tests/vectordb/test_qdrant.py
import unittest import uuid from mock import patch from qdrant_client.http import models from qdrant_client.http.models import Batch from embedchain import App from embedchain.config import AppConfig from embedchain.config.vector_db.pinecone import PineconeDBConfig from embedchain.embedder.base import BaseEmbedder fr...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/vectordb/test_zilliz_db.py
embedchain/tests/vectordb/test_zilliz_db.py
# ruff: noqa: E501 import os from unittest import mock from unittest.mock import Mock, patch import pytest from embedchain.config import ZillizDBConfig from embedchain.vectordb.zilliz import ZillizVectorDB # to run tests, provide the URI and TOKEN in .env file class TestZillizVectorDBConfig: @mock.patch.dict(o...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/vectordb/test_lancedb.py
embedchain/tests/vectordb/test_lancedb.py
import os import shutil import pytest from embedchain import App from embedchain.config import AppConfig from embedchain.config.vector_db.lancedb import LanceDBConfig from embedchain.vectordb.lancedb import LanceDB os.environ["OPENAI_API_KEY"] = "test-api-key" @pytest.fixture def lancedb(): return LanceDB(conf...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/chunkers/test_base_chunker.py
embedchain/tests/chunkers/test_base_chunker.py
import hashlib from unittest.mock import MagicMock import pytest from embedchain.chunkers.base_chunker import BaseChunker from embedchain.config.add_config import ChunkerConfig from embedchain.models.data_type import DataType @pytest.fixture def text_splitter_mock(): return MagicMock() @pytest.fixture def loa...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/chunkers/test_chunkers.py
embedchain/tests/chunkers/test_chunkers.py
from embedchain.chunkers.audio import AudioChunker from embedchain.chunkers.common_chunker import CommonChunker from embedchain.chunkers.discourse import DiscourseChunker from embedchain.chunkers.docs_site import DocsSiteChunker from embedchain.chunkers.docx_file import DocxFileChunker from embedchain.chunkers.excel_fi...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/chunkers/test_text.py
embedchain/tests/chunkers/test_text.py
# ruff: noqa: E501 from embedchain.chunkers.text import TextChunker from embedchain.config import ChunkerConfig from embedchain.models.data_type import DataType class TestTextChunker: def test_chunks_without_app_id(self): """ Test the chunks generated by TextChunker. """ chunker_c...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/embedchain/test_add.py
embedchain/tests/embedchain/test_add.py
import os import pytest from embedchain import App from embedchain.config import AddConfig, AppConfig, ChunkerConfig from embedchain.models.data_type import DataType os.environ["OPENAI_API_KEY"] = "test_key" @pytest.fixture def app(mocker): mocker.patch("chromadb.api.models.Collection.Collection.add") retu...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/embedchain/test_utils.py
embedchain/tests/embedchain/test_utils.py
import tempfile import unittest from unittest.mock import patch from embedchain.models.data_type import DataType from embedchain.utils.misc import detect_datatype class TestApp(unittest.TestCase): """Test that the datatype detection is working, based on the input.""" def test_detect_datatype_youtube(self): ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/embedchain/test_embedchain.py
embedchain/tests/embedchain/test_embedchain.py
import os import pytest from chromadb.api.models.Collection import Collection from embedchain import App from embedchain.config import AppConfig, ChromaDbConfig from embedchain.embedchain import EmbedChain from embedchain.llm.base import BaseLlm from embedchain.memory.base import ChatHistory from embedchain.vectordb....
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/models/test_data_type.py
embedchain/tests/models/test_data_type.py
from embedchain.models.data_type import ( DataType, DirectDataType, IndirectDataType, SpecialDataType, ) def test_subclass_types_in_data_type(): """Test that all data type category subclasses are contained in the composite data type""" # Check if DirectDataType values are in DataType for d...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/memory/test_chat_memory.py
embedchain/tests/memory/test_chat_memory.py
import pytest from embedchain.memory.base import ChatHistory from embedchain.memory.message import ChatMessage # Fixture for creating an instance of ChatHistory @pytest.fixture def chat_memory_instance(): return ChatHistory() def test_add_chat_memory(chat_memory_instance): app_id = "test_app" session_i...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/memory/test_memory_messages.py
embedchain/tests/memory/test_memory_messages.py
from embedchain.memory.message import BaseMessage, ChatMessage def test_ec_base_message(): content = "Hello, how are you?" created_by = "human" metadata = {"key": "value"} message = BaseMessage(content=content, created_by=created_by, metadata=metadata) assert message.content == content asser...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/helper_classes/test_json_serializable.py
embedchain/tests/helper_classes/test_json_serializable.py
import random import unittest from string import Template from embedchain import App from embedchain.config import AppConfig, BaseLlmConfig from embedchain.helpers.json_serializable import ( JSONSerializable, register_deserializable, ) class TestJsonSerializable(unittest.TestCase): """Test that the datat...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/test_openai.py
embedchain/tests/llm/test_openai.py
import os import httpx import pytest from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler from embedchain.config import BaseLlmConfig from embedchain.llm.openai import OpenAILlm @pytest.fixture() def env_config(): os.environ["OPENAI_API_KEY"] = "test_api_key" os.environ["OPENAI_AP...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/test_generate_prompt.py
embedchain/tests/llm/test_generate_prompt.py
import unittest from string import Template from embedchain import App from embedchain.config import AppConfig, BaseLlmConfig class TestGeneratePrompt(unittest.TestCase): def setUp(self): self.app = App(config=AppConfig(collect_metrics=False)) def test_generate_prompt_with_template(self): ""...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/test_chat.py
embedchain/tests/llm/test_chat.py
import os import unittest from unittest.mock import MagicMock, patch from embedchain import App from embedchain.config import AppConfig, BaseLlmConfig from embedchain.llm.base import BaseLlm from embedchain.memory.base import ChatHistory from embedchain.memory.message import ChatMessage class TestApp(unittest.TestCa...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/test_llama2.py
embedchain/tests/llm/test_llama2.py
import os import pytest from embedchain.llm.llama2 import Llama2Llm @pytest.fixture def llama2_llm(): os.environ["REPLICATE_API_TOKEN"] = "test_api_token" llm = Llama2Llm() return llm def test_init_raises_value_error_without_api_key(mocker): mocker.patch.dict(os.environ, clear=True) with pytes...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/test_query.py
embedchain/tests/llm/test_query.py
import os from unittest.mock import MagicMock, patch import pytest from embedchain import App from embedchain.config import AppConfig, BaseLlmConfig from embedchain.llm.openai import OpenAILlm @pytest.fixture def app(): os.environ["OPENAI_API_KEY"] = "test_api_key" app = App(config=AppConfig(collect_metrics...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/test_together.py
embedchain/tests/llm/test_together.py
import os import pytest from embedchain.config import BaseLlmConfig from embedchain.llm.together import TogetherLlm @pytest.fixture def together_llm_config(): os.environ["TOGETHER_API_KEY"] = "test_api_key" config = BaseLlmConfig(model="together-ai-up-to-3b", max_tokens=50, temperature=0.7, top_p=0.8) y...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/test_google.py
embedchain/tests/llm/test_google.py
import pytest from embedchain.config import BaseLlmConfig from embedchain.llm.google import GoogleLlm @pytest.fixture def google_llm_config(): return BaseLlmConfig(model="gemini-pro", max_tokens=100, temperature=0.7, top_p=0.5, stream=False) def test_google_llm_init_missing_api_key(monkeypatch): monkeypatc...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/test_aws_bedrock.py
embedchain/tests/llm/test_aws_bedrock.py
import pytest from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler from embedchain.config import BaseLlmConfig from embedchain.llm.aws_bedrock import AWSBedrockLlm @pytest.fixture def config(monkeypatch): monkeypatch.setenv("AWS_ACCESS_KEY_ID", "test_access_key_id") monkeypatch.set...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/test_vertex_ai.py
embedchain/tests/llm/test_vertex_ai.py
from unittest.mock import MagicMock, patch import pytest from langchain.schema import HumanMessage, SystemMessage from embedchain.config import BaseLlmConfig from embedchain.core.db.database import database_manager from embedchain.llm.vertex_ai import VertexAILlm @pytest.fixture(autouse=True) def setup_database(): ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/test_clarifai.py
embedchain/tests/llm/test_clarifai.py
import pytest from embedchain.config import BaseLlmConfig from embedchain.llm.clarifai import ClarifaiLlm @pytest.fixture def clarifai_llm_config(monkeypatch): monkeypatch.setenv("CLARIFAI_PAT","test_api_key") config = BaseLlmConfig( model="https://clarifai.com/openai/chat-completion/models/GPT-4", ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/test_gpt4all.py
embedchain/tests/llm/test_gpt4all.py
import pytest from langchain_community.llms.gpt4all import GPT4All as LangchainGPT4All from embedchain.config import BaseLlmConfig from embedchain.llm.gpt4all import GPT4ALLLlm @pytest.fixture def config(): config = BaseLlmConfig( temperature=0.7, max_tokens=50, top_p=0.8, stream=...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/test_azure_openai.py
embedchain/tests/llm/test_azure_openai.py
from unittest.mock import MagicMock, Mock, patch import httpx import pytest from langchain.schema import HumanMessage, SystemMessage from embedchain.config import BaseLlmConfig from embedchain.llm.azure_openai import AzureOpenAILlm @pytest.fixture def azure_openai_llm(): config = BaseLlmConfig( deployme...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/conftest.py
embedchain/tests/llm/conftest.py
from unittest import mock import pytest @pytest.fixture(autouse=True) def mock_alembic_command_upgrade(): with mock.patch("alembic.command.upgrade"): yield
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/test_base_llm.py
embedchain/tests/llm/test_base_llm.py
from string import Template import pytest from embedchain.llm.base import BaseLlm, BaseLlmConfig @pytest.fixture def base_llm(): config = BaseLlmConfig() return BaseLlm(config=config) def test_is_get_llm_model_answer_not_implemented(base_llm): with pytest.raises(NotImplementedError): base_llm....
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/test_huggingface.py
embedchain/tests/llm/test_huggingface.py
import importlib import os import pytest from embedchain.config import BaseLlmConfig from embedchain.llm.huggingface import HuggingFaceLlm @pytest.fixture def huggingface_llm_config(): os.environ["HUGGINGFACE_ACCESS_TOKEN"] = "test_access_token" config = BaseLlmConfig(model="google/flan-t5-xxl", max_tokens=...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/test_mistralai.py
embedchain/tests/llm/test_mistralai.py
import pytest from embedchain.config import BaseLlmConfig from embedchain.llm.mistralai import MistralAILlm @pytest.fixture def mistralai_llm_config(monkeypatch): monkeypatch.setenv("MISTRAL_API_KEY", "fake_api_key") yield BaseLlmConfig(model="mistral-tiny", max_tokens=100, temperature=0.7, top_p=0.5, stream...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/test_cohere.py
embedchain/tests/llm/test_cohere.py
import os import pytest from embedchain.config import BaseLlmConfig from embedchain.llm.cohere import CohereLlm @pytest.fixture def cohere_llm_config(): os.environ["COHERE_API_KEY"] = "test_api_key" config = BaseLlmConfig(model="command-r", max_tokens=100, temperature=0.7, top_p=0.8, token_usage=False) ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/test_anthrophic.py
embedchain/tests/llm/test_anthrophic.py
import os from unittest.mock import patch import pytest from langchain.schema import HumanMessage, SystemMessage from embedchain.config import BaseLlmConfig from embedchain.llm.anthropic import AnthropicLlm @pytest.fixture def anthropic_llm(): os.environ["ANTHROPIC_API_KEY"] = "test_api_key" config = BaseLl...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/test_jina.py
embedchain/tests/llm/test_jina.py
import os import pytest from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler from embedchain.config import BaseLlmConfig from embedchain.llm.jina import JinaLlm @pytest.fixture def config(): os.environ["JINACHAT_API_KEY"] = "test_api_key" config = BaseLlmConfig(temperature=0.7, ma...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/llm/test_ollama.py
embedchain/tests/llm/test_ollama.py
import pytest from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler from embedchain.config import BaseLlmConfig from embedchain.llm.ollama import OllamaLlm @pytest.fixture def ollama_llm_config(): config = BaseLlmConfig(model="llama2", temperature=0.7, top_p=0.8, stream=True, system_pro...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/evaluation/test_groundedness_metric.py
embedchain/tests/evaluation/test_groundedness_metric.py
import numpy as np import pytest from embedchain.config.evaluation.base import GroundednessConfig from embedchain.evaluation.metrics import Groundedness from embedchain.utils.evaluation import EvalData, EvalMetric @pytest.fixture def mock_data(): return [ EvalData( contexts=[ ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/evaluation/test_context_relevancy_metric.py
embedchain/tests/evaluation/test_context_relevancy_metric.py
import pytest from embedchain.config.evaluation.base import ContextRelevanceConfig from embedchain.evaluation.metrics import ContextRelevance from embedchain.utils.evaluation import EvalData, EvalMetric @pytest.fixture def mock_data(): return [ EvalData( contexts=[ "This is a ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/evaluation/test_answer_relevancy_metric.py
embedchain/tests/evaluation/test_answer_relevancy_metric.py
import numpy as np import pytest from embedchain.config.evaluation.base import AnswerRelevanceConfig from embedchain.evaluation.metrics import AnswerRelevance from embedchain.utils.evaluation import EvalData, EvalMetric @pytest.fixture def mock_data(): return [ EvalData( contexts=[ ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/embedder/test_aws_bedrock_embedder.py
embedchain/tests/embedder/test_aws_bedrock_embedder.py
from unittest.mock import patch from embedchain.config.embedder.aws_bedrock import AWSBedrockEmbedderConfig from embedchain.embedder.aws_bedrock import AWSBedrockEmbedder def test_aws_bedrock_embedder_with_model(): config = AWSBedrockEmbedderConfig( model="test-model", model_kwargs={"param": "val...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/embedder/test_huggingface_embedder.py
embedchain/tests/embedder/test_huggingface_embedder.py
from unittest.mock import patch from embedchain.config import BaseEmbedderConfig from embedchain.embedder.huggingface import HuggingFaceEmbedder def test_huggingface_embedder_with_model(monkeypatch): config = BaseEmbedderConfig(model="test-model", model_kwargs={"param": "value"}) with patch('embedchain.embe...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/embedder/test_embedder.py
embedchain/tests/embedder/test_embedder.py
import pytest from chromadb.api.types import Documents, Embeddings from embedchain.config.embedder.base import BaseEmbedderConfig from embedchain.embedder.base import BaseEmbedder @pytest.fixture def base_embedder(): return BaseEmbedder() def test_initialization(base_embedder): assert isinstance(base_embed...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/embedder/test_azure_openai_embedder.py
embedchain/tests/embedder/test_azure_openai_embedder.py
from unittest.mock import Mock, patch import httpx from embedchain.config import BaseEmbedderConfig from embedchain.embedder.azure_openai import AzureOpenAIEmbedder def test_azure_openai_embedder_with_http_client(monkeypatch): mock_http_client = Mock(spec=httpx.Client) mock_http_client_instance = Mock(spec=...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/telemetry/test_posthog.py
embedchain/tests/telemetry/test_posthog.py
import logging import os from embedchain.telemetry.posthog import AnonymousTelemetry class TestAnonymousTelemetry: def test_init(self, mocker): # Enable telemetry specifically for this test os.environ["EC_TELEMETRY"] = "true" mock_posthog = mocker.patch("embedchain.telemetry.posthog.Posth...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/loaders/test_local_qna_pair.py
embedchain/tests/loaders/test_local_qna_pair.py
import hashlib import pytest from embedchain.loaders.local_qna_pair import LocalQnaPairLoader @pytest.fixture def qna_pair_loader(): return LocalQnaPairLoader() def test_load_data(qna_pair_loader): question = "What is the capital of France?" answer = "The capital of France is Paris." content = (q...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/loaders/test_postgres.py
embedchain/tests/loaders/test_postgres.py
from unittest.mock import MagicMock import psycopg import pytest from embedchain.loaders.postgres import PostgresLoader @pytest.fixture def postgres_loader(mocker): with mocker.patch.object(psycopg, "connect"): config = {"url": "postgres://user:password@localhost:5432/database"} loader = Postgre...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/loaders/test_gmail.py
embedchain/tests/loaders/test_gmail.py
import pytest from embedchain.loaders.gmail import GmailLoader @pytest.fixture def mock_beautifulsoup(mocker): return mocker.patch("embedchain.loaders.gmail.BeautifulSoup", return_value=mocker.MagicMock()) @pytest.fixture def gmail_loader(mock_beautifulsoup): return GmailLoader() def test_load_data_file_...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/loaders/test_mysql.py
embedchain/tests/loaders/test_mysql.py
import hashlib from unittest.mock import MagicMock import pytest from embedchain.loaders.mysql import MySQLLoader @pytest.fixture def mysql_loader(mocker): with mocker.patch("mysql.connector.connection.MySQLConnection"): config = { "host": "localhost", "port": "3306", ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/loaders/test_openapi.py
embedchain/tests/loaders/test_openapi.py
import pytest from embedchain.loaders.openapi import OpenAPILoader @pytest.fixture def openapi_loader(): return OpenAPILoader() def test_load_data(openapi_loader, mocker): mocker.patch("builtins.open", mocker.mock_open(read_data="key1: value1\nkey2: value2")) mocker.patch("hashlib.sha256", return_valu...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/loaders/test_web_page.py
embedchain/tests/loaders/test_web_page.py
import hashlib from unittest.mock import Mock, patch import pytest import requests from embedchain.loaders.web_page import WebPageLoader @pytest.fixture def web_page_loader(): return WebPageLoader() def test_load_data(web_page_loader): page_url = "https://example.com/page" mock_response = Mock() m...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/loaders/test_json.py
embedchain/tests/loaders/test_json.py
import hashlib import pytest from embedchain.loaders.json import JSONLoader def test_load_data(mocker): content = "temp.json" mock_document = { "doc_id": hashlib.sha256((content + ", ".join(["content1", "content2"])).encode()).hexdigest(), "data": [ {"content": "content1", "meta...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/loaders/test_notion.py
embedchain/tests/loaders/test_notion.py
import hashlib import os from unittest.mock import Mock, patch import pytest from embedchain.loaders.notion import NotionLoader @pytest.fixture def notion_loader(): with patch.dict(os.environ, {"NOTION_INTEGRATION_TOKEN": "test_notion_token"}): yield NotionLoader() def test_load_data(notion_loader): ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/loaders/test_mdx.py
embedchain/tests/loaders/test_mdx.py
import hashlib from unittest.mock import mock_open, patch import pytest from embedchain.loaders.mdx import MdxLoader @pytest.fixture def mdx_loader(): return MdxLoader() def test_load_data(mdx_loader): mock_content = "Sample MDX Content" # Mock open function to simulate file reading with patch("b...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/loaders/test_audio.py
embedchain/tests/loaders/test_audio.py
import hashlib import os import sys from unittest.mock import mock_open, patch import pytest if sys.version_info > (3, 10): # as `match` statement was introduced in python 3.10 from deepgram import PrerecordedOptions from embedchain.loaders.audio import AudioLoader @pytest.fixture def setup_audio_loader(m...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/loaders/test_excel_file.py
embedchain/tests/loaders/test_excel_file.py
import hashlib from unittest.mock import patch import pytest from embedchain.loaders.excel_file import ExcelFileLoader @pytest.fixture def excel_file_loader(): return ExcelFileLoader() def test_load_data(excel_file_loader): mock_url = "mock_excel_file.xlsx" expected_content = "Sample Excel Content" ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/tests/loaders/test_local_text.py
embedchain/tests/loaders/test_local_text.py
import hashlib import pytest from embedchain.loaders.local_text import LocalTextLoader @pytest.fixture def text_loader(): return LocalTextLoader() def test_load_data(text_loader): mock_content = "This is a sample text content." result = text_loader.load_data(mock_content) assert "doc_id" in resu...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false