body:'{"model":"text-davinci-003","prompt":"summarize the following in 50 words or less: ' + body.replace(/['"]+/g, '').trim().replace(/(\r\n|\n|\n)/gm, "") + '","max_tokens":200,"temperature":0}',
constbodyjson = '{"model":"text-davinci-003","prompt":"summarize the following in 50 words or less: ' + body.replace(/['"]+/g, '').trim().replace(/(\r\n|\n|\n)/gm, "") + '","max_tokens":200,"temperature":0}'
console.log(bodyjson)
constotherParam = {
body:bodyjson,
method:'POST'
};
constresponse = awaitfetch(Url,otherParam);
varoutput = awaitresponse.text()
return {output}
}
awaitgetBody()
}
your api address = azure function [for chatgpt api : post]
메일 내용을 요약해서 보여줌
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
* See LICENSE in the project root for license information.
constbodyjson = '{"model":"text-davinci-003","prompt":"summarize the following in 50 words or less: ' + body.replace(/['"]+/g, '').trim().replace(/(\r\n|\n|\n)/gm, "") + '","max_tokens":200,"temperature":0}'
console.log(bodyjson)
constotherParam = {
body:bodyjson,
method:'POST'
};
constresponse = awaitfetch(Url,otherParam);
varoutput = awaitresponse.text()
return {output}
}
awaitgetBody()
}
Summarize This Email 선택시 기존에서는 콘솔(개발자모드)에서 내용이 보였으나 이젠 그냥 화면에 보임
constbodyJson ='{"model":"text-davinci-003","prompt":"Reply to the following email and politely and professionally manner while saying no '+ body.replace(/['"]+/g, '').trim().replace(/(\r\n|\n|\r)/gm, "") +'","max_tokens":400,"temperature":0}'