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

Enhancement: Pass OpenAI Organization ID to OpenAI API requests #1570

Closed
1 task done
shaggy245 opened this issue Jan 17, 2024 · 2 comments · Fixed by #1590
Closed
1 task done

Enhancement: Pass OpenAI Organization ID to OpenAI API requests #1570

shaggy245 opened this issue Jan 17, 2024 · 2 comments · Fixed by #1590
Assignees
Labels
✨ enhancement New feature or request

Comments

@shaggy245
Copy link

What is your question?

OpenAI documentation notes the ability to set an explicit organization ID via HTTP header (in addition to the API key). Is there an option to set an OpenAI organization ID in LibreChat's OpenAI configuration so that it is included in all API requests to OpenAI?

More Details

I hope to lock down LibreChat to a specific OpenAI organization ID so that, in the event that the associated OpenAI user is added to multiple Open AI organizations, API calls from LibreChat are still associated with an explicitly configured OpenAI organization.

I searched LibreChat docs, GitHub issues, and code and did not see anything obvious. Thanks!

What is the main subject of your question?

Endpoints

Screenshots

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@shaggy245 shaggy245 added the ❓ question Further information is requested label Jan 17, 2024
@danny-avila danny-avila added ✨ enhancement New feature or request and removed ❓ question Further information is requested labels Jan 17, 2024
@danny-avila danny-avila changed the title [Question]: Can I Pass OpenAI Organization ID in LibreChat OpenAI API requests? [Enhancement]: Pass OpenAI Organization ID to OpenAI API requests Jan 17, 2024
@danny-avila
Copy link
Owner

Thanks for checking out the project!

Not currently but this a good suggestion and easily implemented, will mark this as planned.

@danny-avila danny-avila changed the title [Enhancement]: Pass OpenAI Organization ID to OpenAI API requests Enhancement: Pass OpenAI Organization ID to OpenAI API requests Jan 17, 2024
@danny-avila danny-avila moved this to 🆕 New in LibreChat Jan 17, 2024
@danny-avila danny-avila self-assigned this Jan 19, 2024
@danny-avila
Copy link
Owner

You can now specify which organization to use for each API request to OpenAI. However, it is not required if you are only part of a single organization or intend to use your default organization. You can check your default organization here.

This can also help you limit your LibreChat instance from allowing API keys outside of your organization to be used, as a mismatch between key and organization will throw an API error.

OPENAI_ORGANIZATION=org-Y6rfake63IhVorgqfPQmGmgtId

All outgoing requests to OpenAI, including langchain/plugin requests, should result in error 401 no such organization if the org id is invalid or there is a mismatch.

PR #1590

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in LibreChat Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants