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/chunkers/google_drive.py
embedchain/embedchain/chunkers/google_drive.py
from typing import Optional from langchain.text_splitter import RecursiveCharacterTextSplitter from embedchain.chunkers.base_chunker import BaseChunker from embedchain.config.add_config import ChunkerConfig from embedchain.helpers.json_serializable import register_deserializable @register_deserializable class Googl...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/chunkers/gmail.py
embedchain/embedchain/chunkers/gmail.py
from typing import Optional from langchain.text_splitter import RecursiveCharacterTextSplitter from embedchain.chunkers.base_chunker import BaseChunker from embedchain.config.add_config import ChunkerConfig from embedchain.helpers.json_serializable import register_deserializable @register_deserializable class Gmail...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/chunkers/notion.py
embedchain/embedchain/chunkers/notion.py
from typing import Optional from langchain.text_splitter import RecursiveCharacterTextSplitter from embedchain.chunkers.base_chunker import BaseChunker from embedchain.config.add_config import ChunkerConfig from embedchain.helpers.json_serializable import register_deserializable @register_deserializable class Notio...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/chunkers/common_chunker.py
embedchain/embedchain/chunkers/common_chunker.py
from typing import Optional from langchain.text_splitter import RecursiveCharacterTextSplitter from embedchain.chunkers.base_chunker import BaseChunker from embedchain.config.add_config import ChunkerConfig from embedchain.helpers.json_serializable import register_deserializable @register_deserializable class Commo...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/chunkers/openapi.py
embedchain/embedchain/chunkers/openapi.py
from typing import Optional from langchain.text_splitter import RecursiveCharacterTextSplitter from embedchain.chunkers.base_chunker import BaseChunker from embedchain.config.add_config import ChunkerConfig class OpenAPIChunker(BaseChunker): def __init__(self, config: Optional[ChunkerConfig] = None): if...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/helpers/json_serializable.py
embedchain/embedchain/helpers/json_serializable.py
import json import logging from string import Template from typing import Any, Type, TypeVar, Union T = TypeVar("T", bound="JSONSerializable") # NOTE: Through inheritance, all of our classes should be children of JSONSerializable. (highest level) # NOTE: The @register_deserializable decorator should be added to all u...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/helpers/callbacks.py
embedchain/embedchain/helpers/callbacks.py
import queue from typing import Any, Union from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler from langchain.schema import LLMResult STOP_ITEM = "[END]" """ This is a special item that is used to signal the end of the stream. """ class StreamingStdOutCallbackHandlerYield(StreamingStdOut...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/helpers/__init__.py
embedchain/embedchain/helpers/__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/store/assistants.py
embedchain/embedchain/store/assistants.py
import logging import os import re import tempfile import time import uuid from pathlib import Path from typing import cast from openai import OpenAI from openai.types.beta.threads import Message from openai.types.beta.threads.text_content_block import TextContentBlock from embedchain import Client, Pipeline from emb...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/store/__init__.py
embedchain/embedchain/store/__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/models/data_type.py
embedchain/embedchain/models/data_type.py
from enum import Enum class DirectDataType(Enum): """ DirectDataType enum contains data types that contain raw data directly. """ TEXT = "text" class IndirectDataType(Enum): """ IndirectDataType enum contains data types that contain references to data stored elsewhere. """ YOUTUBE_...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/models/embedding_functions.py
embedchain/embedchain/models/embedding_functions.py
from enum import Enum class EmbeddingFunctions(Enum): OPENAI = "OPENAI" HUGGING_FACE = "HUGGING_FACE" VERTEX_AI = "VERTEX_AI" AWS_BEDROCK = "AWS_BEDROCK" GPT4ALL = "GPT4ALL" OLLAMA = "OLLAMA"
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/models/providers.py
embedchain/embedchain/models/providers.py
from enum import Enum class Providers(Enum): OPENAI = "OPENAI" ANTHROPHIC = "ANTHPROPIC" VERTEX_AI = "VERTEX_AI" GPT4ALL = "GPT4ALL" OLLAMA = "OLLAMA" AZURE_OPENAI = "AZURE_OPENAI"
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/models/vector_dimensions.py
embedchain/embedchain/models/vector_dimensions.py
from enum import Enum # vector length created by embedding fn class VectorDimensions(Enum): GPT4ALL = 384 OPENAI = 1536 VERTEX_AI = 768 HUGGING_FACE = 384 GOOGLE_AI = 768 MISTRAL_AI = 1024 NVIDIA_AI = 1024 COHERE = 384 OLLAMA = 384 AMAZON_TITAN_V1 = 1536 AMAZON_TITAN_V2 = 1...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/models/__init__.py
embedchain/embedchain/models/__init__.py
from .embedding_functions import EmbeddingFunctions # noqa: F401 from .providers import Providers # noqa: F401 from .vector_dimensions import VectorDimensions # noqa: F401
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/memory/message.py
embedchain/embedchain/memory/message.py
import logging from typing import Any, Optional from embedchain.helpers.json_serializable import JSONSerializable logger = logging.getLogger(__name__) class BaseMessage(JSONSerializable): """ The base abstract message class. Messages are the inputs and outputs of Models. """ # The string conte...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/memory/utils.py
embedchain/embedchain/memory/utils.py
from typing import Any, Optional def merge_metadata_dict(left: Optional[dict[str, Any]], right: Optional[dict[str, Any]]) -> Optional[dict[str, Any]]: """ Merge the metadatas of two BaseMessage types. Args: left (dict[str, Any]): metadata of human message right (dict[str, Any]): metadata ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/memory/__init__.py
embedchain/embedchain/memory/__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/memory/base.py
embedchain/embedchain/memory/base.py
import json import logging import uuid from typing import Any, Optional from embedchain.core.db.database import get_session from embedchain.core.db.models import ChatHistory as ChatHistoryModel from embedchain.memory.message import ChatMessage from embedchain.memory.utils import merge_metadata_dict logger = logging.g...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/utils/cli.py
embedchain/embedchain/utils/cli.py
import os import re import shutil import subprocess import pkg_resources from rich.console import Console console = Console() def get_pkg_path_from_name(template: str): try: # Determine the installation location of the embedchain package package_path = pkg_resources.resource_filename("embedchain...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/utils/misc.py
embedchain/embedchain/utils/misc.py
import datetime import itertools import json import logging import os import re import string from typing import Any from schema import Optional, Or, Schema from tqdm import tqdm from embedchain.models.data_type import DataType logger = logging.getLogger(__name__) def parse_content(content, type): implemented ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/utils/evaluation.py
embedchain/embedchain/utils/evaluation.py
from enum import Enum from typing import Optional from pydantic import BaseModel class EvalMetric(Enum): CONTEXT_RELEVANCY = "context_relevancy" ANSWER_RELEVANCY = "answer_relevancy" GROUNDEDNESS = "groundedness" class EvalData(BaseModel): question: str contexts: list[str] answer: str g...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/utils/__init__.py
embedchain/embedchain/utils/__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/migrations/env.py
embedchain/embedchain/migrations/env.py
import os from alembic import context from sqlalchemy import engine_from_config, pool from embedchain.core.db.models import Base # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config target_metadata = Base.metadata # other values from the co...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/migrations/versions/40a327b3debd_create_initial_migrations.py
embedchain/embedchain/migrations/versions/40a327b3debd_create_initial_migrations.py
"""Create initial migrations Revision ID: 40a327b3debd Revises: Create Date: 2024-02-18 15:29:19.409064 """ from typing import Sequence, Union import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision: str = "40a327b3debd" down_revision: Union[str, None] = None branch_labels:...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/llm/clarifai.py
embedchain/embedchain/llm/clarifai.py
import logging import os from typing import Optional from embedchain.config import BaseLlmConfig from embedchain.helpers.json_serializable import register_deserializable from embedchain.llm.base import BaseLlm @register_deserializable class ClarifaiLlm(BaseLlm): def __init__(self, config: Optional[BaseLlmConfig]...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/llm/anthropic.py
embedchain/embedchain/llm/anthropic.py
import logging import os from typing import Any, Optional try: from langchain_anthropic import ChatAnthropic except ImportError: raise ImportError("Please install the langchain-anthropic package by running `pip install langchain-anthropic`.") from embedchain.config import BaseLlmConfig from embedchain.helpers...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/llm/nvidia.py
embedchain/embedchain/llm/nvidia.py
import os from collections.abc import Iterable from typing import Any, Optional, Union from langchain.callbacks.manager import CallbackManager from langchain.callbacks.stdout import StdOutCallbackHandler from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler try: from langchain_nvidia_ai_...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/llm/ollama.py
embedchain/embedchain/llm/ollama.py
import logging from collections.abc import Iterable from typing import Optional, Union from langchain.callbacks.manager import CallbackManager from langchain.callbacks.stdout import StdOutCallbackHandler from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler from langchain_community.llms.ollam...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/llm/aws_bedrock.py
embedchain/embedchain/llm/aws_bedrock.py
import os from typing import Optional try: from langchain_aws import BedrockLLM except ModuleNotFoundError: raise ModuleNotFoundError( "The required dependencies for AWSBedrock are not installed." "Please install with `pip install langchain_aws`" ) from None from embedchain.config import BaseLlmCo...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/llm/together.py
embedchain/embedchain/llm/together.py
import importlib import os from typing import Any, Optional try: from langchain_together import ChatTogether except ImportError: raise ImportError( "Please install the langchain_together package by running `pip install langchain_together==0.1.3`." ) from embedchain.config import BaseLlmConfig from...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/llm/vllm.py
embedchain/embedchain/llm/vllm.py
from typing import Iterable, Optional, Union from langchain.callbacks.manager import CallbackManager from langchain.callbacks.stdout import StdOutCallbackHandler from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler from langchain_community.llms import VLLM as BaseVLLM from embedchain.config...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/llm/groq.py
embedchain/embedchain/llm/groq.py
import os from typing import Any, Optional from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler from langchain.schema import HumanMessage, SystemMessage try: from langchain_groq import ChatGroq except ImportError: raise ImportError("Groq requires extra dependencies. Install with `pi...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/llm/google.py
embedchain/embedchain/llm/google.py
import logging import os from collections.abc import Generator from typing import Any, Optional, Union try: import google.generativeai as genai except ImportError: raise ImportError("GoogleLlm requires extra dependencies. Install with `pip install google-generativeai`") from None from embedchain.config import...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/llm/gpt4all.py
embedchain/embedchain/llm/gpt4all.py
import os from collections.abc import Iterable from pathlib import Path from typing import Optional, Union from langchain.callbacks.stdout import StdOutCallbackHandler from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler from embedchain.config import BaseLlmConfig from embedchain.helpers.js...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/llm/huggingface.py
embedchain/embedchain/llm/huggingface.py
import importlib import logging import os from typing import Optional from langchain_community.llms.huggingface_endpoint import HuggingFaceEndpoint from langchain_community.llms.huggingface_hub import HuggingFaceHub from langchain_community.llms.huggingface_pipeline import HuggingFacePipeline from embedchain.config i...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/llm/jina.py
embedchain/embedchain/llm/jina.py
import os from typing import Optional from langchain.schema import HumanMessage, SystemMessage from langchain_community.chat_models import JinaChat from embedchain.config import BaseLlmConfig from embedchain.helpers.json_serializable import register_deserializable from embedchain.llm.base import BaseLlm @register_d...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/llm/cohere.py
embedchain/embedchain/llm/cohere.py
import importlib import os from typing import Any, Optional from langchain_cohere import ChatCohere from embedchain.config import BaseLlmConfig from embedchain.helpers.json_serializable import register_deserializable from embedchain.llm.base import BaseLlm @register_deserializable class CohereLlm(BaseLlm): def ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/llm/__init__.py
embedchain/embedchain/llm/__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/llm/azure_openai.py
embedchain/embedchain/llm/azure_openai.py
import logging from typing import Optional from embedchain.config import BaseLlmConfig from embedchain.helpers.json_serializable import register_deserializable from embedchain.llm.base import BaseLlm logger = logging.getLogger(__name__) @register_deserializable class AzureOpenAILlm(BaseLlm): def __init__(self, ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/llm/base.py
embedchain/embedchain/llm/base.py
import logging import os from collections.abc import Generator from typing import Any, Optional from langchain.schema import BaseMessage as LCBaseMessage from embedchain.config import BaseLlmConfig from embedchain.config.llm.base import ( DEFAULT_PROMPT, DEFAULT_PROMPT_WITH_HISTORY_TEMPLATE, DEFAULT_PROMP...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/llm/mistralai.py
embedchain/embedchain/llm/mistralai.py
import os from typing import Any, Optional from embedchain.config import BaseLlmConfig from embedchain.helpers.json_serializable import register_deserializable from embedchain.llm.base import BaseLlm @register_deserializable class MistralAILlm(BaseLlm): def __init__(self, config: Optional[BaseLlmConfig] = None):...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/llm/vertex_ai.py
embedchain/embedchain/llm/vertex_ai.py
import importlib import logging from typing import Any, Optional from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler from langchain_google_vertexai import ChatVertexAI from embedchain.config import BaseLlmConfig from embedchain.helpers.json_serializable import register_deserializable from ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/llm/openai.py
embedchain/embedchain/llm/openai.py
import json import os import warnings from typing import Any, Callable, Dict, Optional, Type, Union from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler from langchain.schema import BaseMessage, HumanMessage, SystemMessage from langchain_core.tools import BaseTool from langchain_openai impor...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/llm/llama2.py
embedchain/embedchain/llm/llama2.py
import importlib import os from typing import Optional from langchain_community.llms.replicate import Replicate from embedchain.config import BaseLlmConfig from embedchain.helpers.json_serializable import register_deserializable from embedchain.llm.base import BaseLlm @register_deserializable class Llama2Llm(BaseLl...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/core/__init__.py
embedchain/embedchain/core/__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/core/db/models.py
embedchain/embedchain/core/db/models.py
import uuid from sqlalchemy import TIMESTAMP, Column, Integer, String, Text, func from sqlalchemy.orm import declarative_base Base = declarative_base() metadata = Base.metadata class DataSource(Base): __tablename__ = "ec_data_sources" id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4()))...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/core/db/database.py
embedchain/embedchain/core/db/database.py
import os from alembic import command from alembic.config import Config from sqlalchemy import create_engine from sqlalchemy.engine.base import Engine from sqlalchemy.orm import Session as SQLAlchemySession from sqlalchemy.orm import scoped_session, sessionmaker from .models import Base class DatabaseManager: d...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/core/db/__init__.py
embedchain/embedchain/core/db/__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/config/app_config.py
embedchain/embedchain/config/app_config.py
from typing import Optional from embedchain.helpers.json_serializable import register_deserializable from .base_app_config import BaseAppConfig @register_deserializable class AppConfig(BaseAppConfig): """ Config to initialize an embedchain custom `App` instance, with extra config options. """ def _...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/base_config.py
embedchain/embedchain/config/base_config.py
from typing import Any from embedchain.helpers.json_serializable import JSONSerializable class BaseConfig(JSONSerializable): """ Base config. """ def __init__(self): """Initializes a configuration class for a class.""" pass def as_dict(self) -> dict[str, Any]: """Return ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/add_config.py
embedchain/embedchain/config/add_config.py
import builtins import logging from collections.abc import Callable from importlib import import_module from typing import Optional from embedchain.config.base_config import BaseConfig from embedchain.helpers.json_serializable import register_deserializable @register_deserializable class ChunkerConfig(BaseConfig): ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/base_app_config.py
embedchain/embedchain/config/base_app_config.py
import logging from typing import Optional from embedchain.config.base_config import BaseConfig from embedchain.helpers.json_serializable import JSONSerializable from embedchain.vectordb.base import BaseVectorDB logger = logging.getLogger(__name__) class BaseAppConfig(BaseConfig, JSONSerializable): """ Pare...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/__init__.py
embedchain/embedchain/config/__init__.py
# flake8: noqa: F401 from .add_config import AddConfig, ChunkerConfig from .app_config import AppConfig from .base_config import BaseConfig from .cache_config import CacheConfig from .embedder.base import BaseEmbedderConfig from .embedder.base import BaseEmbedderConfig as EmbedderConfig from .embedder.ollama import Ol...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/mem0_config.py
embedchain/embedchain/config/mem0_config.py
from typing import Any, Optional from embedchain.config.base_config import BaseConfig from embedchain.helpers.json_serializable import register_deserializable @register_deserializable class Mem0Config(BaseConfig): def __init__(self, api_key: str, top_k: Optional[int] = 10): self.api_key = api_key ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/cache_config.py
embedchain/embedchain/config/cache_config.py
from typing import Any, Optional from embedchain.config.base_config import BaseConfig from embedchain.helpers.json_serializable import register_deserializable @register_deserializable class CacheSimilarityEvalConfig(BaseConfig): """ This is the evaluator to compare two embeddings according to their distance ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/vectordb/__init__.py
embedchain/embedchain/config/vectordb/__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/config/llm/__init__.py
embedchain/embedchain/config/llm/__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/config/llm/base.py
embedchain/embedchain/config/llm/base.py
import json import logging import re from pathlib import Path from string import Template from typing import Any, Dict, Mapping, Optional, Union import httpx from embedchain.config.base_config import BaseConfig from embedchain.helpers.json_serializable import register_deserializable logger = logging.getLogger(__name...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/vector_db/lancedb.py
embedchain/embedchain/config/vector_db/lancedb.py
from typing import Optional from embedchain.config.vector_db.base import BaseVectorDbConfig from embedchain.helpers.json_serializable import register_deserializable @register_deserializable class LanceDBConfig(BaseVectorDbConfig): def __init__( self, collection_name: Optional[str] = None, ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/vector_db/opensearch.py
embedchain/embedchain/config/vector_db/opensearch.py
from typing import Optional from embedchain.config.vector_db.base import BaseVectorDbConfig from embedchain.helpers.json_serializable import register_deserializable @register_deserializable class OpenSearchDBConfig(BaseVectorDbConfig): def __init__( self, opensearch_url: str, http_auth: t...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/vector_db/chroma.py
embedchain/embedchain/config/vector_db/chroma.py
from typing import Optional from embedchain.config.vector_db.base import BaseVectorDbConfig from embedchain.helpers.json_serializable import register_deserializable @register_deserializable class ChromaDbConfig(BaseVectorDbConfig): def __init__( self, collection_name: Optional[str] = None, ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/vector_db/base.py
embedchain/embedchain/config/vector_db/base.py
from typing import Optional from embedchain.config.base_config import BaseConfig class BaseVectorDbConfig(BaseConfig): def __init__( self, collection_name: Optional[str] = None, dir: str = "db", host: Optional[str] = None, port: Optional[str] = None, **kwargs, ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/vector_db/pinecone.py
embedchain/embedchain/config/vector_db/pinecone.py
import os from typing import Optional from embedchain.config.vector_db.base import BaseVectorDbConfig from embedchain.helpers.json_serializable import register_deserializable @register_deserializable class PineconeDBConfig(BaseVectorDbConfig): def __init__( self, index_name: Optional[str] = None,...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/vector_db/weaviate.py
embedchain/embedchain/config/vector_db/weaviate.py
from typing import Optional from embedchain.config.vector_db.base import BaseVectorDbConfig from embedchain.helpers.json_serializable import register_deserializable @register_deserializable class WeaviateDBConfig(BaseVectorDbConfig): def __init__( self, collection_name: Optional[str] = None, ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/vector_db/elasticsearch.py
embedchain/embedchain/config/vector_db/elasticsearch.py
import os from typing import Optional, Union from embedchain.config.vector_db.base import BaseVectorDbConfig from embedchain.helpers.json_serializable import register_deserializable @register_deserializable class ElasticsearchDBConfig(BaseVectorDbConfig): def __init__( self, collection_name: Opti...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/vector_db/zilliz.py
embedchain/embedchain/config/vector_db/zilliz.py
import os from typing import Optional from embedchain.config.vector_db.base import BaseVectorDbConfig from embedchain.helpers.json_serializable import register_deserializable @register_deserializable class ZillizDBConfig(BaseVectorDbConfig): def __init__( self, collection_name: Optional[str] = No...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/vector_db/qdrant.py
embedchain/embedchain/config/vector_db/qdrant.py
from typing import Optional from embedchain.config.vector_db.base import BaseVectorDbConfig from embedchain.helpers.json_serializable import register_deserializable @register_deserializable class QdrantDBConfig(BaseVectorDbConfig): """ Config to initialize a qdrant client. :param: url. qdrant url or list...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/evaluation/__init__.py
embedchain/embedchain/config/evaluation/__init__.py
from .base import ( # noqa: F401 AnswerRelevanceConfig, ContextRelevanceConfig, GroundednessConfig, )
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/evaluation/base.py
embedchain/embedchain/config/evaluation/base.py
from typing import Optional from embedchain.config.base_config import BaseConfig ANSWER_RELEVANCY_PROMPT = """ Please provide $num_gen_questions questions from the provided answer. You must provide the complete question, if are not able to provide the complete question, return empty string (""). Please only provide o...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/embedder/ollama.py
embedchain/embedchain/config/embedder/ollama.py
from typing import Optional from embedchain.config.embedder.base import BaseEmbedderConfig from embedchain.helpers.json_serializable import register_deserializable @register_deserializable class OllamaEmbedderConfig(BaseEmbedderConfig): def __init__( self, model: Optional[str] = None, bas...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/embedder/aws_bedrock.py
embedchain/embedchain/config/embedder/aws_bedrock.py
from typing import Any, Dict, Optional from embedchain.config.embedder.base import BaseEmbedderConfig from embedchain.helpers.json_serializable import register_deserializable @register_deserializable class AWSBedrockEmbedderConfig(BaseEmbedderConfig): def __init__( self, model: Optional[str] = No...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/embedder/google.py
embedchain/embedchain/config/embedder/google.py
from typing import Optional from embedchain.config.embedder.base import BaseEmbedderConfig from embedchain.helpers.json_serializable import register_deserializable @register_deserializable class GoogleAIEmbedderConfig(BaseEmbedderConfig): def __init__( self, model: Optional[str] = None, d...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/config/embedder/__init__.py
embedchain/embedchain/config/embedder/__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/config/embedder/base.py
embedchain/embedchain/config/embedder/base.py
from typing import Any, Dict, Optional, Union import httpx from embedchain.helpers.json_serializable import register_deserializable @register_deserializable class BaseEmbedderConfig: def __init__( self, model: Optional[str] = None, deployment_name: Optional[str] = None, vector_di...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/deployment/gradio.app/app.py
embedchain/embedchain/deployment/gradio.app/app.py
import os import gradio as gr from embedchain import App os.environ["OPENAI_API_KEY"] = "sk-xxx" app = App() def query(message, history): return app.chat(message) demo = gr.ChatInterface(query) demo.launch()
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/deployment/modal.com/app.py
embedchain/embedchain/deployment/modal.com/app.py
from dotenv import load_dotenv from fastapi import Body, FastAPI, responses from modal import Image, Secret, Stub, asgi_app from embedchain import App load_dotenv(".env") image = Image.debian_slim().pip_install( "embedchain", "lanchain_community==0.2.6", "youtube-transcript-api==0.6.1", "pytube==15.0...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/deployment/streamlit.io/app.py
embedchain/embedchain/deployment/streamlit.io/app.py
import streamlit as st from embedchain import App @st.cache_resource def embedchain_bot(): return App() st.title("💬 Chatbot") st.caption("🚀 An Embedchain app powered by OpenAI!") if "messages" not in st.session_state: st.session_state.messages = [ { "role": "assistant", "c...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/deployment/render.com/app.py
embedchain/embedchain/deployment/render.com/app.py
from fastapi import FastAPI, responses from pydantic import BaseModel from embedchain import App app = FastAPI(title="Embedchain FastAPI App") embedchain_app = App() class SourceModel(BaseModel): source: str class QuestionModel(BaseModel): question: str @app.post("/add") async def add_source(source_mode...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/deployment/fly.io/app.py
embedchain/embedchain/deployment/fly.io/app.py
from dotenv import load_dotenv from fastapi import FastAPI, responses from pydantic import BaseModel from embedchain import App load_dotenv(".env") app = FastAPI(title="Embedchain FastAPI App") embedchain_app = App() class SourceModel(BaseModel): source: str class QuestionModel(BaseModel): question: str ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/evaluation/__init__.py
embedchain/embedchain/evaluation/__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/evaluation/base.py
embedchain/embedchain/evaluation/base.py
from abc import ABC, abstractmethod from embedchain.utils.evaluation import EvalData class BaseMetric(ABC): """Base class for a metric. This class provides a common interface for all metrics. """ def __init__(self, name: str = "base_metric"): """ Initialize the BaseMetric. "...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/evaluation/metrics/answer_relevancy.py
embedchain/embedchain/evaluation/metrics/answer_relevancy.py
import concurrent.futures import logging import os from string import Template from typing import Optional import numpy as np from openai import OpenAI from tqdm import tqdm from embedchain.config.evaluation.base import AnswerRelevanceConfig from embedchain.evaluation.base import BaseMetric from embedchain.utils.eval...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/evaluation/metrics/groundedness.py
embedchain/embedchain/evaluation/metrics/groundedness.py
import concurrent.futures import logging import os from string import Template from typing import Optional import numpy as np from openai import OpenAI from tqdm import tqdm from embedchain.config.evaluation.base import GroundednessConfig from embedchain.evaluation.base import BaseMetric from embedchain.utils.evaluat...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/evaluation/metrics/__init__.py
embedchain/embedchain/evaluation/metrics/__init__.py
from .answer_relevancy import AnswerRelevance # noqa: F401 from .context_relevancy import ContextRelevance # noqa: F401 from .groundedness import Groundedness # noqa: F401
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/evaluation/metrics/context_relevancy.py
embedchain/embedchain/evaluation/metrics/context_relevancy.py
import concurrent.futures import os from string import Template from typing import Optional import numpy as np import pysbd from openai import OpenAI from tqdm import tqdm from embedchain.config.evaluation.base import ContextRelevanceConfig from embedchain.evaluation.base import BaseMetric from embedchain.utils.evalu...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/embedder/clarifai.py
embedchain/embedchain/embedder/clarifai.py
import os from typing import Optional, Union from chromadb import EmbeddingFunction, Embeddings from embedchain.config import BaseEmbedderConfig from embedchain.embedder.base import BaseEmbedder class ClarifaiEmbeddingFunction(EmbeddingFunction): def __init__(self, config: BaseEmbedderConfig) -> None: s...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/embedder/nvidia.py
embedchain/embedchain/embedder/nvidia.py
import logging import os from typing import Optional from langchain_nvidia_ai_endpoints import NVIDIAEmbeddings from embedchain.config import BaseEmbedderConfig from embedchain.embedder.base import BaseEmbedder from embedchain.models import VectorDimensions logger = logging.getLogger(__name__) class NvidiaEmbedder...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/embedder/ollama.py
embedchain/embedchain/embedder/ollama.py
import logging from typing import Optional try: from ollama import Client except ImportError: raise ImportError("Ollama Embedder requires extra dependencies. Install with `pip install ollama`") from None from langchain_community.embeddings import OllamaEmbeddings from embedchain.config import OllamaEmbedderC...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/embedder/aws_bedrock.py
embedchain/embedchain/embedder/aws_bedrock.py
from typing import Optional try: from langchain_aws import BedrockEmbeddings except ModuleNotFoundError: raise ModuleNotFoundError( "The required dependencies for AWSBedrock are not installed." "Please install with `pip install langchain_aws`" ) from None from embedchain.config.embedder.aws_bedroc...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/embedder/google.py
embedchain/embedchain/embedder/google.py
from typing import Optional, Union import google.generativeai as genai from chromadb import EmbeddingFunction, Embeddings from embedchain.config.embedder.google import GoogleAIEmbedderConfig from embedchain.embedder.base import BaseEmbedder from embedchain.models import VectorDimensions class GoogleAIEmbeddingFunct...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/embedder/gpt4all.py
embedchain/embedchain/embedder/gpt4all.py
from typing import Optional from embedchain.config import BaseEmbedderConfig from embedchain.embedder.base import BaseEmbedder from embedchain.models import VectorDimensions class GPT4AllEmbedder(BaseEmbedder): def __init__(self, config: Optional[BaseEmbedderConfig] = None): super().__init__(config=confi...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/embedder/huggingface.py
embedchain/embedchain/embedder/huggingface.py
import os from typing import Optional from langchain_community.embeddings import HuggingFaceEmbeddings try: from langchain_huggingface import HuggingFaceEndpointEmbeddings except ModuleNotFoundError: raise ModuleNotFoundError( "The required dependencies for HuggingFaceHub are not installed." "...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/embedder/cohere.py
embedchain/embedchain/embedder/cohere.py
from typing import Optional from langchain_cohere.embeddings import CohereEmbeddings from embedchain.config import BaseEmbedderConfig from embedchain.embedder.base import BaseEmbedder from embedchain.models import VectorDimensions class CohereEmbedder(BaseEmbedder): def __init__(self, config: Optional[BaseEmbed...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/embedder/__init__.py
embedchain/embedchain/embedder/__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/embedder/vertexai.py
embedchain/embedchain/embedder/vertexai.py
from typing import Optional from langchain_google_vertexai import VertexAIEmbeddings from embedchain.config import BaseEmbedderConfig from embedchain.embedder.base import BaseEmbedder from embedchain.models import VectorDimensions class VertexAIEmbedder(BaseEmbedder): def __init__(self, config: Optional[BaseEmb...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/embedder/azure_openai.py
embedchain/embedchain/embedder/azure_openai.py
from typing import Optional from langchain_openai import AzureOpenAIEmbeddings from embedchain.config import BaseEmbedderConfig from embedchain.embedder.base import BaseEmbedder from embedchain.models import VectorDimensions class AzureOpenAIEmbedder(BaseEmbedder): def __init__(self, config: Optional[BaseEmbedd...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/embedder/base.py
embedchain/embedchain/embedder/base.py
from collections.abc import Callable from typing import Any, Optional from embedchain.config.embedder.base import BaseEmbedderConfig try: from chromadb.api.types import Embeddable, EmbeddingFunction, Embeddings except RuntimeError: from embedchain.utils.misc import use_pysqlite3 use_pysqlite3() from ...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/embedder/mistralai.py
embedchain/embedchain/embedder/mistralai.py
import os from typing import Optional, Union from chromadb import EmbeddingFunction, Embeddings from embedchain.config import BaseEmbedderConfig from embedchain.embedder.base import BaseEmbedder from embedchain.models import VectorDimensions class MistralAIEmbeddingFunction(EmbeddingFunction): def __init__(self...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false
mem0ai/mem0
https://github.com/mem0ai/mem0/blob/69a552d8a85637452ea20382a6ac3991fd6d60b3/embedchain/embedchain/embedder/openai.py
embedchain/embedchain/embedder/openai.py
import os import warnings from typing import Optional from chromadb.utils.embedding_functions import OpenAIEmbeddingFunction from embedchain.config import BaseEmbedderConfig from embedchain.embedder.base import BaseEmbedder from embedchain.models import VectorDimensions class OpenAIEmbedder(BaseEmbedder): def _...
python
Apache-2.0
69a552d8a85637452ea20382a6ac3991fd6d60b3
2026-01-04T14:39:42.142319Z
false