Socket
Socket
Sign inDemoInstall

discord-chat-gpt

Package Overview
Dependencies
35
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.2 to 2.0.0

23

index.js

@@ -9,6 +9,4 @@ import { Configuration, OpenAIApi } from "openai";

constructor(options) {
this.orgKey = options.authId;
this.apiKey = options.apiKey;
this.configuration = new Configuration({
organization: this.orgKey,
apiKey: this.apiKey,

@@ -25,13 +23,14 @@ });

try {
let response = await this.openai.createCompletion({
model: "davinci",
prompt: `ChatGPT is a friendly chatbot. \n\
ChatGPT : Hello, how are you?\n\
${requester}: ${content}\n\
ChatGPT:`,
temperature: 0.9,
max_tokens: 100,
stop: ["ChatGPT:", "Kabir Jaipal:"],
let response = await this.openai.createChatCompletion({
model: "gpt-3.5-turbo-0301",
messages: [
{
role: "user",
content: content,
name: requester,
},
],
});
return response.data.choices.at(0).text;
let message = response.data.choices.at(0).message.content;
return message;
} catch (error) {

@@ -38,0 +37,0 @@ throw new Error(`Failed to complete API call: ${error.message}`);

{
"name": "discord-chat-gpt",
"version": "1.1.2",
"version": "2.0.0",
"description": "Chat-GPT Chat Bot For Discord",

@@ -37,4 +37,4 @@ "main": "index.js",

"discord.js": "^14.7.1",
"openai": "^3.1.0"
"openai": "^3.2.1"
}
}
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc