Skip to content

Instantly share code, notes, and snippets.

View kobkrit's full-sized avatar

Kobkrit Viriyayudhakorn kobkrit

View GitHub Profile
@kobkrit
kobkrit / gist:58472e14016faaaefa8689817159426c
Created October 2, 2024 14:16
OpenThaiGPT 1.5 72b on Siam.AI
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,
b310e2dd-aaf4-4ce7-8ecd-9dee4bb4f968
/******************************\
!!! คำเตือน โปรดระวัง !!!
การใช้บอท มีความเสี่ยงที่จะถูกแบนได้
แนะนำให้สร้างบัญชีใหม่มาบอทโดยเฉพาะ
\******************************/
class TLMBot {
constructor(minWaitTime = 5000, maxWaitTime = 15000) {
this.minWaitTime = minWaitTime;
this.maxWaitTime = maxWaitTime;
// 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
{
"line": {
"type": "template",
"altText": "เนื้อหาที่ถาม",
"template": {
"type": "carousel",
"columns": [
{
"thumbnailImageUrl": "https://www.scgbuildingmaterials.com/th/cmsresource/productmedia/ZCA11510138012/imagehigh/prd-8852404049916-high1_pd250217.jpg",
"title": "หลังคาไฟเบอร์",
{
"line": {
"type": "template",
"altText": "เนื้อหาที่ถาม",
"template": {
"type": "carousel",
"columns": [
{
"thumbnailImageUrl": "https://www.scgbuildingmaterials.com/th/cmsresource/productmedia/ZCBNTTILTREMAINT02/imagelow/sand-stone_pd400372_icon.jpg",
"title": "หลังคาคอนกรีต",
@kobkrit
kobkrit / Chatbot2.json
Last active September 4, 2018 16:22
Intent สำหรับหลังคาเซรามิก
{
"line": {
"type": "template",
"altText": "เนื้อหาที่ถาม",
"template": {
"type": "carousel",
"columns": [
{
"thumbnailImageUrl": "https://www.scgbuildingmaterials.com/th/cmsresource/productmedia/ZCD103070207/imagehigh/prd-8852439010370-high2_pd368593.jpg",
"title": "หลังคาเซรามิก",
{
"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": "เมนูสินค้า",
https://6b94a724.ngrok.io
// 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