-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
fixed in v1Issues addressed by the v1 betaIssues addressed by the v1 beta
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
ewpatton, Mattie, TSPereira, vdobrovolskii, skvark and 2 more
Metadata
Metadata
Assignees
Labels
fixed in v1Issues addressed by the v1 betaIssues addressed by the v1 beta