Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
This library wraps TypeScript or Javascript OpenAI API calls and logs additional data to the configured OPENPIPE_BASE_URL
for further processing.
It is fully compatible with OpenAI's sdk and logs both streaming and non-streaming requests and responses.
npm install --save openpipe
# or
yarn add openpipe
// import OpenAI from 'openai'
import OpenAI from "openpipe/openai";
// Fully compatible with original OpenAI initialization
const openai = new OpenAI({
apiKey: "my api key", // defaults to process.env["OPENAI_API_KEY"]
// openpipe key is optional
openpipe: {
apiKey: "my api key", // defaults to process.env["OPENPIPE_API_KEY"]
baseUrl: "my url", // defaults to process.env["OPENPIPE_BASE_URL"] or https://app.openpipe.ai/api/v1 if not set
},
});
async function main() {
// Allows optional openpipe object
const completion = await openai.chat.completions.create({
messages: [{ role: "user", content: "Say this is a test" }],
model: "gpt-3.5-turbo",
// optional
openpipe: {
// Add custom searchable tags
tags: {
prompt_id: "getCompletion",
any_key: "any_value",
},
logRequest: true, // Enable/disable data collection. Defaults to true.
},
});
console.log(completion.choices);
}
main();
How do I report calls to my self-hosted instance?
Start an instance by following the instructions on Running Locally. Once it's running, point your OPENPIPE_BASE_URL
to your self-hosted instance.
What if my OPENPIPE_BASE_URL
is misconfigured or my instance goes down? Will my OpenAI calls stop working?
Your OpenAI calls will continue to function as expected no matter what. The sdk handles logging errors gracefully without affecting OpenAI inference.
See the GitHub repo for more details.
FAQs
OpenPipe TypeScript SDK: Fine-Tuning, Inference, and Metrics for Production Apps
The npm package openpipe receives a total of 13,501 weekly downloads. As such, openpipe popularity was classified as popular.
We found that openpipe demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.