mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-12-26 04:33:35 +03:00
Merge branch 'main' of https://github.com/xtekky/gpt4free
This commit is contained in:
commit
cdeaa6288b
16
README.md
16
README.md
@ -14,6 +14,9 @@ from g4f.gui import run_gui
|
|||||||
|
|
||||||
run_gui()
|
run_gui()
|
||||||
```
|
```
|
||||||
|
preview:
|
||||||
|
|
||||||
|
<img width="1470" alt="image" src="https://github.com/xtekky/gpt4free/assets/98614666/57ad818a-a0dd-4eae-83e1-3fff848ae040">
|
||||||
|
|
||||||
- run interference from pypi package:
|
- run interference from pypi package:
|
||||||
```py
|
```py
|
||||||
@ -306,19 +309,26 @@ asyncio.run(run_all())
|
|||||||
|
|
||||||
### interference openai-proxy api (use with openai python package)
|
### interference openai-proxy api (use with openai python package)
|
||||||
|
|
||||||
If you want to use the embedding function, you need to get a huggingface token. You can get one at https://huggingface.co/settings/tokens make sure your role is set to write. If you have your token, just use it instead of the OpenAI api-key.
|
#### run interference from pypi package:
|
||||||
|
```py
|
||||||
|
from g4f.interference import run_interference
|
||||||
|
|
||||||
|
run_interference()
|
||||||
|
```
|
||||||
|
|
||||||
|
#### run interference from repo:
|
||||||
|
If you want to use the embedding function, you need to get a huggingface token. You can get one at https://huggingface.co/settings/tokens make sure your role is set to write. If you have your token, just use it instead of the OpenAI api-key.
|
||||||
|
|
||||||
get requirements:
|
get requirements:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pip install -r interference/requirements.txt
|
pip install -r etc/interference/requirements.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
run server:
|
run server:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
python3 -m interference.app
|
python3 -m etc/interference.app
|
||||||
```
|
```
|
||||||
|
|
||||||
```py
|
```py
|
||||||
|
Loading…
Reference in New Issue
Block a user