aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2025-04-26 20:07:06 -0400
committerXe Iaso <me@xeiaso.net>2025-04-26 20:07:06 -0400
commit62665656ffc8c20b7913b64dd14f4739bdcf29e7 (patch)
tree52893728becf4b7cb7b6b21f36d3a030b33ab376 /internal
parent0a566abb1557f1a06723564b080061c06afd5de9 (diff)
downloadx-62665656ffc8c20b7913b64dd14f4739bdcf29e7.tar.xz
x-62665656ffc8c20b7913b64dd14f4739bdcf29e7.zip
chore: reformat the world, set up autoformat on commit
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'internal')
-rw-r--r--internal/confyg/README.md3
-rw-r--r--internal/mainsa/README.md5
-rw-r--r--internal/textgeneration/data/characters/chiharu.json10
-rw-r--r--internal/textgeneration/data/characters/yasomi.json8
-rw-r--r--internal/textgeneration/deno_test.js116
5 files changed, 76 insertions, 66 deletions
diff --git a/internal/confyg/README.md b/internal/confyg/README.md
index c904c25..68eca53 100644
--- a/internal/confyg/README.md
+++ b/internal/confyg/README.md
@@ -101,8 +101,9 @@ var (
func main() {
flag.Parse()
-
+
if *config != "" {
flagconfyg.CmdParse(*config)
}
}
+```
diff --git a/internal/mainsa/README.md b/internal/mainsa/README.md
index 5ec39e6..8147697 100644
--- a/internal/mainsa/README.md
+++ b/internal/mainsa/README.md
@@ -1,8 +1,9 @@
# ma Insa
-This package contains constants and conversion functions for the paracosm that I created, `ma Insa` (lit: land inside).
+This package contains constants and conversion functions for the paracosm that I created, `ma Insa` (lit: land inside).
I really created this paracosm by traveling around to different parts of it (or: where things would be if it did exist clearly, etc) then asking and answering two questions:
+
- what _is there_?
- and what is it _like_?
@@ -15,7 +16,7 @@ NPC's in the paracosm speak [Toki Pona](http://tokipona.net/tp/default.aspx) and
## Dates
-A date, or `tenpo nimi`, is a combination of the following information:
+A date, or `tenpo nimi`, is a combination of the following information:
- the year
- the season
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");