gpt4free/testing/test_chat_completion.py
2023-08-17 15:02:19 +02:00

17 lines
324 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)