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

chatgpt-jdasa

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chatgpt-jdasa - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

6

build/index.d.ts

@@ -178,3 +178,3 @@ import Keyv from 'keyv';

*/
content: string;
content: any;
/**

@@ -449,3 +449,3 @@ * The name of the user in a multi-user chat

*/
sendMessage(text: string, opts?: SendMessageOptions): Promise<ChatMessage>;
sendMessage(text: string, opts: SendMessageOptions, image_url: string): Promise<ChatMessage>;
get apiKey(): string;

@@ -455,3 +455,3 @@ set apiKey(apiKey: string);

set apiOrg(apiOrg: string);
protected _buildMessages(text: string, opts: SendMessageOptions): Promise<{
protected _buildMessages(text: string, opts: SendMessageOptions, image_url: string): Promise<{
messages: openai.ChatCompletionRequestMessage[];

@@ -458,0 +458,0 @@ maxTokens: number;

@@ -202,3 +202,3 @@ // src/chatgpt-api.ts

*/
async sendMessage(text, opts = {}) {
async sendMessage(text, opts = {}, image_url) {
const {

@@ -229,3 +229,4 @@ parentMessageId,

text,
opts
opts,
image_url
);

@@ -281,3 +282,2 @@ const result = {

const delta = response.choices[0].delta;
console.log("delta=%o", delta);
if (delta) {

@@ -392,3 +392,3 @@ result.delta = delta == null ? void 0 : delta.content;

}
async _buildMessages(text, opts) {
async _buildMessages(text, opts, image_url) {
const { systemMessage = this._systemMessage } = opts;

@@ -410,3 +410,14 @@ let { parentMessageId } = opts;

role: "user",
content: text,
content: [
{
"type": "text",
"text": text
},
{
"type": "image_url",
"image_url": {
"url": image_url
}
}
],
name: opts.name

@@ -413,0 +424,0 @@ }

{
"name": "chatgpt-jdasa",
"version": "1.0.4",
"version": "1.0.5",
"description": "Node.js client for the official ChatGPT API,support gpt-4o and image_url.",

@@ -5,0 +5,0 @@ "author": "Travis Fischer <travis@transitivebullsh.it>",

Sorry, the diff of this file is not supported yet

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