Skip to content

Commit

Permalink
Final fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
YoanSallami committed Sep 19, 2023
1 parent db9324a commit 4ba4f25
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To start just use the following commands:
```
git clone https://github.com/SynaLinks/HybridAGI
cd HybridAGI
docker-compose run --rm hybrid-agi
docker-compose run --rm hybrid-agi-cli
```

To inspect the hybridstore, open your browser to [localhost:8001](https://localhost:8001) and connect to your database using `redis` hostname and port `6379`.
Expand Down
2 changes: 1 addition & 1 deletion hybrid_agi/tools/ask_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def _run(
) -> str:
"""Use the tool."""
print(f"{Fore.YELLOW}[*] "+query+f"{Style.RESET_ALL}")
response = input(f"> ")
response = input("> ")
if response:
return "The User responded with: "+response
else:
Expand Down
17 changes: 12 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from hybrid_agi.tools.ask_user import AskUserTool
from hybrid_agi.tools.speak import SpeakTool

from hybrid_agi.interpreter.graph_program_interpreter import GraphProgramInterpreter
from hybrid_agi import GraphProgramInterpreter

cfg = Config()

Expand Down Expand Up @@ -227,7 +227,10 @@ def load_folder():
print(f"{Fore.GREEN}[*] Which folder do you want to load?{Style.RESET_ALL}")
folder_path = input("> ")
folder_name = os.path.basename(os.path.abspath(folder_path))
print(f"{Fore.GREEN}[*] Are you sure about loading the folder named '{folder_name}'? [y/N]{Style.RESET_ALL}")
print(
f"{Fore.GREEN}[*] Are you sure about loading the folder named " \
+ "'{folder_name}'? [y/N]{Style.RESET_ALL}"
)
while True:
decision = input("> ").upper().strip()
if decision == "Y" or decision == "YES":
Expand Down Expand Up @@ -260,10 +263,14 @@ def load_programs():
program_index = f"{hybridstore.program_key}:{program_name}"
try:
print(
f"{Fore.GREEN}[*] Adding program '{Fore.YELLOW}{program_name}"+
f"{Fore.GREEN}'...{Style.RESET_ALL}"
f"{Fore.GREEN}[*] Adding program '{Fore.YELLOW}" \
+ f"{program_name}{Fore.GREEN}'...{Style.RESET_ALL}"
)
graph_loader.load(
os.path.join(dirpath, filename),
program_index,
clear=True
)
graph_loader.load(os.path.join(dirpath, filename), program_index, clear=True)
except Exception as err:
print(f"{Fore.RED}[!] Error occured with '{Fore.YELLOW}{filename}"+
f"{Fore.RED}': {str(err)}{Style.RESET_ALL}"
Expand Down

0 comments on commit 4ba4f25

Please sign in to comment.