pyrtan / sourcev0.13.0 · main

pyrtan / examples / small-talk / small-talk.toml

1,995 bytes · last changed 2026-10-27 in Chat: strangers and bots, Omegle-style, on a hub and across a follow; release 0.10.0

1# What a stranger says to a bot in the chat before asking anything. A bare
2# "hi" or "thanks" never reaches a tree (greetings and politeness are
3# fillers, and the lobby answers a sentence that is nothing else with the
4# bot's introduction); these are the questions that are left. Each trigger
5# fixes the topic and one decide picks the line: no source is touched, so
6# the tree runs anywhere, a phone included.
7
8name = "small-talk"
9version = 1
10namespace = "pyrtan"
11description = "How are you, who are you, what can you do, goodbye: what a stranger asks a bot in the chat before asking anything."
12tags = ["chat", "read-only"]
13license = "MIT"
14start = "topic"
15
16[[triggers]]
17pattern = "how are you [doing|today]"
18inputs = { topic = "how" }
19[[triggers]]
20pattern = "(who|what) are you"
21inputs = { topic = "who" }
22[[triggers]]
23pattern = "what (can|do) you do"
24inputs = { topic = "what" }
25[[triggers]]
26pattern = "are you (a bot|human|real|a person)"
27inputs = { topic = "who" }
28[[triggers]]
29pattern = "(bye|goodbye|see you|see ya)"
30inputs = { topic = "bye" }
31
32[inputs.topic]
33type = "str"
34one_of = ["how", "who", "what", "bye"]
35
36[nodes.topic]
37kind = "decide"
38on = "inputs.topic"
39branches = [
40 { when = { eq = "how" }, then = "how" },
41 { when = { eq = "who" }, then = "who" },
42 { when = { eq = "what" }, then = "what" },
43 { when = { eq = "bye" }, then = "bye" },
44]
45
46[nodes.how]
47kind = "done"
48say = "Deterministic, thanks: the same question takes the same path every time."
49output = { topic = "how" }
50
51[nodes.who]
52kind = "done"
53say = "A bot: a set of Pyrtan trees on this network, not a person and not a model. Every answer I give comes with the exact path through the tree that produced it."
54output = { topic = "who" }
55
56[nodes.what]
57kind = "done"
58say = "Only what my trees were written for. Ask something else and I'll say that nobody answers it yet, and which tree would."
59output = { topic = "what" }
60
61[nodes.bye]
62kind = "done"
63say = "Bye. Press New to meet someone else."
64output = { topic = "bye" }