1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-04-05 18:26:56 +00:00

refactor: make tools and settings extensible

This commit is contained in:
lin onetwo 2025-02-28 23:48:00 +08:00
parent 0fa97e64bd
commit 6b999c813e
7 changed files with 39 additions and 26 deletions

View File

@ -14,16 +14,9 @@ See the ''settings'' tab for set up instructions.
#* If using ~OpenAI it is possible to attach a single image to a prompt
# Click "Send" and wait for the output of the LLM
!! Import ~ChatGPT Conversation Archives
!! Use utility
# [[Follow the instructions|https://help.openai.com/en/articles/7260999-how-do-i-export-my-chatgpt-history-and-data]] to request an export of your ~ChatGPT data
# You will receive a link to download your data as a ZIP file
# Download and unzip the file
# Locate the file `conversations.json` within the archive and import it into your TiddlyWiki
# Visit the ''tools'' tab and locate your `conversations.json` tiddler
# Click the associated ''import'' button
# See the imported conversations listed in the ''tools'' tab
# The imported tiddler `conversations.json` is no longer required and can be deleted
For example, to import ~ChatGPT conversation archives, follow the instructions in the [[utilities tab|$:/plugins/tiddlywiki/ai-tools/utilities]].
!! Conversation Format

View File

@ -2,6 +2,6 @@
"title": "$:/plugins/tiddlywiki/ai-tools",
"name": "AI Tools",
"description": "AI Tools for TiddlyWiki",
"list": "readme docs tools settings tree",
"list": "readme docs utilities settings tree",
"stability": "STABILITY_1_EXPERIMENTAL"
}

View File

@ -0,0 +1,11 @@
title: $:/plugins/tiddlywiki/ai-tools/settings/llamafile
tags: $:/tags/AI/Setting
caption: Llamafile
!! Llamafile Setup
[[Llamafile|https://github.com/Mozilla-Ocho/llamafile]] lets you download and run LLMs as a single file. See the [[announcement blog post|https://hacks.mozilla.org/2023/11/introducing-llamafile/]] for background.
# Download and run Llamafile as [[described in the QuickStart guide|https://github.com/Mozilla-Ocho/llamafile?tab=readme-ov-file#quickstart]]
# Visit http://127.0.0.1:8080 in a browser and verify that you can see the Llamafile interface. You can also try it out here
# Return to AI Tools and start a conversation, specifying Llamafile as the server

View File

@ -1,6 +1,6 @@
title: $:/plugins/tiddlywiki/ai-tools/settings
! AI Tools Settings
title: $:/plugins/tiddlywiki/ai-tools/settings/openai
tags: $:/tags/AI/Setting
caption: OpenAI
!! ~OpenAI API key
@ -12,12 +12,4 @@ This plugin runs entirely in the browser, with no backend server component. A co
# Visit https://platform.openai.com/api-keys to create a new secret API key
# Copy and paste the value into the box below
~OpenAI Secret API Key: <$password name="openai-secret-key"/>
!! Llamafile Setup
[[Llamafile|https://github.com/Mozilla-Ocho/llamafile]] lets you download and run LLMs as a single file. See the [[announcment blog post|https://hacks.mozilla.org/2023/11/introducing-llamafile/]] for background.
# Download and run Llamafile as [[described in the QuickStart guide|https://github.com/Mozilla-Ocho/llamafile?tab=readme-ov-file#quickstart]]
# Visit http://127.0.0.1:8080 in a browser and verify that you can see the Llamafile interface. You can also try it out here
# Return to AI Tools and start a conversation, specifying Llamafile as the server
~OpenAI Secret API Key: <$password name="openai-secret-key"/>

View File

@ -0,0 +1,5 @@
title: $:/plugins/tiddlywiki/ai-tools/settings
These settings let you customise the behaviour of the "AI Tools" plugin.
<<tabs "[all[shadows]tag[$:/tags/AI/Setting]]">>

View File

@ -1,12 +1,21 @@
title: $:/plugins/tiddlywiki/ai-tools/tools
! Import ~ChatGPT Export Archive
title: $$:/plugins/tiddlywiki/ai-tools/utilities/openai
tags: $:/tags/AI/Utility
caption: Import ChatGPT Export Archive
These instructions allow you to import the conversations from a ~ChatGPT export archive.
# [[Follow the instructions|https://help.openai.com/en/articles/7260999-how-do-i-export-my-chatgpt-history-and-data]] to request an export of your ~ChatGPT data
# You will receive a link to download your data as a ZIP file
# Download and unzip the file
# Locate the file `conversations.json` within the archive and import it into your TiddlyWiki
# Visit the ''tools'' tab and locate your `conversations.json` tiddler
# Click the associated ''import'' button
# See the imported conversations listed in the ''tools'' tab
# The imported tiddler `conversations.json` is no longer required and can be deleted
!! 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.
Visit the ~ChatGPT site to request your archive. 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

View File

@ -0,0 +1,3 @@
title: $:/plugins/tiddlywiki/ai-tools/utilities
<<tabs "[all[shadows]tag[$:/tags/AI/Utility]]">>