ChatGPT API ini ditenagai oleh: daniapi.biz.id
npm i @danitech/chatgpt-api
yarn add @danitech/chatgpt-api
const chatGPTAPI = require('@danitech/chatgpt-api');
import chatGPTAPI from '@danitech/chatgpt-api';
const { models } = chatGPTAPI;
const { chatGPT3, chatGPT35, chatGPT4 } = models;
// GPT-3 model
(async () => {
try {
const response = await chatGPT3('Hello, AI.');
console.log('ChatGPT-3:', response);
} catch (error) {
console.error('Error:', error);
}
})();
// GPT-3.5 model
(async () => {
try {
const response = await chatGPT35('Hello, AI.');
console.log('ChatGPT-3.5:', response);
} catch (error) {
console.error('Error:', error);
}
})();
// GPT-4 model
(async () => {
try {
const response = await chatGPT4('Hello, AI.');
console.log('ChatGPT-4:', response);
} catch (error) {
console.error('Error:', error);
}
})();
ChatGPT-3: Hello! How can I assist you today?
ChatGPT-3.5: Hello! How can I assist you today?
ChatGPT-4: Hello! How can I assist you today?
- Pembuat / Pengembang: Dani Ramdani (Dani Techno.) - FullStack Engineer
- Kontak Pembuat / Pengembang: 0895 1254 5999 (WhatsApp), contact@danitechno.com (Email)
- Dani Techno. - FullStack Engineer (Pembuat / Pengembang)
- daniapi.biz.id (Penyedia JSON-API)