mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-12-18 16:11:53 +03:00
18 lines
325 B
Python
18 lines
325 B
Python
import sys
|
|
from pathlib import Path
|
|
|
|
sys.path.append(str(Path(__file__).parent.parent))
|
|
|
|
import g4f
|
|
|
|
stream = False
|
|
response = g4f.ChatCompletion.create(
|
|
model="gpt-3.5-turbo",
|
|
provider=g4f.Provider.Ails,
|
|
messages=[{"role": "user", "content": "hello"}],
|
|
stream=stream,
|
|
active_server=5,
|
|
)
|
|
|
|
print(response)
|