gpt4free/testing/test_chat_completion.py

12 lines
259 B
Python
Raw Normal View History

2023-07-28 06:07:17 -04:00
import sys
from pathlib import Path
sys.path.append(str(Path(__file__).parent.parent))
import g4f
response = g4f.ChatCompletion.create(
model=g4f.models.gpt_35_turbo,
messages=[{"role": "user", "content": "hello, are you GPT 4?"}]
2023-07-28 06:07:17 -04:00
)
print(response)