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

Expose API Base URL option #32

Closed
alexkreidler opened this issue Mar 30, 2023 · 2 comments
Closed

Expose API Base URL option #32

alexkreidler opened this issue Mar 30, 2023 · 2 comments

Comments

@alexkreidler
Copy link

There are projects like Helicone which provide a wrapper around the OpenAI API for tracking prompts/response quality over time, error rates, understanding pricing and token usage etc. Additionally some people might implement OpenAI API-compatible open source model servers e.g. based on LLama etc. So it would be great if the user could change the baseURL in the settings to use other services.

From the Helicone docs, the implementation should be pretty easy:

import { Configuration, OpenAIApi } from "openai";

const configuration = new Configuration({
  apiKey: process.env.OPENAI_API_KEY,
  basePath: "https://oai.hconeai.com/v1",
});

const openai = new OpenAIApi(configuration);
@enricoros
Copy link
Owner

enricoros commented Mar 30, 2023

Great idea. Tried this change, and while the app works, nothing is displayed on the Helicone dashboard.
I've asked the Helicone discord if there are issues with the /v1/chat/completions API, or with stream: true (for getting the streaming output).

https://discord.com/channels/1020597994703310878/1021699161831251968/1091100457662943263

@enricoros
Copy link
Owner

Done and deployed. Check 7154db7 for instructions and the note about Helicone adding support for chatGPT/streaming on the dashboard.

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

No branches or pull requests

2 participants