diff options
author | href <href@random.sh> | 2022-12-11 16:56:56 +0000 |
---|---|---|
committer | href <href@random.sh> | 2022-12-11 16:56:56 +0000 |
commit | 54679ac53446d5ba336b55761b0ab21fd09fa4be (patch) | |
tree | a5af1bdbede547d2fb24b9217dcf75d037c6d99c | |
parent | chore: 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.ex | 3 |
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, |