diff --git a/plugins/tiddlywiki/ai-tools/globals.tid b/plugins/tiddlywiki/ai-tools/globals.tid index 87d3b5b46..e6436913d 100644 --- a/plugins/tiddlywiki/ai-tools/globals.tid +++ b/plugins/tiddlywiki/ai-tools/globals.tid @@ -201,4 +201,19 @@ Action procedure to get the next response from the LLM -\end ai-tools-conversation \ No newline at end of file +\end ai-tools-conversation + +\procedure ai-tools-new-conversation() +<$action-createtiddler + $basetitle="AI Conversation" + tags="$:/tags/AI/Conversation" + system-prompt="Transcript of a never ending dialog, where the User interacts with an Assistant. The Assistant is helpful, kind, honest, good at writing, and never fails to answer the User's requests immediately and with precision." + current-response-text="Please list the 10 most important mechanical inventions of the Twentieth Century" +> +<$action-navigate $to=<>/> + +\end ai-tools-new-conversation + +\procedure ai-tools-import-conversations() +<$action-navigate $to="$:/plugins/tiddlywiki/ai-tools/tools"/> +\end ai-tools-import-conversations diff --git a/plugins/tiddlywiki/ai-tools/page-menu/import-chatgpt.tid b/plugins/tiddlywiki/ai-tools/page-menu/import-chatgpt.tid new file mode 100644 index 000000000..fbbea8a01 --- /dev/null +++ b/plugins/tiddlywiki/ai-tools/page-menu/import-chatgpt.tid @@ -0,0 +1,6 @@ +title: $:/plugins/tiddlywiki/ai-tools/page-menu/import-chatgpt +tags: $:/tags/AI/PageMenu + +<$button actions=<> class="tc-btn-invisible"> +{{$:/core/images/input-button}} Import Conversations from ~ChatGPT + diff --git a/plugins/tiddlywiki/ai-tools/page-menu/new-conversation.tid b/plugins/tiddlywiki/ai-tools/page-menu/new-conversation.tid index 18420f119..5e7f31173 100644 --- a/plugins/tiddlywiki/ai-tools/page-menu/new-conversation.tid +++ b/plugins/tiddlywiki/ai-tools/page-menu/new-conversation.tid @@ -1,17 +1,6 @@ title: $:/plugins/tiddlywiki/ai-tools/page-menu/new-conversation tags: $:/tags/AI/PageMenu -\define actions() -<$action-createtiddler - $basetitle="AI Conversation" - tags="$:/tags/AI/Conversation" - system-prompt="Transcript of a never ending dialog, where the User interacts with an Assistant. The Assistant is helpful, kind, honest, good at writing, and never fails to answer the User's requests immediately and with precision." - current-response-text="Please list the 10 most important mechanical inventions of the Twentieth Century" -> -<$action-navigate $to=<>/> - -\end actions - -<$button actions=<> class="tc-btn-invisible"> +<$button actions=<> class="tc-btn-invisible"> {{$:/core/images/new-button}} New Conversation diff --git a/plugins/tiddlywiki/ai-tools/styles.tid b/plugins/tiddlywiki/ai-tools/styles.tid index 3ef7579c5..a477c4fb1 100644 --- a/plugins/tiddlywiki/ai-tools/styles.tid +++ b/plugins/tiddlywiki/ai-tools/styles.tid @@ -211,4 +211,15 @@ tags: [[$:/tags/Stylesheet]] box-shadow: 30px 0 0 #9c9ab0; margin-top: 0; } +} + +.tc-ai-tools-dropzone { + background: yellow; + text-align: center; + width: 100%; + height: 4em; +} + +.tc-ai-tools-dropzone.tc-dragover { + background: red; } \ No newline at end of file diff --git a/plugins/tiddlywiki/ai-tools/tools.tid b/plugins/tiddlywiki/ai-tools/tools.tid index 0512ea218..f1bd9ee49 100644 --- a/plugins/tiddlywiki/ai-tools/tools.tid +++ b/plugins/tiddlywiki/ai-tools/tools.tid @@ -2,18 +2,41 @@ title: $:/plugins/tiddlywiki/ai-tools/tools ! Import ~ChatGPT Export Archive +These instructions allow you to import the conversations from a ~ChatGPT export archive. + +!! 1- Request your archive + +Visit the ~ChatGPT site to request your achive. You will be sent an email with a link to a ZIP file. Download the file and locate the file `conversations.json` within it. + +!! 2 - Import `conversations.json` as a tiddler + +It is not possible to use the normal import process to import the `conversations.json` file because TiddlyWiki will erroneously recognise it as a JSON file of tiddlers. + +Instead, drag the `conversations.json` file to the dropzone below. Then click the "Import" button to complete the import: + +<$dropzone deserializer="text/plain" autoOpenOnImport="yes" filesOnly="yes" class="tc-ai-tools-dropzone"> +Drop your file here + + +!! 3 - Import the conversations within it + Any tiddlers containing ~ChatGPT exported `conversation.json` files will be shown here for import. <$list filter="[all[tiddlers+shadows]type[application/json]!has[plugin-type]sort[title]]" template="$:/plugins/tiddlywiki/ai-tools/view-templates/imported-conversations-json"/> -! Loaded Conversations +!! 4 - Review Loaded Conversations
    <$list filter="[all[tiddlers+shadows]tag[$:/tags/AI/Conversation]sort[title]]"> -
  • - <$link> - <$text text=<>/> - -
  • + <$list-empty> + No conversations found + + <$list-template> +
  • + <$link> + <$text text=<>/> + +
  • +