mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-02 04:12:45 +02:00
Merge pull request #766 from iorisa/feature/agentstore/v0.6
feat: Integrating with the agent store
This commit is contained in:
commit
4e3e5f8811
5 changed files with 10 additions and 5 deletions
|
|
@ -40,7 +40,11 @@ class FaissStore(LocalStore):
|
|||
return FAISS.load_local(self.raw_data_path.parent, self.embedding, self.fname)
|
||||
|
||||
def _write(self, docs, metadatas):
|
||||
store = FAISS.from_texts(docs, self.embedding, metadatas=metadatas)
|
||||
try:
|
||||
store = FAISS.from_texts(docs, self.embedding, metadatas=metadatas)
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to write. error: {e}")
|
||||
raise e
|
||||
return store
|
||||
|
||||
def persist(self):
|
||||
|
|
|
|||
|
|
@ -494,6 +494,7 @@ class Role(SerializationMixin, is_polymorphic_base=True):
|
|||
|
||||
async def think(self) -> Action:
|
||||
"""The exported `think` function"""
|
||||
await self._observe()
|
||||
await self._think()
|
||||
return self.rc.todo
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ from metagpt.llm import LLM
|
|||
|
||||
|
||||
class Moderation:
|
||||
def __init__(self):
|
||||
self.llm = LLM()
|
||||
def __init__(self, llm=None):
|
||||
self.llm = llm or LLM()
|
||||
|
||||
def handle_moderation_results(self, results):
|
||||
resp = []
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ lancedb==0.4.0
|
|||
langchain==0.0.352
|
||||
loguru==0.6.0
|
||||
meilisearch==0.21.0
|
||||
numpy==1.24.3
|
||||
numpy>=1.24.3
|
||||
openai==1.6.0
|
||||
openpyxl
|
||||
beautifulsoup4==4.12.2
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -57,7 +57,7 @@ extras_require["dev"] = (["pylint~=3.0.3", "black~=23.3.0", "isort~=5.12.0", "pr
|
|||
|
||||
setup(
|
||||
name="metagpt",
|
||||
version="0.6.4",
|
||||
version="0.6.5",
|
||||
description="The Multi-Agent Framework",
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue