The way to use httpx to create a client:
with httpx.Client(headers=headers,params=params) as client:
r = client.post(url, data=data)
However, I’d like to configure this into using openai package:
client = openai.OpenAI(api_key='...',
http_client=httpx.Client(headers=headers,params=params))
I’m not sure if I’m going to use either one:
client.chat.completions.create()
client.post()
New contributor
sycozy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.