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

Change BaseURL from https://api.openai.com/v1 #48

Closed
isotropicdesign opened this issue Feb 9, 2023 · 2 comments · Fixed by #49
Closed

Change BaseURL from https://api.openai.com/v1 #48

isotropicdesign opened this issue Feb 9, 2023 · 2 comments · Fixed by #49
Labels
enhancement New feature or request

Comments

@isotropicdesign
Copy link

Describe the feature or improvement you're requesting

There are several interesting analytics products like https://www.helicone.ai/ that allow for easy tracking of usage, and even metered billing. To make it work, we need to change the base URL from the standard OpenAI's API, to the middleman. It would be a nice feature to be able to define this as a constant or something like it.

Additional context

No response

@orhanerday orhanerday added the enhancement New feature or request label Feb 10, 2023
@orhanerday
Copy link
Owner

orhanerday commented Feb 10, 2023 via email

@orhanerday orhanerday linked a pull request Feb 10, 2023 that will close this issue
@orhanerday
Copy link
Owner

@isotropicdesign
execute composer update, and add the following code to your PHP file;

$open_ai_key = getenv('OPENAI_API_KEY');
$open_ai = new OpenAi($open_ai_key, "", "https://oai.hconeai.com/"); 

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
None yet
Development

Successfully merging a pull request may close this issue.

2 participants