mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-22 23:16:53 +00:00
Fix ChatGPT import
This commit is contained in:
parent
ea595dfe2f
commit
422df10841
@ -202,3 +202,18 @@ Action procedure to get the next response from the LLM
|
||||
</div>
|
||||
</$let>
|
||||
\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=<<createTiddler-title>>/>
|
||||
</$action-createtiddler>
|
||||
\end ai-tools-new-conversation
|
||||
|
||||
\procedure ai-tools-import-conversations()
|
||||
<$action-navigate $to="$:/plugins/tiddlywiki/ai-tools/tools"/>
|
||||
\end ai-tools-import-conversations
|
||||
|
6
plugins/tiddlywiki/ai-tools/page-menu/import-chatgpt.tid
Normal file
6
plugins/tiddlywiki/ai-tools/page-menu/import-chatgpt.tid
Normal file
@ -0,0 +1,6 @@
|
||||
title: $:/plugins/tiddlywiki/ai-tools/page-menu/import-chatgpt
|
||||
tags: $:/tags/AI/PageMenu
|
||||
|
||||
<$button actions=<<ai-tools-import-conversations>> class="tc-btn-invisible">
|
||||
{{$:/core/images/input-button}} Import Conversations from ~ChatGPT
|
||||
</$button>
|
@ -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=<<createTiddler-title>>/>
|
||||
</$action-createtiddler>
|
||||
\end actions
|
||||
|
||||
<$button actions=<<actions>> class="tc-btn-invisible">
|
||||
<$button actions=<<ai-tools-new-conversation>> class="tc-btn-invisible">
|
||||
{{$:/core/images/new-button}} New Conversation
|
||||
</$button>
|
||||
|
@ -212,3 +212,14 @@ tags: [[$:/tags/Stylesheet]]
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.tc-ai-tools-dropzone {
|
||||
background: yellow;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: 4em;
|
||||
}
|
||||
|
||||
.tc-ai-tools-dropzone.tc-dragover {
|
||||
background: red;
|
||||
}
|
@ -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
|
||||
</$dropzone>
|
||||
|
||||
!! 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
|
||||
|
||||
<ul>
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/AI/Conversation]sort[title]]">
|
||||
<li>
|
||||
<$link>
|
||||
<$text text=<<currentTiddler>>/>
|
||||
</$link>
|
||||
</li>
|
||||
<$list-empty>
|
||||
No conversations found
|
||||
</$list-empty>
|
||||
<$list-template>
|
||||
<li>
|
||||
<$link>
|
||||
<$text text=<<currentTiddler>>/>
|
||||
</$link>
|
||||
</li>
|
||||
</$list-template>
|
||||
</$list>
|
||||
</ul>
|
||||
|
Loading…
Reference in New Issue
Block a user