mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-15 11:02:36 +02:00
upgrade llama-index to v0.10
This commit is contained in:
parent
04527cf0eb
commit
e14aedcea7
29 changed files with 725 additions and 370 deletions
|
|
@ -16,6 +16,8 @@ QUESTION = "What are key qualities to be a good writer?"
|
|||
|
||||
|
||||
class RAGExample:
|
||||
"""Show how to use RAG."""
|
||||
|
||||
def __init__(self):
|
||||
self.engine = SimpleEngine.from_docs(
|
||||
input_files=[DOC_PATH],
|
||||
|
|
@ -84,14 +86,17 @@ class RAGExample:
|
|||
{'name': 'foo', 'goal': 'Win The Game', 'tool': 'Red Bull Energy Drink'}
|
||||
"""
|
||||
|
||||
self._print_title("RAG Add Docs")
|
||||
self._print_title("RAG Add Objs")
|
||||
|
||||
class Player(BaseModel):
|
||||
"""Player"""
|
||||
|
||||
name: str = ""
|
||||
goal: str = "Win The Game"
|
||||
tool: str = "Red Bull Energy Drink"
|
||||
|
||||
def rag_key(self) -> str:
|
||||
"""For search"""
|
||||
return self.goal
|
||||
|
||||
foo = Player(name="foo")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue