☄️ Nova API
Go to file
onlix 6aa22e8c55
Merge pull request #1 from RayBytes/main
Multiple Keys integration + Rotational Keys
2023-06-25 12:02:57 +02:00
.vscode git finally works 2023-06-23 02:18:28 +02:00
api merge main.py with new keys system 2023-06-24 23:56:56 +05:00
cli Fixed git stuff, but socks seems to still not work 2023-06-23 11:20:25 +02:00
tests Fixed proxies 2023-06-23 12:07:42 +02:00
.gitignore git finally works 2023-06-23 02:18:28 +02:00
config.json Update config.json for mongodb 2023-06-24 22:30:18 +05:00
LICENSE git finally works 2023-06-23 02:18:28 +02:00
README.md Fixed git stuff, but socks seems to still not work 2023-06-23 11:20:25 +02:00
requirements.txt Fixed git stuff, but socks seems to still not work 2023-06-23 11:20:25 +02:00
setup.py revert setup.py 2023-06-25 00:03:45 +05:00

☄️ Nova API Server

Reverse proxy server for OpenAI's API.

Install

Assuming you have a new version of Python 3 and pip installed:

python -m pip install -r requirements.txt

If you still get a ModuleNotFoundErrors, you can forefully install the dependencies using:

python -m pip install pipreqs
python -m pipreqs.pipreqs --force --mode no-pin
python -m pip install --upgrade -r requirements.txt

You can also try installing Nova API using setup.py:

python setup.py

or

pip install .

.env configuration

ACTUAL_IPS (optional)

This is a security measure to make sure a proxy, VPN, Tor or any other IP hiding service is used by the host when accessing OpenAI's API. It is a space separated list of IP addresses that are allowed to access the API. You can also just add the beginning of an API address, like 12.123. to allow all IPs starting with 12.123..

To disable the warning if you don't have this feature enabled, set ACTUAL_IPS to any value.

Proxy

  • PROXY_TYPE (optional, defaults to socks.PROXY_TYPE_HTTP): the type of proxy - can be http, https, socks4, socks5, 4 or 5, etc...
  • PROXY_HOST: the proxy host (host domain or IP address), without port!
  • PROXY_PORT
  • PROXY_USER (optional)
  • PROXY_PASS (optional)

Run

python cli

You can remove the --reload flag if you don't want to reload the server on file changes.

Test

python tests