summaryrefslogblamecommitdiffstats
path: root/testing/test_chat_completion.py
blob: fbaa31691836fb7a26ced4b6e43b7f2f3f71a6f6 (plain) (tree)
1
2
3
4
5
6
7
8
9
10






                                                  
                                     

                                                                   
 
              
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)