summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhref <href@random.sh>2022-12-11 16:56:56 +0000
committerhref <href@random.sh>2022-12-11 16:56:56 +0000
commit54679ac53446d5ba336b55761b0ab21fd09fa4be (patch)
treea5af1bdbede547d2fb24b9217dcf75d037c6d99c
parentchore: git url, extend version number and improve reporting (diff)
feat(gpt): use flake id instead of couch generated ids
-rw-r--r--lib/lsg_irc/gpt_plugin.ex3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/lsg_irc/gpt_plugin.ex b/lib/lsg_irc/gpt_plugin.ex
index ac0373a..e3cefa7 100644
--- a/lib/lsg_irc/gpt_plugin.ex
+++ b/lib/lsg_irc/gpt_plugin.ex
@@ -184,7 +184,8 @@ defmodule LSG.IRC.GptPlugin do
{o_moderate?, o_moderation} = moderation(text, msg.account.id)
if o_moderate?, do: msg.replyfun.("🚨 offensive output: #{Enum.join(o_moderation, ", ")}")
msg.replyfun.(text)
- doc = %{"prompt_id" => Map.get(prompt, "_id"),
+ doc = %{"id" => FlakeId.get(),
+ "prompt_id" => Map.get(prompt, "_id"),
"prompt_rev" => Map.get(prompt, "_rev"),
"network" => msg.network,
"channel" => msg.channel,