Skip to content

Commit

Permalink
Add internet search
Browse files Browse the repository at this point in the history
  • Loading branch information
YoanSallami committed Oct 9, 2023
1 parent 68e0e69 commit 13629c2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ The AI system can interact with its long-term memory using the following tools:
- `ReadFile`: Read data chunk by chunk (use multiple times to scroll)
- `Shell`: Enable basic unix commands: [`cd`, `ls`, `mkdir`, `mv`, `pwd`, `rm`]
- `Upload`: Archive and upload the target folder or file to the User
- `ContentSearch`: Perform a similarity based search
- `ContentSearch`: Perform a similarity based search on the filesystem

It can also perform several operations on its program memory:

- `ListPrograms`: List the programs based on similarity search
- `ProgramSearch`: Perform a similarity based search
- `ProgramSearch`: Perform a similarity based search on the program memory
- `LoadPrograms`: Load programs, override if existing
- `CallProgram`: Call a program based on its name

Expand All @@ -58,6 +58,10 @@ The system can interact with the User using the following tools:
- `AskUser`: Ask a question to the User
- `Speak`: Tell something to the User

And fetch external data using:

- `InternetSearch`: Perform a DuckDuckGo search

## Credits

HybridAGI is made possible by the following open-source tools:
Expand Down
15 changes: 13 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
WriteFilesTool,
AppendFilesTool,
ReadFileTool,
UploadTool)
UploadTool,
ContentSearchTool)

from hybridagi import ProgramMemory

Expand Down Expand Up @@ -94,6 +95,8 @@
upload = UploadTool(
filesystem = filesystem,
downloads_directory = cfg.downloads_directory)
content_search = ContentSearchTool(filesystem=filesystem)
internet_search = DuckDuckGoSearchResults()

tools = [
Tool(
Expand Down Expand Up @@ -124,6 +127,10 @@
name=shell_tool.name,
func=shell_tool.run,
description=shell_tool.description),
Tool(
name=content_search.name,
func=content_search.run,
description=content_search.description),
Tool(
name=list_programs.name,
func=list_programs.run,
Expand All @@ -135,7 +142,11 @@
Tool(
name=program_search.name,
func=program_search.run,
description=program_search.description)
description=program_search.description),
Tool(
name="InternetSearch",
func=internet_search.run,
description=internet_search.description)
]

interpreter = GraphProgramInterpreter(
Expand Down

0 comments on commit 13629c2

Please sign in to comment.