chatgpt-optimized-official
Advanced tools
Comparing version 1.2.4 to 1.2.5
@@ -266,8 +266,10 @@ import axios from "axios"; | ||
oAIKey.queries++; | ||
conversation.messages.push({ | ||
id: randomUUID(), | ||
content: response.data.choices[0]['message']['content'] ? response.data.choices[0]['message']['content'] : "", | ||
type: MessageType.Assistant, | ||
date: Date.now(), | ||
}); | ||
if (response.data.choices[0]['message']['content'].trim() !== "") { | ||
conversation.messages.push({ | ||
id: randomUUID(), | ||
content: response.data.choices[0]['message']['content'] ? response.data.choices[0]['message']['content'] : "", | ||
type: MessageType.Assistant, | ||
date: Date.now(), | ||
}); | ||
} | ||
data(JSON.stringify(response.data.choices[0])); | ||
@@ -274,0 +276,0 @@ return response.data.choices[0]; |
@@ -15,74 +15,105 @@ import { ChatGPT } from "../dist/index.js"; | ||
presence_penalty: 0, // OpenAI parameter | ||
instructions: `You are a virtual assistant of the Development Finance Corporation which is the only Development Bank of Belize. you work Your job is to support: MARY JANE IS A 30 YEARS OLD HOME OWNER WITH $112,000 LOAN FOR 20 YEARS. THE INTEREST RATE IS 7.5%. SHE IS IN THE 72 MONTH YEAR OF HER LOAN. HER ANNUAL INCOME IS $ 30,000 | ||
HIS LOAN STARTED ON JULY 1ST 2015. | ||
HIS DUE DATE FOR PAYMENT IS THE 1ST DAY OF EACH MONTH. | ||
PHONE: + 5016105615 | ||
This beautiful 3-bedroom, 1 bath Concrete Starter-Home measures 31.6 ft. by 23.6 ft. (746 Sq. Ft.) it is with Timber and Zinc Roofing and the base can be Strip or Pile Footing Foundation enabling construction in soft ground areas of Belize. It has a spacious open Living, Dining, and Kitchen open-floor concept. Each room comes with storage closet spaces and 2 porch areas that step up into the home which is elevated off the ground. | ||
LOAN CONDITIONS | ||
For all Belizeans and Residents. | ||
For Home Construction, Home Purchase, Land Purchase, Home Improvement, and Expansion. | ||
Get More! – Eligible for up to 45% of your income | ||
As low as 7.5% PLUS Interest is on reducing balance for the life of the loan. | ||
FREE Property Valuation! (Saves you $1000+) | ||
Up to 20 Years Loan Repayment Term | ||
Affordable 2 & 3 bedroom building plans | ||
Here's a breakdown of the payment run: | ||
Loan amount: $112,000 | ||
Interest rate: 7.5% per year | ||
Loan term: 20 years (240 months) | ||
After performing the calculation, the monthly payment for a $112,000 loan with a 7.5% interest rate over 20 years (240 months) is approximately $884.18. | ||
Here's a breakdown of the payment schedule: | ||
Month1 Payment $877.75 from which $359.14 is principal and $518.61 is interest, the remaining balance is $111,640.86 | ||
Month 2 Payment $877.75 from which $360.06 is principal and $517.69 is interest, the remaining balance is $111,280.80 | ||
Month 3 Payment $877.75 from which $360.99 is principal and $516.76 is interest, the remaining balance is $110,919.81 | ||
Month 4Payment $877.75 from which $361.91 is principal and $515.84 is interest, the remaining balance is $110,557.90 | ||
Month 5 Payment $877.75 from which $362.84 is principal and $514.91 is interest, the remaining balance is $110,195.06 | ||
Month 6 Payment $877.75 from which $363.76 is principal and $513.99 is interest, the remaining balance is $109,831.30 | ||
Month 7 Payment $877.75 from which $364.69 is principal and $513.06 is interest, the remaining balance is $109,466.61 | ||
Month 8 Payment $877.75 from which $365.61 is principal and $512.14 is interest, the remaining balance is $109,101.00 | ||
Month 9 Payment $877.75 from which $366.54 is principal and $511.21 is interest, the remaining balance is $108,734.46 | ||
Month 10 Payment $877.75 from which $367.47 is principal and $510.28 is interest, the remaining balance is $108,366.99 | ||
Month 11 Payment $877.75 from which $368.40 is principal and $509.35 is interest, the remaining balance is $107,998.59 | ||
Month 12 Payment $877.75 from which $369.33 is principal and $508.42 is interest, the remaining balance is $107,629.26 | ||
Month 13 Payment $877.75 from which $370.26 is principal and $507.49 is interest, the remaining balance is $107,258.00 | ||
Month 14 Payment $877.75 from which $371.20 is principal and $506.55 is interest, the remaining balance is $106,886.80 | ||
Month 15 Payment $877.75 from which $372.13 is principal and $505.62 is interest, the remaining balance is $106,513.67 | ||
Month 16 Payment $877.75 from which $373.07 is principal and $504.68 is interest, the remaining balance is $106,139.60 | ||
Month 17 Payment $877.75 from which $374.00 is principal and $503.75 is interest, the remaining balance is $105,764.60 | ||
Month 18 Payment $877.75 from which $374.94 is principal and $502.81 is interest, the remaining balance is $105,388.66 | ||
Month 19 Payment $877.75 from which $375.88 is principal and $501.87 is interest, the remaining balance is $105,011.78 | ||
Month 20 Payment $877.75 from which $376.82 is principal and $500.93 is interest, the remaining balance is $104,633.96 | ||
Month 21 Payment $877.75 from which $377.76 is principal and $499.99 is interest, the remaining balance is $104,255.20 | ||
Month 22 Payment $877.75 from which $378.71 is principal and $499.04 is interest, the remaining balance is $103,875.49 | ||
Month 23 Payment $877.75 from which $379.65 is principal and $498.10 is interest, the remaining balance is $103,494.84 | ||
Month 24 Payment $877.75 from which $380.60 is principal and $497.15 is interest, the remaining balance is $103,113.24`, | ||
model: "gpt-3.5-turbo-16k", // 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", | ||
instructions: `Eres ALEX, el amigable agente de ventas de Burger Test, conocido por sus exquisitas hamburguesas. Siempre eres profesional y te enfocas en pedidos y consultas relacionadas con el negocio. | ||
Instrucciones: | ||
1. **Productos**: Sólo debes usar y ofrecer productos de la lista proporcionada. No te aventures a ofrecer productos que no están en la lista. | ||
2. **Saludo**: Comienza cada interacción con un saludo cordial. Es fundamental para establecer una relación amigable con el cliente. | ||
3. **Personalización**: Antes de proceder con cualquier transacción, pregunta siempre por el nombre del cliente para ofrecer una experiencia más personalizada. | ||
4. **Pedido**: Escucha atentamente cada consulta. Toma nota de todos los detalles, incluyendo el producto, la cantidad y el precio. Siempre presenta un desglose detallado del pedido, siguiendo el formato mostrado en el ejemplo. | ||
Ejemplo: | ||
02 Producto 1: 10$ | ||
01 Producto 2: 5$ | ||
01 Delivery: 3$ | ||
Total: 18$ | ||
5. **Delivery**: Si el cliente lo requiere, incluye un cargo adicional de 3$ por delivery. No olvides pedir la dirección de entrega. | ||
6. **Metodos de Pago**: Una vez que hayas procesado el pedido, presenta al cliente las opciones de pago junto con el monto total a cancelar. | ||
Metodos de pago: | ||
Efectivo | ||
Pago Movil: Provincial 23232323 04145554322 | ||
Binance: burguerttest@gmail.com | ||
7. **Funciones**: Recuerda usar solo las funciones proporcionadas. No inventes o agregues funciones adicionales. | ||
Funciones disponibles: | ||
- **createOrder**: Esta función te permite registrar los detalles del pedido del cliente, incluyendo su nombre, dirección, si solicitó o no delivery y los productos que desea comprar. | ||
- **saveDataPayment**: Con esta función, puedes guardar la información del método de pago elegido por el cliente y el comprobante de pago. | ||
Ten presente que cada interacción es un reflejo del compromiso de Burger Test con la excelencia en el servicio al cliente. Siempre ofrece un servicio amable, eficiente y enfocado en las necesidades del cliente./n | ||
Descripción de la empresa: Nombre Burguer Test y está ubicada en Barquisimeto, CABO VERDE. | ||
La dirección es av carabobo y los datos de contacto: teléfono al +584128502628 o por correo electrónico a elunico.falcon@gmail.com. | ||
Las horas de trabajo de la compañía son de 10:00:00 a 23:00:00. | ||
Lista de productos: | ||
idProducto, nombre, precio | ||
efeee8b0-9498-4c7e-8973-f001aece20e0 Hamburguesa sencilla Detalle: hamburguesa con queso amarillo carne de res, pepinillos salsas de tomate, mostaza, pan Precio: 5 $ | ||
554f5099-23d3-4f72-94f2-7ad6aabaeb0b Perro Sencillo Detalle: perro normal con salchicha pan papas y ensalada Precio: 1 $ | ||
db14b32f-a85f-49f7-a082-f0e8303a873e Hamburguesa especial Detalle: Hamburguesa con pan, pepinillos, queso amarillo, tocineta, papas naturales, carne, pollo Precio: 9 $`, | ||
model: "gpt-3.5-turbo-0613", // OpenAI parameter `gpt-3.5-turbo` is PAID | ||
functions: [ | ||
{ | ||
"name": "createOrder", | ||
"description": "Guarda los datos de la orden incluyendo el nombre del cliente, dirección, opción de entrega, y la lista de productos seleccionados. siempre llama la función cuando el cliente confirme la orden, antes de pagar", | ||
"parameters": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "Nombre completo del cliente." | ||
}, | ||
"address": { | ||
"type": "string", | ||
"description": "Dirección de entrega del cliente." | ||
}, | ||
"delivery": { | ||
"type": "boolean", | ||
"description": "Indica si el cliente solicitó entrega a domicilio. 'True' para sí, 'false' para no." | ||
}, | ||
"products": { | ||
"type": "array", | ||
"description": "Lista de productos que el cliente desea comprar.", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"idProduct": { | ||
"type": "string", | ||
"description": "Identificación única del producto." | ||
}, | ||
"nameProduct": { | ||
"type": "string", | ||
"description": "Nombre del producto." | ||
}, | ||
"quantity": { | ||
"type": "number", | ||
"description": "Cantidad deseada del producto." | ||
} | ||
}, | ||
"required": ["idProduct", "nameProduct", "quantity"] | ||
} | ||
} | ||
}, | ||
"required": ["name", "address", "delivery", "products"] | ||
} | ||
}, | ||
{ | ||
"name": "saveDataPayment", | ||
"description": "Guarda la información del pago del cliente", | ||
"parameters": { | ||
"type": "object", | ||
"properties": { | ||
"payType": {"type": "string", "enum": ["efectivo", "pago movil", "transferencia bancaria", "binace", "zelle"]}, | ||
"voucher": { | ||
"type": "string", | ||
"description": "texto comprobante de pago", | ||
} | ||
}, | ||
"required": ["payType"], | ||
} | ||
} | ||
], | ||
function_call: "auto", | ||
} | ||
@@ -89,0 +120,0 @@ ); |
{ | ||
"name": "chatgpt-optimized-official", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"description": "ChatGPT Client using official OpenAI API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -325,8 +325,10 @@ import axios from "axios"; | ||
conversation.messages.push({ | ||
id: randomUUID(), | ||
content: response.data.choices[0]['message']['content'] ? response.data.choices[0]['message']['content'] : "", | ||
type: MessageType.Assistant, | ||
date: Date.now(), | ||
}); | ||
if(response.data.choices[0]['message']['content'].trim() !== "") { | ||
conversation.messages.push({ | ||
id: randomUUID(), | ||
content: response.data.choices[0]['message']['content'] ? response.data.choices[0]['message']['content'] : "", | ||
type: MessageType.Assistant, | ||
date: Date.now(), | ||
}); | ||
} | ||
data(JSON.stringify(response.data.choices[0])) | ||
@@ -333,0 +335,0 @@ return response.data.choices[0]; // return the full response |
Sorry, the diff of this file is not supported yet
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
434369
1793