gpt4free
gpt4free copied to clipboard
OpenAIchat
Please tell me how to use provider g4f.Provider.OpenaiChat with Legacy API I also set access_token but no answer from AI is returned
Here a full example with the legacy api:
import g4f
response = g4f.ChatCompletion.create(
model=g4f.models.default,
provider=g4f.Provider.OpenaiChat,
messages=[{"role": "user", "content": "say hello in german!"}],
access_token="..."
)
print(response)
Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.