Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend OpenAI provider to accept Organization and Project #1113

Closed
wants to merge 1 commit into from

Conversation

jasonkneen
Copy link

@jasonkneen jasonkneen commented Feb 6, 2025

Fixes #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.

Fixes block#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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend OpenAI provider to accept Organization and Project
2 participants