Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
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";
// const OpenAI = require("openai")
const OpenAI = require("openpipe/openai").default;
// 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: "extract_user_intent",
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 53,541 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.