mikethor007 commited on
Commit
241184b
·
verified ·
1 Parent(s): 76098db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -28,8 +28,15 @@ HUGGINGFACEHUB_API_TOKEN = os.getenv("HUGGINGFACEHUB_API_TOKEN")
28
  class BasicAgent:
29
  def __init__(self):
30
  print("BasicAgent initialized.")
31
-
 
 
 
 
 
 
32
 
 
33
  # Generate the chat interface, including the tools
34
  print("Generate the chat interface, including the tools")
35
  llm = HuggingFaceEndpoint(
@@ -46,15 +53,7 @@ class BasicAgent:
46
  max_results=5,
47
  topic="general",
48
  )
49
-
50
- # print("create_react_agent")
51
- # agent = create_react_agent(llm, [tavily_search_tool])
52
-
53
- # chat = ChatHuggingFace(llm=llm, verbose=True)
54
- # tools = [search_web_tool]
55
- # chat_with_tools = chat.bind_tools(tools)
56
 
57
- def __call__(self, question: str) -> str:
58
  print(f"Agent received question (first 50 chars): {question[:50]}...")
59
 
60
  messages = [
 
28
  class BasicAgent:
29
  def __init__(self):
30
  print("BasicAgent initialized.")
31
+
32
+ # print("create_react_agent")
33
+ # agent = create_react_agent(llm, [tavily_search_tool])
34
+
35
+ # chat = ChatHuggingFace(llm=llm, verbose=True)
36
+ # tools = [search_web_tool]
37
+ # chat_with_tools = chat.bind_tools(tools)
38
 
39
+ def __call__(self, question: str) -> str:
40
  # Generate the chat interface, including the tools
41
  print("Generate the chat interface, including the tools")
42
  llm = HuggingFaceEndpoint(
 
53
  max_results=5,
54
  topic="general",
55
  )
 
 
 
 
 
 
 
56
 
 
57
  print(f"Agent received question (first 50 chars): {question[:50]}...")
58
 
59
  messages = [