mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-02 04:12:45 +02:00
exp pool support bm25
This commit is contained in:
parent
aa8e2fa8c3
commit
a6af03efb8
10 changed files with 231 additions and 50 deletions
|
|
@ -1,8 +1,15 @@
|
|||
from enum import Enum
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
from metagpt.utils.yaml_model import YamlModel
|
||||
|
||||
|
||||
class ExperiencePoolStorageType(Enum):
|
||||
BM25 = "bm25"
|
||||
CHROMA = "chroma"
|
||||
|
||||
|
||||
class ExperiencePoolConfig(YamlModel):
|
||||
enabled: bool = Field(
|
||||
default=False,
|
||||
|
|
@ -11,3 +18,6 @@ class ExperiencePoolConfig(YamlModel):
|
|||
enable_read: bool = Field(default=False, description="Enable to read from experience pool.")
|
||||
enable_write: bool = Field(default=False, description="Enable to write to experience pool.")
|
||||
persist_path: str = Field(default=".chroma_exp_data", description="The persist path for experience pool.")
|
||||
storage_type: ExperiencePoolStorageType = Field(
|
||||
default=ExperiencePoolStorageType.BM25, description="The storage type for experience pool."
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue