Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to run on local machine I think I have it running, but localhost:5001 not working #12

Open
sprinteroz opened this issue Jul 22, 2023 · 2 comments

Comments

@sprinteroz
Copy link

sprinteroz commented Jul 22, 2023

Hi everyone also @Doriandarko
I'm Trying to run on local machine, I think I have it running but localhost:5001 not working.
Am I missing something?
I believe this code below is meant to be in python, or do I have to save it as a python .py file... If so what do I name it?
I have tried this with python 3.10 Microsoft version and 3.11 global both within VS code

I would be grateful for any help, thanks

PS D:\BabyAGI\BabyAGIChatGPT-main plugin with search\BabyAGIChatGPT-main> h search\BabyAGIChatGPT-main'; & 'C:\Users\Darryl\AppData\Local\Microsoft\WindowsApps\python3.10.exe' 'c:\Users\Darryl.vscode\extensions\ms-python.python-2023.12.0\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher' '61609' '--' '-m' 'uvicorn' 'main:app' '--reload'

help
import requests

base_url = "http://localhost:5001" # Replace with the Repl URL if running on Replit

Set the objective

objective = "Solve world hunger."
response = requests.post(f"{base_url}/set_objective", json={"objective": objective})
print(response.json())

Add a task

task_name = "Develop a task list."
response = requests.post(f"{base_url}/add_task", json={"task_name": task_name})
print(response.json())

Execute the next task

response = requests.post(f"{base_url}/execute_next_task")
print(response.json())

@sprinteroz sprinteroz changed the title Trying to run on local machine I have it running but localhost:5001 not working Trying to run on local machine I think I have it running, but localhost:5001 not working Jul 22, 2023
@sprinteroz
Copy link
Author

sprinteroz commented Jul 22, 2023

Ok I think I have worked out how to run the code, I think its D:\BabyAGI\BabyAGIChatGPT-main plugin with search\BabyAGIChatGPT-main>python main.py to run the file. Edit: (Windows Powershell) might be the best for this.
I will try it when I have time later today then I just have to see where the other code goes now.

Any ideas would be great thanks.

@sprinteroz
Copy link
Author

ok that worked now to test it out.

PS D:\BabyAGI\BabyAGIChatGPT-main plugin with search\BabyAGIChatGPT-main> python main.py

  • Serving Quart app 'main'
  • Environment: production
  • Please use an ASGI server (e.g. Hypercorn) directly in production
  • Debug mode: True
  • Running on http://0.0.0.0:5001 (CTRL + C to quit)
    [2023-07-23 16:55:29 +1000] [290452] [INFO] Running on http://0.0.0.0:5001 (CTRL + C to quit)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant