You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For users who belong to multiple organizations, OpenAI expects you to pass a header specifying which organization and project is used for an API request.
Fixesblock#1067
Extend the OpenAI provider to accept `openai_organization` and `openai_project` as new configuration keys.
* Add `openai_organization` and `openai_project` to the `Settings` struct in `crates/goose-server/src/configuration.rs`.
* Update the `test_socket_addr_conversion` function in `crates/goose-server/src/configuration.rs` to include `openai_organization` and `openai_project`.
* Add `openai_organization` and `openai_project` to the `OpenAiProvider` struct in `crates/goose/src/providers/openai.rs`.
* Update the `from_env` function in `crates/goose/src/providers/openai.rs` to load `openai_organization` and `openai_project`.
* Modify the `post` function in `crates/goose/src/providers/openai.rs` to include `openai_organization` and `openai_project` in the request headers.
* Add `OPENAI_ORGANIZATION` and `OPENAI_PROJECT` to the configuration keys in `crates/goose/src/providers/openai.rs`.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/block/goose/issues/1067?shareId=XXXX-XXXX-XXXX-XXXX).
For users who belong to multiple organizations, OpenAI expects you to pass a header specifying which organization and project is used for an API request.
Snippet from their docs:
Would you be amenable to extending the provider configuration to accept
openai_organization
andopenai_project
as new configuration keys?The text was updated successfully, but these errors were encountered: