
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
openai-api
Advanced tools
This package is a tiny wrapper for the openAI API, if you find any issue please feel free to message me or open a PR :).
If you have any ideas on how to improve the library feel free to let me know as well!
You can also visit the Issue tracker for more information or open a new issue.
This project is not affiliated with OpenAI and was written purely out of interest.
npm i openai-api
const OpenAI = require('openai-api');
const OPEN_AI_API_KEY = ####################
const openai = new OpenAI(OPEN_AI_API_KEY);
(async () => {
await const gptResponse = openai.complete({
engine: 'davinci',
prompt: 'this is a test',
maxTokens: 5,
temperature: 0.9,
topP: 1,
n: 1,
stream: false,
logprobs: false,
stop: '\n'
});
console.log(gptResponse);
})();
(async () => {
await const gptResponse = openai.search({
engine: 'davinci',
documents: ["White House", "hospital", "school"],
query: "the president"
});
console.log(gptResponse);
})();
FAQs
A tiny client module for the openAI API
The npm package openai-api receives a total of 1,038 weekly downloads. As such, openai-api popularity was classified as popular.
We found that openai-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.