Closed
Description
Describe the feature or improvement you're requesting
Currently, in order to create openai
connection, we need to do the following:
import openai
openai.organization = "ORG"
openai.api_key = os.getenv("KEY")
openai.Completion.create(.....)
In my use case I have Flask
server with 2 endpoint, each on them uses different OpenAI
credentials.
With the current implementation, when the credentials are global param in the package, I cannot use the 2 endpoints simultaneously
Ideally, I want something like this:
import openai
with openai.create_connection(org, key, ...) as conn:
conn.Completion.create(.....)
Additional context
No response