from g4f.client import Client

client = Client()

response = client.chat.completions.create(
    model="gpt-3.5-turbo",
    messages=[{"role": "user", "content": "Hello"}],
    # Add any other necessary parameters
)
print(response.choices[0].message.content)
#subprocess.call(f'python g4f/cli.py')

#local
#from g4f.local import LocalClient

#client   = LocalClient()
#client.list_models() #вывод моделей
#response = client.chat.completions.create(
  #  model    = 'orca-mini-3b',
  #  messages = [{"role": "user", "content": "hi"}],
  #  stream   = True
#)

#for token in response:
  #  print(token.choices[0].delta.content or "")
