mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
AI generation for notes (#1112)
* feat: ai generation for notes * feat - ai generation -default to gpt-4o-mini * feat - ai generation - change update text * feat - ai generation - improve prompt --------- Co-authored-by: Azgaar <azgaar.fmg@yandex.com>
This commit is contained in:
parent
1f280133be
commit
6df54d1ef6
5 changed files with 139 additions and 4 deletions
30
index.html
30
index.html
|
|
@ -4921,6 +4921,7 @@
|
|||
<div id="notesLegend" contenteditable="true"></div>
|
||||
<div style="margin-top: 0.3em">
|
||||
<button id="notesFocus" data-tip="Focus on selected object" class="icon-target"></button>
|
||||
<button id="notesGenerateWithAi" data-tip="Generate note with AI" class="icon-robot"></button>
|
||||
<button
|
||||
id="notesPin"
|
||||
data-tip="Toggle notes box dispay: hide or do not hide the box on mouse move"
|
||||
|
|
@ -4932,6 +4933,32 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id="aiGenerator" class="dialog stable" style="display: none">
|
||||
<div style="display: flex; flex-direction: column; gap: 0.3em; width: 100%">
|
||||
<textarea id="aiGeneratorResult" placeholder="Generated text will appear here" cols="30" rows="10"></textarea>
|
||||
<textarea id="aiGeneratorPrompt" placeholder="Type a prompt here" cols="30" rows="5"></textarea>
|
||||
<div style="display: flex; align-items: center; gap: 1em">
|
||||
<label for="aiGeneratorModel"
|
||||
>Model:
|
||||
<select id="aiGeneratorModel"></select>
|
||||
</label>
|
||||
|
||||
<label for="aiGeneratorKey"
|
||||
>Key:
|
||||
<input id="aiGeneratorKey" placeholder="Enter OpenAI API key" class="icon-key" />
|
||||
<a
|
||||
href="https://platform.openai.com/account/api-keys"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
class="icon-help-circled"
|
||||
style="text-decoration: none"
|
||||
data-tip="Get the key at OpenAI website. The key will be stored in your browser and send to OpenAI API directly. The Map Genenerator doesn't store the key or any generated data"
|
||||
></a>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="emblemEditor" class="dialog stable" style="display: none">
|
||||
<svg viewBox="0 0 200 200"><use id="emblemImage"></use></svg>
|
||||
<div id="emblemBody">
|
||||
|
|
@ -8037,7 +8064,8 @@
|
|||
<script defer src="modules/ui/relief-editor.js?v=1.99.00"></script>
|
||||
<script defer src="modules/ui/burg-editor.js?v=1.99.05"></script>
|
||||
<script defer src="modules/ui/units-editor.js?v=1.99.05"></script>
|
||||
<script defer src="modules/ui/notes-editor.js?v=1.99.00"></script>
|
||||
<script defer src="modules/ui/notes-editor.js?v=1.99.06"></script>
|
||||
<script defer src="modules/ui/ai-generator.js?v=1.99.06"></script>
|
||||
<script defer src="modules/ui/diplomacy-editor.js?v=1.99.00"></script>
|
||||
<script defer src="modules/ui/zones-editor.js?v=1.99.00"></script>
|
||||
<script defer src="modules/ui/burgs-overview.js?v=1.99.05"></script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue