xtekky / gpt4free

The official gpt4free repository | various collection of powerful language models
https://g4f.ai
GNU General Public License v3.0
62.34k stars 13.4k forks source link

SyntaxError: Invalid Character in g4f/api/__init__.py #2411

Closed restartxx closed 4 days ago

restartxx commented 5 days ago

Description:

Hi,

I encountered an issue while running the g4f API. The error occurs when executing the following command:

g4f api

The full traceback is as follows:

Traceback (most recent call last):
  File "/usr/bin/g4f", line 8, in <module>
    sys.exit(main())                                                               ^^^^^^
  File "/usr/lib/python3.11/site-packages/g4f/cli.py", line 34, in main
    run_api_args(args)
  File "/usr/lib/python3.11/site-packages/g4f/cli.py", line 42, in run_api_args
    from g4f.api import AppConfig, run_api
  File "/usr/lib/python3.11/site-packages/g4f/api/__init__.py", line 91
    ⅞
    ^
SyntaxError: invalid character '⅞' (U+215E)

Steps to reproduce:

  1. Run the following command:
    g4f api
  2. The error will occur, pointing to an invalid character (, U+215E) in the g4f/api/__init__.py file.

Expected behavior: The API should run without syntax errors.

Environment:

hlohaus commented 4 days ago

I removed this invalid character