Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -211,6 +211,10 @@ retriever = WikipediaRetriever(lang="ko")
|
|
| 211 |
tools.append(Tool(name="wiki", func=retriever.get_relevant_documents, description="위키백과 검색"))
|
| 212 |
tools.append(Tool(name="time_now", func=lambda _: f"현재 시각: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')} (Asia/Seoul)", description="현재 시간을 반환합니다."))
|
| 213 |
# ✅ 대화 기억 메모리
|
|
|
|
|
|
|
|
|
|
|
|
|
| 214 |
memory = ConversationBufferMemory(return_messages=True)
|
| 215 |
|
| 216 |
# ✅ Agent (Memory 연동)
|
|
|
|
| 211 |
tools.append(Tool(name="wiki", func=retriever.get_relevant_documents, description="위키백과 검색"))
|
| 212 |
tools.append(Tool(name="time_now", func=lambda _: f"현재 시각: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')} (Asia/Seoul)", description="현재 시간을 반환합니다."))
|
| 213 |
# ✅ 대화 기억 메모리
|
| 214 |
+
from langchain_community.tools import ShellTool
|
| 215 |
+
|
| 216 |
+
shell_tool = ShellTool()
|
| 217 |
+
tools.append(shell_tool)
|
| 218 |
memory = ConversationBufferMemory(return_messages=True)
|
| 219 |
|
| 220 |
# ✅ Agent (Memory 연동)
|