The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.
Python agentic-memoryagentic-memory-systemagentsaiai-agentschatgptgenaillmlong-term-memorymemorymemory-managementpythonragstate-management
[Improvements] improve package ux (#950)
Deven Patel82fd595306e3
diff --git a/configs/gpt4.yaml b/configs/gpt4.yamlnew file mode 100644index 000000000..e06c60de6--- /dev/null+++ b/configs/gpt4.yaml@@ -0,0 +1,8 @@+llm:+ provider: openai+ config:+ model: 'gpt-4'+ temperature: 0.5+ max_tokens: 1000+ top_p: 1+ stream: false\ No newline at end of filediff --git a/docs/get-started/quickstart.mdx b/docs/get-started/quickstart.mdxindex 70491b6d5..2179e0b24 100644--- a/docs/get-started/quickstart.mdx+++ b/docs/get-started/quickstart.mdx@@ -83,3 +83,9 @@ app.deploy()# 🛠️ Adding data to your pipeline...# ✅ Data of type: web_page, value: https://www.forbes.com/profile/elon-musk added successfully.```++You can try it out yourself using the following Google Colab notebook:++<a href="https://colab.research.google.com/drive/17ON1LPonnXAtLaZEebnOktstB_1cJJmh?usp=sharing">+ <img src="https://camo.githubusercontent.com/84f0493939e0c4de4e6dbe113251b4bfb5353e57134ffd9fcab6b8714514d4d1/68747470733a2f2f636f6c61622e72657365617263682e676f6f676c652e636f6d2f6173736574732f636f6c61622d62616467652e737667" alt="Open in Colab" />+</a>diff --git a/embedchain/loaders/discourse.py b/embedchain/loaders/discourse.pyindex 4111b8479..d26d1b5e4 100644--- a/embedchain/loaders/discourse.py+++ b/embedchain/loaders/discourse.py@@ -30,7 +30,7 @@ class DiscourseLoader(BaseLoader):)def _load_post(self, post_id):- post_url = f"{self.domain}/posts/{post_id}.json"+ post_url = f"{self.domain}posts/{post_id}.json"response = requests.get(post_url)response.raise_for_status()response_data = response.json()@@ -53,7 +53,7 @@ class DiscourseLoader(BaseLoader):data = []data_contents = []logging.info(f"Searching data on discourse url: {self.domain}, for query: {query}")- search_url = f"{self.domain}/search.json?q={query}"+ search_url = f"{self.domain}search.json?q={query}"response = requests.get(search_url)response.raise_for_status()response_data = response.json()diff --git a/embedchain/loaders/unstructured_file.py b/embedchain/loaders/unstructured_file.pyindex 1343a72d4..9b491c4a6 100644--- a/embedchain/loaders/unstructured_file.py+++ b/embedchain/loaders/unstructured_file.py@@ -4,7 +4,7 @@ try:from langchain.document_loaders import UnstructuredFileLoaderexcept ImportError:raise ImportError(- 'PDF File requires extra dependencies. Install with `pip install --upgrade "embedchain[dataloaders]"`'+ 'Unstructured file requires extra dependencies. Install with `pip install --upgrade "embedchain[dataloaders]"`') from Nonefrom embedchain.helper.json_serializable import register_deserializablefrom embedchain.loaders.base_loader import BaseLoaderdiff --git a/pyproject.toml b/pyproject.tomlindex d35b1cc78..30e49c1a1 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -1,6 +1,6 @@[tool.poetry]name = "embedchain"-version = "0.1.10"+version = "0.1.11"description = "Data platform for LLMs - Load, index, retrieve and sync any unstructured data"authors = ["Taranjeet Singh <[email protected]>",diff --git a/tests/loaders/test_discourse.py b/tests/loaders/test_discourse.pyindex 2949f0c9f..8033450a8 100644--- a/tests/loaders/test_discourse.py+++ b/tests/loaders/test_discourse.py@@ -7,7 +7,7 @@ from embedchain.loaders.discourse import DiscourseLoader@pytest.fixturedef discourse_loader_config():return {- "domain": "https://example.com",+ "domain": "https://example.com/",}@@ -17,9 +17,9 @@ def discourse_loader(discourse_loader_config):def test_discourse_loader_init_with_valid_config():- config = {"domain": "https://example.com"}+ config = {"domain": "https://example.com/"}loader = DiscourseLoader(config=config)- assert loader.domain == "https://example.com"+ assert loader.domain == "https://example.com/"def test_discourse_loader_init_with_missing_config():diff --git a/tests/test_utils.py b/tests/test_utils.pyindex 722cda234..3ca055486 100644--- a/tests/test_utils.py+++ b/tests/test_utils.py@@ -9,6 +9,7 @@ CONFIG_YAMLS = ["configs/chunker.yaml","configs/cohere.yaml","configs/full-stack.yaml",+ "configs/gpt4.yaml","configs/gpt4all.yaml","configs/huggingface.yaml","configs/jina.yaml",@@ -21,16 +22,15 @@ CONFIG_YAMLS = []-class TestAllConfigYamls:- def test_all_config_yamls(self):- """Test that all config yamls are valid."""- for config_yaml in CONFIG_YAMLS:- with open(config_yaml, "r") as f:- config = yaml.safe_load(f)- assert config is not None+def test_all_config_yamls():+ """Test that all config yamls are valid."""+ for config_yaml in CONFIG_YAMLS:+ with open(config_yaml, "r") as f:+ config = yaml.safe_load(f)+ assert config is not None- try:- validate_yaml_config(config)- except Exception as e:- print(f"Error in {config_yaml}: {e}")- raise e+ try:+ validate_yaml_config(config)+ except Exception as e:+ print(f"Error in {config_yaml}: {e}")+ raise e