Skip to content

Commit

Permalink
fix tool import links (#6892)
Browse files Browse the repository at this point in the history
* fix import links

* update load and search tool import
  • Loading branch information
logan-markewich committed Jul 13, 2023
1 parent fc3eed1 commit 54ff240
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docs/core_modules/agent_modules/tools/llamahub_tools_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ A usage example is given below:

```python
from llama_hub.wikipedia.base import WikipediaReader
from llama_hub.tools.on_demand_loader_tool import OnDemandLoaderTool
from llama_index.tools.on_demand_loader_tool import OnDemandLoaderTool

tool = OnDemandLoaderTool.from_defaults(
reader,
Expand All @@ -49,8 +49,8 @@ This is helpful for any API endpoint that will by default return large volumes o
Example usage is shown below:

```python
from llama_hub.tools.tool_spec.wikipedia.base import WikipediaToolSpec
from llama_hub.tools.tool_spec.load_and_search.base import LoadAndSearchToolSpec
from llama_hub.tools.wikipedia.base import WikipediaToolSpec
from llama_index.tools.tool_spec.load_and_search import LoadAndSearchToolSpec

wiki_spec = WikipediaToolSpec()
# Get the search wikipedia tool
Expand Down
2 changes: 1 addition & 1 deletion docs/core_modules/agent_modules/tools/root.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Our Tool Specs and Tools can be imported from the `llama-hub` package.
To use with our agent,
```python
from llama_index.agent import OpenAIAgent
from llama_hub.tools.tool_spec.gmail.base import GmailToolSpec
from llama_hub.tools.gmail.base import GmailToolSpec

tool_spec = GmailToolSpec()
agent = OpenAIAgent.from_tools(tool_spec.to_tool_list(), verbose=True)
Expand Down
2 changes: 1 addition & 1 deletion docs/core_modules/agent_modules/tools/usage_pattern.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LlamaHub Tool Specs and Tools can be imported from the `llama-hub` package. They
To use with our OpenAIAgent,
```python
from llama_index.agent import OpenAIAgent
from llama_hub.tools.tool_spec.gmail.base import GmailToolSpec
from llama_hub.tools.gmail.base import GmailToolSpec

tool_spec = GmailToolSpec()
agent = OpenAIAgent.from_tools(tool_spec.to_tool_list(), verbose=True)
Expand Down
4 changes: 2 additions & 2 deletions llama_index/tools/tool_spec/load_and_search/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ This Tool Spec is intended to wrap other tools, allowing the Agent to perform se
Here's an example usage of the LoadAndSearchToolSpec.

```python
from llama_hub.tools.tool_spec.load_and_search.base import LoadAndSearchToolSpec
from llama_index.tools.tool_spec.load_and_search import LoadAndSearchToolSpec
from llama_index.agent import OpenAIAgent
from llama_hub.tools.tool_spec.wikipedia.base import WikipediaToolSpec
from llama_hub.tools.wikipedia.base import WikipediaToolSpec

wiki_spec = WikipediaToolSpec()

Expand Down
4 changes: 3 additions & 1 deletion llama_index/tools/tool_spec/load_and_search/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# init
from llama_index.tools.tool_spec.load_and_search.base import LoadAndSearchToolSpec

__all__ = ["LoadAndSearchToolSpec"]

0 comments on commit 54ff240

Please sign in to comment.