Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openai-api

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openai-api - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

14

index.js

@@ -11,2 +11,6 @@ "use strict";

__safe_cast = (number) => {
return number ? Number(number) : null;
}
__send_request = (opts) => {

@@ -22,6 +26,6 @@ const url = config.completionURL(opts.engine);

prompt: opts.prompt,
max_tokens: opts.maxTokens,
temperature: opts.temperature,
top_p: opts.topP,
n: opts.n,
max_tokens: this.__safe_cast(opts.maxTokens),
temperature: this.__safe_cast(opts.temperature),
top_p: this.__safe_cast(opts.topP),
n: this.__safe_cast(opts.n),
stream: opts.stream,

@@ -53,2 +57,2 @@ stop: opts.stop

module.exports = OpenAI;
module.exports = OpenAI;
{
"name": "openai-api",
"version": "1.0.4",
"version": "1.0.5",
"description": "A tiny client module for the openAI API",

@@ -11,3 +11,5 @@ "main": "index.js",

"openai",
"gpt-3"
"gpt-3",
"open",
"ai"
],

@@ -17,4 +19,4 @@ "author": "Nikita Jerschow",

"repository": {
"type" : "git",
"url" : "https://github.com/Njerschow/openai-api"
"type": "git",
"url": "https://github.com/Njerschow/openai-api"
},

@@ -25,4 +27,4 @@ "dependencies": {

"devDependencies": {
"mocha": "^8.0.1"
"mocha": "^8.1.1"
}
}

@@ -17,3 +17,4 @@ const api_key = process.env.OPENAI_TEST_API_KEY;

prompt: "this is a test",
maxTokens: 5
maxTokens: 5,
temperature: 0.9
}).then((result) => {

@@ -20,0 +21,0 @@ assert.ok(result);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc