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}'
root@DESKTOP-F4T7TCG:/usr# cd /etc root@DESKTOP-F4T7TCG:/etc# cd grafana root@DESKTOP-F4T7TCG:/etc/grafana# ls grafana.ini ldap.toml provisioning
vi grafana.ini
#################################### Paths #################################### [paths] # Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used) ;data = /var/lib/grafana
# Temporary files in `data` directory older than given duration will be removed ;temp_data_lifetime = 24h
# Directory where grafana can store logs ;logs = /var/log/grafana
# Directory where grafana will automatically scan and look for plugins plugins = /var/lib/grafana/plugins
root@DESKTOP-F4T7TCG:/var/lib/grafana# cd plugins/ root@DESKTOP-F4T7TCG:/var/lib/grafana/plugins# ls grafana-clock-panel-2.1.2.any.zip root@DESKTOP-F4T7TCG:/var/lib/grafana/plugins#
unzip grafana-clock-panel-2.1.2.any.zip
mv granana-clock-panel clock
==========참고=-============
plugins 경로 변경
$ /usr/local/grafana/bin/grafana-cli --pluginsDir /data/grafana/plugins/ plugins ls