Adım ChatGPT değil GPT-3 diyip diyip duruyor,ben mi yanlış yaptım hocam acaba
const sendUserMessageToAI = async (userMessage) => {
const API_URL = "https://api.openai.com/v1/chat/completions";
const requestOptions = {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({
model: "gpt-3.5-turbo",
messages: [
{
role: "system",
content: "ÖrnekGPT"
},
{
role: "user",
content: userMessage
}
],
temperature: 1,
max_tokens: 256,
top_p: 1,
frequency_penalty: 0,
presence_penalty: 0
})
};
const response = await fetch(API_URL, requestOptions);
return response.json();
}
const copyResponse = (copyBtn) => {
// Copy the text content of the response to the clipboard
const responseTextElement = copyBtn.parentElement.querySelector("p");
navigator.clipboard.writeText(responseTextElement.textContent);
copyBtn.textContent = "done";
setTimeout(() => copyBtn.textContent = "content_copy", 1000);
}
System mesajına sadece "ÖrnekGPT" yazmak yerine örnek olarak: "Senin adın ÖrnekGPT amacın xxxx senin kim olduğunu soranlara ismin ile cevap vereceksin" gibi bir cümle kurabilirsiniz. karşıda ki kişi sanki bir insan gibi yazarsanız daha verimli sonuçlar alabilirsiniz.