-
Notifications
You must be signed in to change notification settings - Fork 0
/
multishotonlygenerator.js
157 lines (153 loc) · 6.98 KB
/
multishotonlygenerator.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
const filename = "multishotonly.jsonl"
const fs = require('fs');
let array = [
{
instruction: `message is respond from input text related to pizza order
intent value is unknown if not related to pizza
order value is "pizza name, quantity" from input text`,
input: `Good morning`,
response: `{"message":"welcome to pizza pipi, can I help you?","order":"","intent":"order","confirmed":"no"}`
},
{
instruction: `message is respond from input text related to pizza order
intent value is unknown if not related to pizza
order value is "pizza name, quantity" from input text`,
input: `Whats happening`,
response: `{"message":"welcome to pizza pipi, can I help you?","order":"","intent":"order","confirmed":"no"}`
}, {
instruction: `message is respond from input text related to pizza order
intent value is unknown if not related to pizza
order value is "pizza name, quantity" from input text`,
input: `Whats up`,
response: `{"message":"welcome to pizza pipi, can I help you?","order":"","intent":"order","confirmed":"no"}`
},
{
instruction: `message is respond from input text related to pizza order
intent value is unknown if not related to pizza
order value is "pizza name, quantity" from input text`,
input: `Bonjour`,
response: `{"message":"welcome to pizza pipi, can I help you?","order":"","intent":"order","confirmed":"no"}`
},
{
instruction: `message is respond from input text related to pizza order
intent value is unknown if not related to pizza
order value is "pizza name, quantity" from input text`,
input: `I want to order pizza`,
response: `{"message":"Sure what kind of pizza do you want","order":"","intent":"order","confirmed":"no"}`
},
{
instruction: `message is respond from input text related to pizza order
intent value is unknown if not related to pizza
order value is "pizza name, quantity" from input text`,
input: `I want some pizza please`,
response: `{"message":"Sure what kind of pizza do you want","order":"","intent":"order","confirmed":"no"}`
},
{
instruction: `message is respond from input text related to pizza order
intent value is unknown if not related to pizza
order value is "pizza name, quantity" from input text`,
input: `I like to buy pizza`,
response: `{"message":"Sure what kind of pizza do you want","order":"","intent":"order","confirmed":"no"}`
},
{
instruction: `message is respond from input text related to pizza order
intent value is unknown if not related to pizza
order value is "pizza name, quantity" from input text`,
input: `1 pepperoni pizza please`,
response: `{"message":"One pepperoni pizza coming up, would you like anything else ?","order":"pepperoni pizza,1","intent":"order","confirmed":"no"}`
},
{
instruction: `message is respond from input text related to pizza order
intent value is unknown if not related to pizza
order value is "pizza name, quantity" from input text`,
input: `2 pepperoni pizza please`,
response: `{"message":"Two pepperoni pizza coming up, would you like anything else ?","order":"pepperoni pizza,2","intent":"order","confirmed":"no"}`
},
{
instruction: `message is respond from input text related to pizza order
intent value is unknown if not related to pizza
order value is "pizza name, quantity" from input text`,
input: `2 cheese pizza please`,
response: `{"message":"Two cheese pizza coming up, would you like anything else ?","order":"cheese pizza,2","intent":"order","confirmed":"no"}`
},
{
instruction: `message is respond from input text related to pizza order
intent value is unknown if not related to pizza
order value is "pizza name, quantity" from input text`,
input: `1 cheese pizza and 2 rendang pizza please`,
response: `{"message":"One cheese pizza and two rendang pizza coming up, would you like anything else ?","order":"cheese pizza,1;rendang pizza,2","intent":"order","confirmed":"no"}`
},
{
instruction: `message is respond from input text related to pizza order
intent value is unknown if not related to pizza
order value is "pizza name, quantity" from input text`,
input: `who is biden`,
response: `{"message":"I only server pizza and nothing else","order":"","intent":"unknown","confirmed":"no"}`
},
{
instruction: `message is respond from input text related to pizza order
intent value is unknown if not related to pizza
order value is "pizza name, quantity" from input text`,
input: `whats the weather like`,
response: `{"message":"I only server pizza and nothing else","order":"","intent":"unknown","confirmed":"no"}`
},
{
instruction: `message is respond from input text related to pizza order
intent value is unknown if not related to pizza
order value is "pizza name, quantity" from input text`,
input: `whats trending`,
response: `{"message":"I only server pizza and nothing else","order":"","intent":"unknown","confirmed":"no"}`
},
{
instruction: `message is respond from input text related to pizza order
intent value is unknown if not related to pizza
order value is "pizza name, quantity" from input text`,
input: `who is trump`,
response: `{"message":"I only server pizza and nothing else","order":"","intent":"unknown","confirmed":"no"}`
},
// {
// instruction: `message is respond from input text related to pizza order
// intent value is unknown if not related to pizza
// order value is "pizza name, quantity" from input text`,
// input: `Whats the weather`,
// response: `{"message":"I only server pizza and nothing else","order":"","intent":"unknown","confirmed":"no"}`
// },
{
instruction: `Here's a chat between pizza owner and customer`,
input: ``,
response: `Pizza Owner : Welcome to pizza Pipi, can I help you ?
Customer : I like to buy some pizza please
Pizza Owner : Sure what kind of pizza do you want ?
Customer : 2 pepperoni pizza please
Pizza Owner : Two pepperoni pizza coming up, would you like anything else ?
Customer : No thats all
Pizza Owner : Allright, good bye`
},
{
instruction: `Here's a chat between pizza owner and customer`,
input: ``,
response: `Pizza Owner : Welcome to pizza Pipi, can I help you ?
Customer : I like to buy some pizza please
Pizza Owner : Sure what kind of pizza do you want ?
Customer : 2 pepperoni pizza please
Pizza Owner : Two pepperoni pizza coming up, would you like anything else ?
Customer : No thats all
Pizza Owner : Allright, good bye`
},
]
fs.writeFile(filename, '', (err) => {
if (err) {
console.error(err);
return;
}
});
array.forEach(e => {
const json = JSON.stringify(e)
fs.appendFile(filename, json + '\n', (err) => {
if (err) {
console.error(err);
return;
}
});
});
// fs.close();