PawanOsman / ChatGPT-Official

ChatGPT Client using official OpenAI API
MIT License
102 stars 23 forks source link

not working #2

Closed witchfindertr closed 1 year ago

witchfindertr commented 1 year ago

not working

import ChatGPT from "chatgpt-official";

let options = { temperature: 0.7, // OpenAI parameter max_tokens: 256, // OpenAI parameter [Max response size by tokens] top_p: 1, // OpenAI parameter frequency_penalty: 0, // OpenAI parameter presence_penalty: 0, // OpenAI parameter instructions: You are ChatGPT, a large language model trained by OpenAI., // initial instructions for the bot model: "text-chat-davinci-002-20221122", // OpenAI parameter stop: "<|im_end|>", // OpenAI parameter }

let bot = new ChatGPT("sk-bcnKbdrBTATR7Z4zhpi2T3BlbkFJoHO0HaZ84...", options); // Note: options is optional

async function example() { let response = await bot.ask("Hello?"); console.log(response);// 👉️ 42 // 👉️ result is available here }

example();

this is new text-chat-davinci-002-20221122 why not working

PawanOsman commented 1 year ago

can you show us the error you got?

witchfindertr commented 1 year ago

can you show us the error you got?

blank data no error