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

Fix environment variable loading, add OpenAI Organization support #23

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ngfgrant
Copy link

@ngfgrant ngfgrant commented Feb 8, 2024

  • 59e8b4d Fix environment variable loading

    previously the environment variables were not being loaded correctly
    when using process.env directly. This is a next app and it seems we
    need to reference them in env{} within next.config.js first.

  • b392bc9 Add support for OpenAI organizations

    OpenAI supports organizations which is useful if you are part of an org
    but also have a personal account via the same email address in the API.

    In order to use credit from the appropriate account you need to include
    the organization header in calls to OpenAI's API.

    I am not exposing this as a configurable option via the UI for now,
    though if we find that is required that is a reasonably trivial
    addition.

previously the environment variables were not being loaded correctly
when using `process.env` directly. This is a next app and it seems we
need to reference them in `env{}` within next.config.js first.
OpenAI supports organizations which is useful if you are part of an org
but also have a personal account via the same email address in the API.

In order to use credit from the appropriate account you need to include
the organization header in calls to OpenAI's API.

I am not exposing this as a configurable option via the UI for now,
though if we find that is required that is a reasonably trivial
addition.
@ngfgrant ngfgrant changed the title Fix env vars Fix environment variable loading, add OpenAI Organization support Feb 9, 2024
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.

1 participant