올라마 실습

This commit is contained in:
2026-05-26 22:51:21 +09:00
parent 4e33fb82af
commit fad14b867b
9 changed files with 1554 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
async function logJSONData() {
const response = await fetch("http://localhost:11434/api/chat", {
method:"post",
headers:{"Content-Type":"application/json"},
body:JSON.stringify({
model:'qwen2.5',
message: [
{"role": "system", "content": "당신은 친절한 AI 어시스턴트입니다."},
{"role": "user", "content": "파이썬의 장점을 3가지 알려주세요."},
],
stream:false
})
});
const jsonData = await response.json();
console.log(jsonData.message.content);
}
logJSONData