mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-06 02:30:41 -08:00
13 lines
339 B
Python
Executable file
13 lines
339 B
Python
Executable file
from g4f.client import Client
|
|
|
|
client = Client()
|
|
|
|
response = client.chat.completions.create(
|
|
model="gpt-4o",
|
|
messages=[
|
|
{"role": "system", "content": "You are a helpful assistant."},
|
|
{"role": "user", "content": "how does a court case get to the Supreme Court?"}
|
|
],
|
|
)
|
|
|
|
print(response.choices[0].message.content)
|