This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://api.aieat.or.th/v1/completions \ | |
-H "Content-Type: application/json" \ | |
-H "Authorization: Bearer dummy" \ | |
-d '{ | |
"model": ".", | |
"prompt": "<|im_start|>system\nคุณคือผู้ช่วยตอบคำถามที่ฉลาดและซื่อสัตย์<|im_end|>\n<|im_start|>user\nกรุงเทพมหานครคืออะไร<|im_end|>\n<|im_start|>assistant\n", | |
"max_tokens": 512, | |
"temperature": 0.7, | |
"top_p": 0.8, | |
"top_k": 40, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b310e2dd-aaf4-4ce7-8ecd-9dee4bb4f968 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************\ | |
!!! คำเตือน โปรดระวัง !!! | |
การใช้บอท มีความเสี่ยงที่จะถูกแบนได้ | |
แนะนำให้สร้างบัญชีใหม่มาบอทโดยเฉพาะ | |
\******************************/ | |
class TLMBot { | |
constructor(minWaitTime = 5000, maxWaitTime = 15000) { | |
this.minWaitTime = minWaitTime; | |
this.maxWaitTime = maxWaitTime; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See https://github.com/dialogflow/dialogflow-fulfillment-nodejs | |
// for Dialogflow fulfillment library docs, samples, and to report issues | |
'use strict'; | |
const functions = require('firebase-functions'); | |
const {WebhookClient} = require('dialogflow-fulfillment'); | |
const {Card, Suggestion} = require('dialogflow-fulfillment'); | |
process.env.DEBUG = 'dialogflow:debug'; // enables lib debugging statements | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"line": { | |
"type": "template", | |
"altText": "เนื้อหาที่ถาม", | |
"template": { | |
"type": "carousel", | |
"columns": [ | |
{ | |
"thumbnailImageUrl": "https://www.scgbuildingmaterials.com/th/cmsresource/productmedia/ZCA11510138012/imagehigh/prd-8852404049916-high1_pd250217.jpg", | |
"title": "หลังคาไฟเบอร์", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"line": { | |
"type": "template", | |
"altText": "เนื้อหาที่ถาม", | |
"template": { | |
"type": "carousel", | |
"columns": [ | |
{ | |
"thumbnailImageUrl": "https://www.scgbuildingmaterials.com/th/cmsresource/productmedia/ZCBNTTILTREMAINT02/imagelow/sand-stone_pd400372_icon.jpg", | |
"title": "หลังคาคอนกรีต", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"line": { | |
"type": "template", | |
"altText": "เนื้อหาที่ถาม", | |
"template": { | |
"type": "carousel", | |
"columns": [ | |
{ | |
"thumbnailImageUrl": "https://www.scgbuildingmaterials.com/th/cmsresource/productmedia/ZCD103070207/imagehigh/prd-8852439010370-high2_pd368593.jpg", | |
"title": "หลังคาเซรามิก", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"line": { | |
"type": "template", | |
"altText": "เนื้อหาที่ถาม", | |
"template": { | |
"type": "carousel", | |
"columns": [ | |
{ | |
"thumbnailImageUrl": "https://www.scgbuildingmaterials.com/th/cmsresource/productmedia/ZCA11230142015/imagelow/scg-fibercement-tile-prolon-orange-flash-50x1_pd413474_icon.jpg", | |
"title": "เมนูสินค้า", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://6b94a724.ngrok.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See https://github.com/dialogflow/dialogflow-fulfillment-nodejs | |
// for Dialogflow fulfillment library docs, samples, and to report issues | |
'use strict'; | |
const functions = require('firebase-functions'); | |
const {WebhookClient} = require('dialogflow-fulfillment'); | |
const {Card, Suggestion} = require('dialogflow-fulfillment'); | |
process.env.DEBUG = 'dialogflow:debug'; // enables lib debugging statements | |
NewerOlder