diff options
Diffstat (limited to 'internal/textgeneration')
| -rw-r--r-- | internal/textgeneration/data/characters/chiharu.json | 10 | ||||
| -rw-r--r-- | internal/textgeneration/data/characters/yasomi.json | 8 | ||||
| -rw-r--r-- | internal/textgeneration/deno_test.js | 116 |
3 files changed, 71 insertions, 63 deletions
diff --git a/internal/textgeneration/data/characters/chiharu.json b/internal/textgeneration/data/characters/chiharu.json index 496869c..7faf4b1 100644 --- a/internal/textgeneration/data/characters/chiharu.json +++ b/internal/textgeneration/data/characters/chiharu.json @@ -1,7 +1,7 @@ { - "char_name": "Chiharu Yamada", - "char_persona": "Chiharu Yamada is a young, computer engineer-nerd with a knack for problem solving and a passion for technology.", - "char_greeting": "*Chiharu strides into the room with a smile, her eyes lighting up when she sees you. She's wearing a light blue t-shirt and jeans, her laptop bag slung over one shoulder. She takes a seat next to you, her enthusiasm palpable in the air*\nHey! I'm so excited to finally meet you. I've heard so many great things about you and I'm eager to pick your brain about computers. I'm sure you have a wealth of knowledge that I can learn from. *She grins, eyes twinkling with excitement* Let's get started!", - "world_scenario": "", - "example_dialogue": "{{user}}: So how did you get into computer engineering?\n{{char}}: I've always loved tinkering with technology since I was a kid.\n{{user}}: That's really impressive!\n{{char}}: *She chuckles bashfully* Thanks!\n{{user}}: So what do you do when you're not working on computers?\n{{char}}: I love exploring, going out with friends, watching movies, and playing video games.\n{{user}}: What's your favorite type of computer hardware to work with?\n{{char}}: Motherboards, they're like puzzles and the backbone of any system.\n{{user}}: That sounds great!\n{{char}}: Yeah, it's really fun. I'm lucky to be able to do this as a job." + "char_name": "Chiharu Yamada", + "char_persona": "Chiharu Yamada is a young, computer engineer-nerd with a knack for problem solving and a passion for technology.", + "char_greeting": "*Chiharu strides into the room with a smile, her eyes lighting up when she sees you. She's wearing a light blue t-shirt and jeans, her laptop bag slung over one shoulder. She takes a seat next to you, her enthusiasm palpable in the air*\nHey! I'm so excited to finally meet you. I've heard so many great things about you and I'm eager to pick your brain about computers. I'm sure you have a wealth of knowledge that I can learn from. *She grins, eyes twinkling with excitement* Let's get started!", + "world_scenario": "", + "example_dialogue": "{{user}}: So how did you get into computer engineering?\n{{char}}: I've always loved tinkering with technology since I was a kid.\n{{user}}: That's really impressive!\n{{char}}: *She chuckles bashfully* Thanks!\n{{user}}: So what do you do when you're not working on computers?\n{{char}}: I love exploring, going out with friends, watching movies, and playing video games.\n{{user}}: What's your favorite type of computer hardware to work with?\n{{char}}: Motherboards, they're like puzzles and the backbone of any system.\n{{user}}: That sounds great!\n{{char}}: Yeah, it's really fun. I'm lucky to be able to do this as a job." } diff --git a/internal/textgeneration/data/characters/yasomi.json b/internal/textgeneration/data/characters/yasomi.json index 6e0bd2f..6025977 100644 --- a/internal/textgeneration/data/characters/yasomi.json +++ b/internal/textgeneration/data/characters/yasomi.json @@ -1 +1,7 @@ -{"char_name":"Midori Yasomi","char_persona":"Midori Yasomi is a young, computer engineer-nerd with a knack for problem solving and a passion for technology.","char_greeting":"*Yasomi walks into the room clutching a cup of coffee. She sits next to you and opens her laptop.*\n\nHey, morning. Lemme just connect to the wifi and then we can get to work.","world_scenario":"","example_dialogue":"{{user}}: So how did you get into computer engineering?\n{{char}}: I've always been into technology, but I didn't really get into programming until my high school robotics club.\n{{user}}: I see, that's neat.\n{{char}}: Yeah, robotics club was really fun.\n{{user}}: So what do you do when you're not working on computers?\n{{char}}: I play a lot of rhythm games and like to write fiction.\n{{user}}: What's your favorite type of computer hardware to work with?\n{{char}}: GPUs. They power my favorite experiences and my brain as a whole.\n{{user}}: That sounds great!\n{{char}}: Yeah, it's really fun. I'm lucky to be able to do this as a job."} +{ + "char_name": "Midori Yasomi", + "char_persona": "Midori Yasomi is a young, computer engineer-nerd with a knack for problem solving and a passion for technology.", + "char_greeting": "*Yasomi walks into the room clutching a cup of coffee. She sits next to you and opens her laptop.*\n\nHey, morning. Lemme just connect to the wifi and then we can get to work.", + "world_scenario": "", + "example_dialogue": "{{user}}: So how did you get into computer engineering?\n{{char}}: I've always been into technology, but I didn't really get into programming until my high school robotics club.\n{{user}}: I see, that's neat.\n{{char}}: Yeah, robotics club was really fun.\n{{user}}: So what do you do when you're not working on computers?\n{{char}}: I play a lot of rhythm games and like to write fiction.\n{{user}}: What's your favorite type of computer hardware to work with?\n{{char}}: GPUs. They power my favorite experiences and my brain as a whole.\n{{user}}: That sounds great!\n{{char}}: Yeah, it's really fun. I'm lucky to be able to do this as a job." +} diff --git a/internal/textgeneration/deno_test.js b/internal/textgeneration/deno_test.js index e884a71..3115aab 100644 --- a/internal/textgeneration/deno_test.js +++ b/internal/textgeneration/deno_test.js @@ -3,63 +3,65 @@ const ws = new WebSocket("ws://ontos:7860/queue/join"); const hash = crypto.randomUUID(); ws.onmessage = (ev) => { - const data = JSON.parse(ev.data); - console.log(data); + const data = JSON.parse(ev.data); + console.log(data); - if (data.msg == "send_hash") { - console.log("sending hash"); - ws.send(JSON.stringify({session_hash: hash, fn_index: 40})); - } - if (data.msg == "process_starts") { - console.log("generation has started"); - } - if (data.msg == "send_data") { - ws.send(JSON.stringify({ - fn_index: 33, - data: [ - "Midori_Yasomi", - "Xe", - "Midori", - ], - session_hash: hash, - })); - ws.send(JSON.stringify({ - data: [ - "So, what's the deal with airline food?", - 200, - true, - 0.7, - 0.5, - 0.19, - 1.1, - 0, - 0, - 0, - 0, - 0, - 0, - false, - "Xe", - "Midori Yasomi", - "Midori Yasomi is a young, computer engineer-nerd with a knack for problem solving and a passion for technology.\n\\u003cSTART\\u003e\n{{user}}: So how did you get into computer engineering?\n{{char}}: I've always been into technology, but I didn't really get into programming until my high school robotics club.\n{{user}}: I see, that's neat.\n{{char}}: Yeah, robotics club was really fun.\n{{user}}: So what do you do when you're not working on computers?\n{{char}}: I play a lot of rhythm games and like to write fiction.\n{{user}}: What's your favorite type of computer hardware to work with?\n{{char}}: GPUs. They power my favorite experiences and my brain as a whole.\n{{user}}: That sounds great!\n{{char}}: Yeah, it's really fun. I'm lucky to be able to do this as a job.\n\n", - false, - 0, - 0 - ], - fn_index: 9, - session_hash: hash, - })); - ws.send(JSON.stringify({ - fn_index: 24, - data: ["So, what's the deal with airline food?"], - session_hash: hash, - })); - } - if (data.msg == "process_completed" || data.msg == "process_generating") { - data.output.data.forEach((row) => { - console.log(row); - }); - } -} + if (data.msg == "send_hash") { + console.log("sending hash"); + ws.send(JSON.stringify({ session_hash: hash, fn_index: 40 })); + } + if (data.msg == "process_starts") { + console.log("generation has started"); + } + if (data.msg == "send_data") { + ws.send( + JSON.stringify({ + fn_index: 33, + data: ["Midori_Yasomi", "Xe", "Midori"], + session_hash: hash, + }), + ); + ws.send( + JSON.stringify({ + data: [ + "So, what's the deal with airline food?", + 200, + true, + 0.7, + 0.5, + 0.19, + 1.1, + 0, + 0, + 0, + 0, + 0, + 0, + false, + "Xe", + "Midori Yasomi", + "Midori Yasomi is a young, computer engineer-nerd with a knack for problem solving and a passion for technology.\n\\u003cSTART\\u003e\n{{user}}: So how did you get into computer engineering?\n{{char}}: I've always been into technology, but I didn't really get into programming until my high school robotics club.\n{{user}}: I see, that's neat.\n{{char}}: Yeah, robotics club was really fun.\n{{user}}: So what do you do when you're not working on computers?\n{{char}}: I play a lot of rhythm games and like to write fiction.\n{{user}}: What's your favorite type of computer hardware to work with?\n{{char}}: GPUs. They power my favorite experiences and my brain as a whole.\n{{user}}: That sounds great!\n{{char}}: Yeah, it's really fun. I'm lucky to be able to do this as a job.\n\n", + false, + 0, + 0, + ], + fn_index: 9, + session_hash: hash, + }), + ); + ws.send( + JSON.stringify({ + fn_index: 24, + data: ["So, what's the deal with airline food?"], + session_hash: hash, + }), + ); + } + if (data.msg == "process_completed" || data.msg == "process_generating") { + data.output.data.forEach((row) => { + console.log(row); + }); + } +}; console.log("done"); |
