mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-14 15:25:17 +02:00
tuning example and config
This commit is contained in:
parent
f93ccaf0d1
commit
9f653ea60b
6 changed files with 14 additions and 16 deletions
BIN
examples/example.faiss
Normal file
BIN
examples/example.faiss
Normal file
Binary file not shown.
10
examples/example.json
Normal file
10
examples/example.json
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[
|
||||
{
|
||||
"source": "Which facial cleanser is good for oily skin?",
|
||||
"output": "ABC cleanser is preferred by many with oily skin."
|
||||
},
|
||||
{
|
||||
"source": "Is L'Oreal good to use?",
|
||||
"output": "L'Oreal is a popular brand with many positive reviews."
|
||||
}
|
||||
]
|
||||
BIN
examples/example.pkl
Normal file
BIN
examples/example.pkl
Normal file
Binary file not shown.
|
|
@ -9,28 +9,15 @@ import asyncio
|
|||
from langchain.embeddings import OpenAIEmbeddings
|
||||
|
||||
from metagpt.config import CONFIG
|
||||
from metagpt.const import DATA_PATH
|
||||
from metagpt.const import EXAMPLE_PATH
|
||||
from metagpt.document_store import FaissStore
|
||||
from metagpt.logs import logger
|
||||
from metagpt.roles import Sales
|
||||
|
||||
""" example.json, e.g.
|
||||
[
|
||||
{
|
||||
"source": "Which facial cleanser is good for oily skin?",
|
||||
"output": "ABC cleanser is preferred by many with oily skin."
|
||||
},
|
||||
{
|
||||
"source": "Is L'Oreal good to use?",
|
||||
"output": "L'Oreal is a popular brand with many positive reviews."
|
||||
}
|
||||
]
|
||||
"""
|
||||
|
||||
|
||||
def get_store():
|
||||
embedding = OpenAIEmbeddings(openai_api_key=CONFIG.openai_api_key, openai_api_base=CONFIG.openai_base_url)
|
||||
return FaissStore(DATA_PATH / "example.json", embedding=embedding)
|
||||
return FaissStore(EXAMPLE_PATH / "example.json", embedding=embedding)
|
||||
|
||||
|
||||
async def search():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue