mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-07 22:33:50 +00:00
feat: Assign a server and model on tiddler if user lazy or forget to pick one.
This commit is contained in:
parent
b36946badb
commit
309bd70dc3
@ -116,9 +116,25 @@ Procedure to display a message from an AI conversation. Current tiddler is the c
|
|||||||
\end
|
\end
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Action procedure to get the next response from the LLM
|
Action procedure to get the next response from the LLM on a chat tiddler.
|
||||||
-->
|
-->
|
||||||
\procedure ai-tools-action-get-response()
|
\procedure ai-tools-action-get-response()
|
||||||
|
<!-- Assign a server and model on tiddler if user forget to pick one. -->
|
||||||
|
<% if [<currentTiddler>!has[completion-server]] %>
|
||||||
|
<$action-setfield
|
||||||
|
$tiddler=<<currentTiddler>>
|
||||||
|
$field="completion-server"
|
||||||
|
$value={{{[all[shadows+tiddlers]tag[$:/tags/AI/CompletionServer]sort[caption]first[]]}}}
|
||||||
|
/>
|
||||||
|
<% endif %>
|
||||||
|
<% if [<currentTiddler>!has[completion-model]] %>
|
||||||
|
<$action-setfield
|
||||||
|
$tiddler=<<currentTiddler>>
|
||||||
|
$field="completion-model"
|
||||||
|
$value={{{[{!!completion-server}get[models]enlist-input[]first[]]}}}
|
||||||
|
/>
|
||||||
|
<% endif %>
|
||||||
|
<!-- Get the response -->
|
||||||
<$let
|
<$let
|
||||||
resultTitlePrefix={{{ [<currentTiddler>addsuffix[ - Prompt]] }}}
|
resultTitlePrefix={{{ [<currentTiddler>addsuffix[ - Prompt]] }}}
|
||||||
resultTags={{{ [<currentTiddler>format:titlelist[]] }}}
|
resultTags={{{ [<currentTiddler>format:titlelist[]] }}}
|
||||||
|
@ -5,4 +5,4 @@ These settings let you customise the behaviour of the "AI Tools" plugin.
|
|||||||
|
|
||||||
!! Completion Servers
|
!! Completion Servers
|
||||||
|
|
||||||
<<tabs "[all[shadows]tag[$:/tags/AI/ServerSetting]]">>
|
<<tabs "[all[shadows+tiddlers]tag[$:/tags/AI/ServerSetting]]">>
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
title: $:/plugins/tiddlywiki/ai-tools/utilities
|
title: $:/plugins/tiddlywiki/ai-tools/utilities
|
||||||
|
|
||||||
<<tabs "[all[shadows]tag[$:/tags/AI/Utility]]">>
|
<<tabs "[all[shadows+tiddlers]tag[$:/tags/AI/Utility]]">>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user