Martin Bär
commited on
Commit
·
91e3a88
1
Parent(s):
c97999e
Fix import
Browse files- app.py +0 -1
- basic_agent.py +3 -2
app.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import os
|
2 |
import gradio as gr
|
3 |
import requests
|
4 |
-
import inspect
|
5 |
import pandas as pd
|
6 |
|
7 |
from llama_index.embeddings.huggingface import HuggingFaceEmbedding
|
|
|
1 |
import os
|
2 |
import gradio as gr
|
3 |
import requests
|
|
|
4 |
import pandas as pd
|
5 |
|
6 |
from llama_index.embeddings.huggingface import HuggingFaceEmbedding
|
basic_agent.py
CHANGED
@@ -4,7 +4,7 @@ from llama_index.core.tools import FunctionTool
|
|
4 |
from llama_index.llms.huggingface_api import HuggingFaceInferenceAPI
|
5 |
from llama_index.tools.duckduckgo import DuckDuckGoSearchToolSpec
|
6 |
from llama_index.tools.wikipedia import WikipediaToolSpec
|
7 |
-
from llama_index.tools.tool_spec.load_and_search
|
8 |
from llama_index.readers.web import SimpleWebPageReader
|
9 |
from llama_index.core.tools.ondemand_loader_tool import OnDemandLoaderTool
|
10 |
|
@@ -37,7 +37,8 @@ class BasicAgent:
|
|
37 |
# Create Alfred with all the tools
|
38 |
self.agent = AgentWorkflow.from_tools_or_functions(
|
39 |
[search_tool, wiki_search_tool_las, webpage_tool],
|
40 |
-
llm=llm
|
|
|
41 |
)
|
42 |
|
43 |
# self.ctx = Context(self.agent)
|
|
|
4 |
from llama_index.llms.huggingface_api import HuggingFaceInferenceAPI
|
5 |
from llama_index.tools.duckduckgo import DuckDuckGoSearchToolSpec
|
6 |
from llama_index.tools.wikipedia import WikipediaToolSpec
|
7 |
+
from llama_index.core.tools.tool_spec.load_and_search import LoadAndSearchToolSpec
|
8 |
from llama_index.readers.web import SimpleWebPageReader
|
9 |
from llama_index.core.tools.ondemand_loader_tool import OnDemandLoaderTool
|
10 |
|
|
|
37 |
# Create Alfred with all the tools
|
38 |
self.agent = AgentWorkflow.from_tools_or_functions(
|
39 |
[search_tool, wiki_search_tool_las, webpage_tool],
|
40 |
+
llm=llm,
|
41 |
+
verbose=True
|
42 |
)
|
43 |
|
44 |
# self.ctx = Context(self.agent)
|