Small CLI to convert a single chat session between Google AI Studio JSON and Open WebUI export JSON.
- Requires
ghc
andcabal
on PATH. - Build:
cabal build
-
AI Studio -> Open WebUI (single session array):
cabal run chat-rosetta -- aistudio-to-openwebui --in /path/to/aistudio.json --out /path/to/openwebui.json [--title "Optional Title"]
-
Open WebUI -> AI Studio:
cabal run chat-rosetta -- openwebui-to-aistudio --in /path/to/chat-export.json --out /path/to/aistudio.json
- One session at a time:
- Open WebUI inputs must contain exactly one session in the top-level array; the tool errors otherwise.
- AI Studio inputs are single-conversation JSON files.
- No pretty-printing: outputs are compact JSON using Aeson
encode
. - Messages only: discards all thinking/thought content and historical versions. Preserves the system prompt.
- Open WebUI export fills both
chat.history
(canonical) andchat.messages
with the current linear chain. IDs and timestamps are generated if missing. - AI Studio export includes minimal
runSettings
, using model inferred from source if available.