chatgpt-optimized-official
Advanced tools
Comparing version 1.1.7 to 1.1.8
@@ -148,3 +148,3 @@ import axios from "axios"; | ||
presence_penalty: this.options.presence_penalty, | ||
stream: true, | ||
stream: true | ||
}, { | ||
@@ -151,0 +151,0 @@ responseType: "stream", |
@@ -9,3 +9,3 @@ import { ChatGPT } from "../dist/index.js"; | ||
let bot = new ChatGPT("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", { | ||
let bot = new ChatGPT(process.env.OPENAI_API_KEY, { | ||
temperature: 0.7, // OpenAI parameter | ||
@@ -18,27 +18,27 @@ max_tokens: 256, // OpenAI parameter [Max response size by tokens] | ||
model: "gpt-3.5-turbo-0613", // OpenAI parameter `gpt-3.5-turbo` is PAID | ||
functions: [ | ||
{ | ||
"name": "saveDataUser", | ||
"description": "Guardar los datos del usuario para solicitar un prueba de manejo", | ||
"parameters": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "Nombre del usuario", | ||
}, | ||
"email": { | ||
"type": "string", | ||
"description": "Correo del usuario", | ||
}, | ||
"phone": { | ||
"type": "string", | ||
"description": "Telefono del usuario", | ||
} | ||
}, | ||
"required": ["name", "email", "phone"], | ||
}, | ||
} | ||
], | ||
function_call: "auto", | ||
// functions: [ | ||
// { | ||
// "name": "saveDataUser", | ||
// "description": "Guardar los datos del usuario para solicitar un prueba de manejo", | ||
// "parameters": { | ||
// "type": "object", | ||
// "properties": { | ||
// "name": { | ||
// "type": "string", | ||
// "description": "Nombre del usuario", | ||
// }, | ||
// "email": { | ||
// "type": "string", | ||
// "description": "Correo del usuario", | ||
// }, | ||
// "phone": { | ||
// "type": "string", | ||
// "description": "Telefono del usuario", | ||
// } | ||
// }, | ||
// "required": ["name", "email", "phone"], | ||
// }, | ||
// } | ||
// ], | ||
// function_call: "auto", | ||
@@ -52,3 +52,3 @@ | ||
async function main() { | ||
bot.resetConversation("16"); | ||
//bot.resetConversation("16"); | ||
while (true) { | ||
@@ -63,5 +63,5 @@ | ||
process.stdout.write("ChatGPT: "); | ||
await bot.askPost(res => { | ||
await bot.askStream(res => { | ||
process.stdout.write(res.toString()); | ||
}, _ => { }, prompt, "19"); | ||
}, _ => { }, prompt, "31"); | ||
console.log(); | ||
@@ -68,0 +68,0 @@ } |
{ | ||
"name": "chatgpt-optimized-official", | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"description": "ChatGPT Client using official OpenAI API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -180,3 +180,3 @@ import axios from "axios"; | ||
presence_penalty: this.options.presence_penalty, | ||
stream: true, | ||
stream: true | ||
}, | ||
@@ -183,0 +183,0 @@ { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
119595
2