gpt4free icon indicating copy to clipboard operation
gpt4free copied to clipboard

Error to open gui

Open While941 opened this issue 1 year ago • 3 comments

I followed the ReadMe instructions to install and run. But there was no success, cmd prompt:

C:\Users\z>python -m g4f.gui.run Running on port 80

  • Serving Flask app 'g4f.gui.server.app'
  • Debug mode: off WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Running on all addresses (0.0.0.0)
  • Running on http://127.0.0.1:80
  • Running on http://192.168.1.192:80 Press CTRL+C to quit

Either way I run in cmd: python -m g4f.gui.run Still running in python IDE: from g4f.gui import run_gui; run_gui() All the same tips

python version : 3.10

While941 avatar Oct 11 '23 02:10 While941

@While941

Were there any error results (stack trace)?

Under normal circumstances, when you follow the README instructions, you should see the following messages (I use port 5000, default is 80):

Running on port 5000
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://127.0.0.1:5000
 * Running on http://172.21.71.146:5000
Press CTRL+C to quit

Next, you can try going to http://127.0.0.1:5000/ in your browser, and you should see the UI. (if you use port 80, you should going to http://127.0.0.1:80/)

Note: The UI screen does not automatically open.

Lin-jun-xiang avatar Oct 11 '23 09:10 Lin-jun-xiang

@While941

Were there any error results (stack trace)?

Under normal circumstances, when you follow the README instructions, you should see the following messages (I use port 5000, default is 80):

Running on port 5000
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://127.0.0.1:5000
 * Running on http://172.21.71.146:5000
Press CTRL+C to quit

Next, you can try going to http://127.0.0.1:5000/ in your browser, and you should see the UI. (if you use port 80, you should going to http://127.0.0.1:80/)

Note: The UI screen does not automatically open.

alright! this is my problem.

but , i got anther problem when used.

if select gpt 4 to ask question , It will appear a piece of HTML code. I run this HTML code and it looks like a waiting interface

{77E6DF4C-CDC6-4427-A191-331BCA37EC72}

if select gpt-4 32k , Provider ChatgptAi , it will track an error.

Error Tackback: {'content': 'hello', 'role': 'user'} ChatgptAi 192.168.1.192 - - [12/Oct/2023 10:03:05] "POST /backend-api/v2/conversation HTTP/1.1" 500 - Error on request: Traceback (most recent call last): File "G:\Program Files\Python\lib\site-packages\werkzeug\serving.py", line 362, in run_wsgi execute(self.server.app) File "G:\Program Files\Python\lib\site-packages\werkzeug\serving.py", line 325, in execute for data in application_iter: File "G:\Program Files\Python\lib\site-packages\werkzeug\wsgi.py", line 256, in next return self.next() File "G:\Program Files\Python\lib\site-packages\werkzeug\wrappers\response.py", line 32, in iter_encoded for item in iterable: File "G:\Program Files\Python\lib\site-packages\g4f\gui\server\backend.py", line 42, in stream answer = g4f.ChatCompletion.create(model=model, File "G:\Program Files\Python\lib\site-packages\g4f_init.py", line 60, in create model, provider = get_model_and_provider(model, provider, stream) File "G:\Program Files\Python\lib\site-packages\g4f_init.py", line 42, in get_model_and_provider raise ValueError(f'{provider.name} does not support "stream" argument') ValueError: ChatgptAi does not support "stream" argument {'content': 'hello', 'role': 'user'}

I found that if I don't select Provider, it returns a piece of HTML code that looks like it needs to wait

While941 avatar Oct 12 '23 02:10 While941

Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.

github-actions[bot] avatar Oct 20 '23 00:10 github-actions[bot]