Open massenz opened 1 month ago
Actually, while researching this issue, I just discovered that now OpenAI API Keys can be created "project scoped" so this is unnecessary, so long as the user selects a project-specific API key.
This largely solves the issue here, but I still think that, for the sake of parity (and because there may be use cases where a "super-user" API key may be used to manage multiple projects) it would be good to add support for a Project ID.
Recently OpenAI has added the support for Projects, within an Org; and Assistants are now project-scoped. When creating a new Client,
ClientConfig
should support aProjectID
field, similar to what the Python API does:I suspect there may be a workaround currently by adding a custom header:
but this is not documented.
Is your feature request related to a problem? Please describe.
Assistants (and by induction, Threads and Messages) are Project-scoped in the OpenAI API, so not having this limits us to using only the
DefaultProject
which causes issues of isolation, etc.Describe the solution you'd like Add a
ProjectID
to theClientConfig
structDescribe alternatives you've considered Custom
OpenAI-Project
headerAdditional context I'd be happy to contribute the code to implement this: just say the word!
:heart:
go-openai
!!!