chatgpt-optimized-official
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -13,5 +13,5 @@ interface ChatGPTOptions { | ||
endpoint?: string; | ||
functions?: []; | ||
functions?: any; | ||
function_call?: string; | ||
} | ||
export default ChatGPTOptions; |
@@ -9,3 +9,3 @@ import { ChatGPT } from "../dist/index.js"; | ||
let bot = new ChatGPT(process.env.OPENAI_API_KEY, { | ||
let bot = new ChatGPT("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", { | ||
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", | ||
@@ -62,5 +62,5 @@ | ||
process.stdout.write("ChatGPT: "); | ||
await bot.askStream(res => { | ||
await bot.askPost(res => { | ||
process.stdout.write(res.toString()); | ||
}, _ => { }, prompt, "31"); | ||
}, _ => { }, prompt, "32"); | ||
console.log(); | ||
@@ -67,0 +67,0 @@ } |
{ | ||
"name": "chatgpt-optimized-official", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "ChatGPT Client using official OpenAI API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
1
428626