Work on AI related.
This commit is contained in:
@@ -23,7 +23,7 @@ import {
|
||||
MessageSquareWarning, Minus,
|
||||
Notebook,
|
||||
Pencil, Plus,
|
||||
RemoveFormatting,
|
||||
RefreshCcw, RemoveFormatting,
|
||||
SquareLibrary,
|
||||
Shapes, Share2, ShieldCheck, ShieldMinus, Siren, Skull,
|
||||
Tags, Target, ToggleLeft, ToggleRight, Trash2, TypeOutline,
|
||||
@@ -31,8 +31,9 @@ import {
|
||||
} from '@lucide/svelte';
|
||||
import { Modal } from 'flowbite-svelte';
|
||||
|
||||
import E_app_codemirror_v5 from '$lib/e_app_codemirror_v5.svelte';
|
||||
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
|
||||
import { journals_loc, journals_sess, journals_slct, journals_prom, journals_trig } from '$lib/ae_journals/ae_journals_stores';
|
||||
import E_app_codemirror_v5 from '$lib/e_app_codemirror_v5.svelte';
|
||||
|
||||
</script>
|
||||
|
||||
@@ -208,6 +209,23 @@ import { journals_loc, journals_sess, journals_slct, journals_prom, journals_tri
|
||||
|
||||
<h3 class="font-semibold">LLM AI:</h3>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm preset-outlined-primary-400-600"
|
||||
onclick={() => {
|
||||
$journals_loc.llm__api_base_url = $ae_loc.site_cfg_json?.llm__api_base_url ?? 'https://ai.dgrzone.com/api';
|
||||
$journals_loc.llm__api_model = $ae_loc.site_cfg_json?.llm__api_model ?? 'dgrzone-deepseek-8b-quick';
|
||||
$journals_loc.llm__api_token = $ae_loc.site_cfg_json?.llm__api_token ?? '';
|
||||
$journals_loc.llm__api_dangerous_browser = $ae_loc.site_cfg_json?.llm__api_dangerous_browser ?? false;
|
||||
$journals_loc.entry.llm__system_prompt = $ae_loc.site_cfg_json?.llm__system_prompt ?? '';
|
||||
|
||||
|
||||
}}
|
||||
>
|
||||
<Copy class="inline-block mr-1" />
|
||||
LLM from Site Cfg
|
||||
</button>
|
||||
|
||||
<!-- llm__api_base_url - default 'https://ai.dgrzone.com/api'; input url -->
|
||||
<label class="flex items-center justify-start gap-1">
|
||||
LLM API Base URL:
|
||||
@@ -288,7 +306,7 @@ import { journals_loc, journals_sess, journals_slct, journals_prom, journals_tri
|
||||
</label>
|
||||
|
||||
<label class="flex flex-col items-start justify-start gap-1 h-24">
|
||||
LLM System Prompt:
|
||||
LLM System Prompt for Journal Entry summarization:
|
||||
<E_app_codemirror_v5
|
||||
editable={true}
|
||||
readonly={false}
|
||||
@@ -307,6 +325,18 @@ import { journals_loc, journals_sess, journals_slct, journals_prom, journals_tri
|
||||
/>
|
||||
</label>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm preset-outlined-primary-400-600"
|
||||
onclick={() => {
|
||||
let default_system_prompt = 'Summarize the following journal entry content in a concise manner, focusing on key points and insights.';
|
||||
$journals_loc.entry.llm__system_prompt = default_system_prompt;
|
||||
}}
|
||||
>
|
||||
<RefreshCcw class="inline-block mr-1" />
|
||||
Reset to Journal Entry System Prompt
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user