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
[Bugfix] fix sadhguru example sources return logic (#1123)
Deven Patelf58bbeffcee3
diff --git a/embedchain/embedchain.py b/embedchain/embedchain.pyindex 190d2f555..4be92b3b4 100644--- a/embedchain/embedchain.py+++ b/embedchain/embedchain.py@@ -7,7 +7,9 @@ from typing import Any, Dict, List, Optional, Tuple, Unionfrom dotenv import load_dotenvfrom langchain.docstore.document import Document-from embedchain.cache import adapt, get_gptcache_session, gptcache_data_convert, gptcache_update_cache_callback+from embedchain.cache import (adapt, get_gptcache_session,+ gptcache_data_convert,+ gptcache_update_cache_callback)from embedchain.chunkers.base_chunker import BaseChunkerfrom embedchain.config import AddConfig, BaseLlmConfig, ChunkerConfigfrom embedchain.config.base_app_config import BaseAppConfig@@ -17,7 +19,8 @@ from embedchain.embedder.base import BaseEmbedderfrom embedchain.helpers.json_serializable import JSONSerializablefrom embedchain.llm.base import BaseLlmfrom embedchain.loaders.base_loader import BaseLoader-from embedchain.models.data_type import DataType, DirectDataType, IndirectDataType, SpecialDataType+from embedchain.models.data_type import (DataType, DirectDataType,+ IndirectDataType, SpecialDataType)from embedchain.telemetry.posthog import AnonymousTelemetryfrom embedchain.utils.misc import detect_datatype, is_valid_json_stringfrom embedchain.vectordb.base import BaseVectorDBdiff --git a/examples/sadhguru-ai/app.py b/examples/sadhguru-ai/app.pyindex 055f68bc8..67d4c62de 100644--- a/examples/sadhguru-ai/app.py+++ b/examples/sadhguru-ai/app.py@@ -93,8 +93,9 @@ if prompt := st.chat_input("Ask me anything!"):answer, citations = results["answer"], results["citations"]if citations:full_response += "\n\n**Sources**:\n"- for i, citations in enumerate(citations):- full_response += f"{i+1}. {citations[1]}\n"+ sources = list(set(map(lambda x: x[1]["url"], citations)))+ for i, source in enumerate(sources):+ full_response += f"{i+1}. {source}\n"msg_placeholder.markdown(full_response)st.session_state.messages.append({"role": "assistant", "content": full_response})