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

feat: allow setting OPENAI_API_BASE #1886

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Manouchehri
Copy link

What does this PR do?

Adds an optional OPENAI_API_BASE environmental. Useful if you want to use Cloudflare AI Gateway or LiteLLM;

Type of change

  • New feature (non-breaking change which adds functionality)

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project (npm run prettier)
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my PR needs changes to the documentation
  • I haven't checked if my changes generate no new warnings (npm run lint)
  • I haven't added tests that prove my fix is effective or that my feature works
  • I haven't checked if new and existing unit tests pass locally with my changes

Copy link

vercel bot commented Apr 26, 2024

@Manouchehri is attempting to deploy a commit to the langfuse Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLAassistant commented Apr 26, 2024

CLA assistant check
All committers have signed the CLA.

@@ -279,6 +279,7 @@ export const evaluate = async ({
completion = await fetchLLMCompletion({
streaming: false,
apiKey: decrypt(apiKey.secret_key), // decrypt the secret key
// apiBase: apiKey.api_base,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would require changing some of the database stuff. Leaving it commented out for now so you can decide. =)

@Manouchehri
Copy link
Author

I can confirm this working perfectly with LiteLLM on my end!

image

@Manouchehri Manouchehri marked this pull request as ready for review April 26, 2024 18:58
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.

None yet

2 participants