OuroborosM commited on
Commit
5460a4a
·
1 Parent(s): fbb9428

test tools

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -19,10 +19,11 @@ import gradio as gr
19
  import time
20
 
21
  class DB_Search(BaseTool):
22
- name = "Vector Databse Search"
23
  description = "This is the vector database to search local information"
24
- def _run(self, message: str) -> Any:
25
- response, source = QAQuery_p(message)
 
26
  return response
27
 
28
  def _arun(self, query: str):
@@ -57,9 +58,10 @@ index = pinecone.Index(index_name)
57
  # print(pinecone.whoami())
58
  # print(index.describe_index_stats())
59
 
60
- agent = initialize_agent(tools, chat,
61
- agent="zero-shot-react-description",
62
- verbose = True)
 
63
 
64
  global vectordb
65
  vectordb = Chroma(persist_directory='db', embedding_function=embeddings)
 
19
  import time
20
 
21
  class DB_Search(BaseTool):
22
+ name = "Vector Database Search"
23
  description = "This is the vector database to search local information"
24
+ def _run(self, query: str) -> str:
25
+ # response, source = QAQuery_p(query)
26
+ response = "test db_search feedback"
27
  return response
28
 
29
  def _arun(self, query: str):
 
58
  # print(pinecone.whoami())
59
  # print(index.describe_index_stats())
60
 
61
+ llm = chat
62
+ agent = initialize_agent(tools, llm,
63
+ agent=AgentType.CHAT_ZERO_SHOT_REACT_DESCRIPTION,
64
+ verbose = True,)
65
 
66
  global vectordb
67
  vectordb = Chroma(persist_directory='db', embedding_function=embeddings)