You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gpt4free/testing/test_chat_completion.py

12 lines
259 B
Python

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?"}]
)
print(response)