Spaces:
Running
Running
Niki Zhang
commited on
Update chatbox.py
Browse files- chatbox.py +6 -6
chatbox.py
CHANGED
@@ -11,7 +11,7 @@ import argparse
|
|
11 |
import inspect
|
12 |
|
13 |
from langchain.agents.initialize import initialize_agent
|
14 |
-
from langchain.agents.tools import Tool
|
15 |
from langchain.chains.conversation.memory import ConversationBufferMemory
|
16 |
from langchain_community.chat_models import ChatOpenAI
|
17 |
import torch
|
@@ -130,11 +130,11 @@ def build_chatbot_tools(load_dict):
|
|
130 |
**{name: models[name] for name in template_required_names})
|
131 |
|
132 |
tools = []
|
133 |
-
for instance in models.values():
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
return tools
|
139 |
|
140 |
class ConversationBot:
|
|
|
11 |
import inspect
|
12 |
|
13 |
from langchain.agents.initialize import initialize_agent
|
14 |
+
# from langchain.agents.tools import Tool
|
15 |
from langchain.chains.conversation.memory import ConversationBufferMemory
|
16 |
from langchain_community.chat_models import ChatOpenAI
|
17 |
import torch
|
|
|
130 |
**{name: models[name] for name in template_required_names})
|
131 |
|
132 |
tools = []
|
133 |
+
# for instance in models.values():
|
134 |
+
# for e in dir(instance):
|
135 |
+
# if e.startswith('inference'):
|
136 |
+
# func = getattr(instance, e)
|
137 |
+
# tools.append(Tool(name=func.name, description=func.description, func=func))
|
138 |
return tools
|
139 |
|
140 |
class ConversationBot:
|