Files
talemate/talemate_frontend/src/components/LoadScene.vue

217 lines
8.7 KiB
Vue
Raw Normal View History

2023-05-05 00:50:02 +03:00
<template>
Prep 0.15.0 (#38) * send one request for assign all clients * tweak narrate-after-dialogue prompt * elevenlabs default to turbo model and make model id configurable * improve add client dialogue to be more robust * prompt for default character creation on character card loads * rename to model as to not conflict with pydantic * narrate after dialogue strip dialogue generation unless enabled via new option * starling and capybara-tess * narrate dialogue context increased * relabel tts agent to Voice, show agent label in status bar * dont expect LLM to handle * and " - most of them are not stable / consistent enough with it * starling template updated * if allow dialogue in narration is disabled just assume the entire string is a narration * reorganization the narrate after dialogue template * fix more issues with time passage calculations * move punkt download to agent init and silence * improved RAG during conversation if AI selected is enabled in conversation agent * prompt tweaks * deepseek, chromomaid-storytelling * relock * narrate-after-dialogue prompt tweaks * runpod status queries every 15 secs instead of 60 * default player character prompting when loading character card from talemate storage * better chunking during split tts generation * tweak narrate progress prompt * improvements to ensure_dialogue_format and tests * to pytest * prep 0.15.0 * update packages * dialogue cleanup fixes * fix openai default model name fix not being able to edit client due to name check * free form analyst was using wrong system prompt causing gpt-4 to actually generate json responses
2023-12-02 00:40:14 +02:00
<v-list-subheader v-if="appConfig !== null" @click="toggle()" class="text-uppercase"><v-icon>mdi-script-text-outline</v-icon> Load
Prep 0.19.0 (#67) * linting * improve prompt devtools: test changes, show more information * some more polish for the new promp devtools * up default conversation gen length to 128 * openai client tweaks, talemate sets max_tokens on gpt-3.5 generations * support new openai embeddings (and default to text-embedding-3-small) * ux polish for character sheet and character state ux * actor instructions * experiment using # for context / instructions * fix bug where regenerating history would mess up time stamps * remove trailing ] * prevent client ctx from being unset * fix issue where sometimes you'd need to delete a client twice for it to disappear * upgrade dependencies * set 0.19.0 * fix performance degradation caused by circular loading animation * remove coqui studio support * fix issue when switching from unsaved creative mode to loading a scene * third party client / agent support * edit dialogue examples through character / actor editor * remove "edit dialogue" action from editor - replaced by character actor instructions * different icon for delete * prompt adjustment for acting instructions * adhoc context generation for character attributes and details * add adhoc generation for character description * contextual generation tweaks * contextual generation for dialogue examples fix some formatting issues * contextual generation for world entries * prepopulate initial recen scenarios with demo scenes add experimental holodeck scenario * scene info scene experimental * assortment of fixes for holodeck improvements * more holodeck fixes * refactor holodeck instructions * rename holodeck to simulation suite * better scene status messages * add new gpt-3.5-turbo model, better json response coercion for older models * allow exclusion of characters when persisting based on world state * better error handling of world state response * better error handling of world state response * more simulation suite fixes * progress color * world state character name mapping support * if neither quote nor asterisk is in message default to quotes * fix rerun of new paraphrase op * sim suite ping that ensure's characters are not aware of sim * fixes for better character name assessment simulation suite can now give the player character a proper name * fix bug with new status notifications * sim suite adjustments and fixes and tuning * sim suite tweaks * impl scene restore from file * prompting tweaks for reinforcement messages and acting instructions * more tweaks * dialogue prompt tweaks for rerun + rewrite * fix bug with character entry / exit with narration * linting * simsuite screenshots * screenshots
2024-02-06 00:40:55 +02:00
<v-progress-circular v-if="loading" indeterminate="disable-shrink" color="primary" size="20"></v-progress-circular>
2023-05-05 00:50:02 +03:00
<v-icon v-if="expanded" icon="mdi-chevron-down"></v-icon>
<v-icon v-else icon="mdi-chevron-up"></v-icon>
</v-list-subheader>
Prep 0.15.0 (#38) * send one request for assign all clients * tweak narrate-after-dialogue prompt * elevenlabs default to turbo model and make model id configurable * improve add client dialogue to be more robust * prompt for default character creation on character card loads * rename to model as to not conflict with pydantic * narrate after dialogue strip dialogue generation unless enabled via new option * starling and capybara-tess * narrate dialogue context increased * relabel tts agent to Voice, show agent label in status bar * dont expect LLM to handle * and " - most of them are not stable / consistent enough with it * starling template updated * if allow dialogue in narration is disabled just assume the entire string is a narration * reorganization the narrate after dialogue template * fix more issues with time passage calculations * move punkt download to agent init and silence * improved RAG during conversation if AI selected is enabled in conversation agent * prompt tweaks * deepseek, chromomaid-storytelling * relock * narrate-after-dialogue prompt tweaks * runpod status queries every 15 secs instead of 60 * default player character prompting when loading character card from talemate storage * better chunking during split tts generation * tweak narrate progress prompt * improvements to ensure_dialogue_format and tests * to pytest * prep 0.15.0 * update packages * dialogue cleanup fixes * fix openai default model name fix not being able to edit client due to name check * free form analyst was using wrong system prompt causing gpt-4 to actually generate json responses
2023-12-02 00:40:14 +02:00
<v-list-subheader class="text-uppercase" v-else>
Prep 0.19.0 (#67) * linting * improve prompt devtools: test changes, show more information * some more polish for the new promp devtools * up default conversation gen length to 128 * openai client tweaks, talemate sets max_tokens on gpt-3.5 generations * support new openai embeddings (and default to text-embedding-3-small) * ux polish for character sheet and character state ux * actor instructions * experiment using # for context / instructions * fix bug where regenerating history would mess up time stamps * remove trailing ] * prevent client ctx from being unset * fix issue where sometimes you'd need to delete a client twice for it to disappear * upgrade dependencies * set 0.19.0 * fix performance degradation caused by circular loading animation * remove coqui studio support * fix issue when switching from unsaved creative mode to loading a scene * third party client / agent support * edit dialogue examples through character / actor editor * remove "edit dialogue" action from editor - replaced by character actor instructions * different icon for delete * prompt adjustment for acting instructions * adhoc context generation for character attributes and details * add adhoc generation for character description * contextual generation tweaks * contextual generation for dialogue examples fix some formatting issues * contextual generation for world entries * prepopulate initial recen scenarios with demo scenes add experimental holodeck scenario * scene info scene experimental * assortment of fixes for holodeck improvements * more holodeck fixes * refactor holodeck instructions * rename holodeck to simulation suite * better scene status messages * add new gpt-3.5-turbo model, better json response coercion for older models * allow exclusion of characters when persisting based on world state * better error handling of world state response * better error handling of world state response * more simulation suite fixes * progress color * world state character name mapping support * if neither quote nor asterisk is in message default to quotes * fix rerun of new paraphrase op * sim suite ping that ensure's characters are not aware of sim * fixes for better character name assessment simulation suite can now give the player character a proper name * fix bug with new status notifications * sim suite adjustments and fixes and tuning * sim suite tweaks * impl scene restore from file * prompting tweaks for reinforcement messages and acting instructions * more tweaks * dialogue prompt tweaks for rerun + rewrite * fix bug with character entry / exit with narration * linting * simsuite screenshots * screenshots
2024-02-06 00:40:55 +02:00
<v-progress-circular indeterminate="disable-shrink" color="primary" size="20"></v-progress-circular> Waiting for config...
Prep 0.15.0 (#38) * send one request for assign all clients * tweak narrate-after-dialogue prompt * elevenlabs default to turbo model and make model id configurable * improve add client dialogue to be more robust * prompt for default character creation on character card loads * rename to model as to not conflict with pydantic * narrate after dialogue strip dialogue generation unless enabled via new option * starling and capybara-tess * narrate dialogue context increased * relabel tts agent to Voice, show agent label in status bar * dont expect LLM to handle * and " - most of them are not stable / consistent enough with it * starling template updated * if allow dialogue in narration is disabled just assume the entire string is a narration * reorganization the narrate after dialogue template * fix more issues with time passage calculations * move punkt download to agent init and silence * improved RAG during conversation if AI selected is enabled in conversation agent * prompt tweaks * deepseek, chromomaid-storytelling * relock * narrate-after-dialogue prompt tweaks * runpod status queries every 15 secs instead of 60 * default player character prompting when loading character card from talemate storage * better chunking during split tts generation * tweak narrate progress prompt * improvements to ensure_dialogue_format and tests * to pytest * prep 0.15.0 * update packages * dialogue cleanup fixes * fix openai default model name fix not being able to edit client due to name check * free form analyst was using wrong system prompt causing gpt-4 to actually generate json responses
2023-12-02 00:40:14 +02:00
</v-list-subheader>
Prep 0.16.0 (#40) * remove dbg message * more work to make clients and agents modular allow conversation and narrator to attempt to auto break AI repetition * application settings refactor setup third party api keys through application settings * runpod docs * fix wording * docs * improvements to auto-break-repetition functionality * more auto-break-repetition improvements * some cleanup to narrate on dialogue chance calculations * changing api keys via ux should now reflect to ux instantly. * memory agent / chromadb agent - wrap blocking functions calls in asyncio * clean up narrate progression prompt and function * turn off dedupe debug message for now * encourage the AI to break repetition as well * indicate if the current model is missing a LLM prompt template add prompt template to client modal fix a bunch of bad vue code * only show llm prompt when editing client * OpenHermes-2.5-neural-chat RpBird-Yi-34B * fix bug with auto rep break when no repetition was found * allow giving extra instructions to narrator agent * emit agents as needed, not constantly * fix a bunch of vue alerts * fix request-client-status event * remove undefined reference * log client / status emit * worldstate component track scene time * Tess Noromaid * fix narrate-character prompt context length overflow issues * disable worldstate refresh button while waiting for response * history timestamp moved to tooltip off of history button * fixes #39: using openai embeddings for chromadb tends to error * adjust conversation again default instructions * poetry lock * remove debug message * chromadb - agent status error if openai embeddings are selected in api key isn't set * prep 0.16.0
2023-12-08 22:57:44 +02:00
<div v-if="!loading && isConnected() && expanded && !configurationRequired() && appConfig !== null">
2023-05-05 00:50:02 +03:00
<v-list-item>
Prep 0.16.0 (#40) * remove dbg message * more work to make clients and agents modular allow conversation and narrator to attempt to auto break AI repetition * application settings refactor setup third party api keys through application settings * runpod docs * fix wording * docs * improvements to auto-break-repetition functionality * more auto-break-repetition improvements * some cleanup to narrate on dialogue chance calculations * changing api keys via ux should now reflect to ux instantly. * memory agent / chromadb agent - wrap blocking functions calls in asyncio * clean up narrate progression prompt and function * turn off dedupe debug message for now * encourage the AI to break repetition as well * indicate if the current model is missing a LLM prompt template add prompt template to client modal fix a bunch of bad vue code * only show llm prompt when editing client * OpenHermes-2.5-neural-chat RpBird-Yi-34B * fix bug with auto rep break when no repetition was found * allow giving extra instructions to narrator agent * emit agents as needed, not constantly * fix a bunch of vue alerts * fix request-client-status event * remove undefined reference * log client / status emit * worldstate component track scene time * Tess Noromaid * fix narrate-character prompt context length overflow issues * disable worldstate refresh button while waiting for response * history timestamp moved to tooltip off of history button * fixes #39: using openai embeddings for chromadb tends to error * adjust conversation again default instructions * poetry lock * remove debug message * chromadb - agent status error if openai embeddings are selected in api key isn't set * prep 0.16.0
2023-12-08 22:57:44 +02:00
<div class="mb-3">
2023-05-05 00:50:02 +03:00
<!-- Toggle buttons for switching between file upload and path input -->
<v-btn-toggle density="compact" class="mb-3" v-model="inputMethod" mandatory>
<v-btn value="file">
<v-icon>mdi-file-upload</v-icon>
</v-btn>
<v-btn value="path">
<v-icon>mdi-file-document-outline</v-icon>
</v-btn>
<v-btn value="creative">
<v-icon>mdi-palette-outline</v-icon>
</v-btn>
</v-btn-toggle>
<!-- File input for file upload -->
<div v-if="inputMethod === 'file' && !loading">
<v-file-input prepend-icon="" style="height:200px" density="compact" v-model="sceneFile" @change="loadScene" label="Upload a character card"
outlined accept="image/*" variant="solo-filled"></v-file-input>
</div>
<!-- Text field for path input -->
<v-autocomplete v-else-if="inputMethod === 'path' && !loading" v-model="sceneInput" :items="scenes"
label="Search scenes" outlined @update:search="updateSearchInput" item-title="label" item-value="path" :loading="sceneSearchLoading">
</v-autocomplete>
<!-- Upload/Load button -->
<v-btn v-if="!loading && inputMethod === 'path'" @click="loadScene" color="primary" block class="mb-3">
<v-icon left>mdi-folder</v-icon>
Load
</v-btn>
<v-btn v-else-if="!loading && inputMethod === 'creative'" @click="loadCreative" color="primary" block class="mb-3">
<v-icon left>mdi-palette-outline</v-icon>
Creative Mode
</v-btn>
Prep 0.16.0 (#40) * remove dbg message * more work to make clients and agents modular allow conversation and narrator to attempt to auto break AI repetition * application settings refactor setup third party api keys through application settings * runpod docs * fix wording * docs * improvements to auto-break-repetition functionality * more auto-break-repetition improvements * some cleanup to narrate on dialogue chance calculations * changing api keys via ux should now reflect to ux instantly. * memory agent / chromadb agent - wrap blocking functions calls in asyncio * clean up narrate progression prompt and function * turn off dedupe debug message for now * encourage the AI to break repetition as well * indicate if the current model is missing a LLM prompt template add prompt template to client modal fix a bunch of bad vue code * only show llm prompt when editing client * OpenHermes-2.5-neural-chat RpBird-Yi-34B * fix bug with auto rep break when no repetition was found * allow giving extra instructions to narrator agent * emit agents as needed, not constantly * fix a bunch of vue alerts * fix request-client-status event * remove undefined reference * log client / status emit * worldstate component track scene time * Tess Noromaid * fix narrate-character prompt context length overflow issues * disable worldstate refresh button while waiting for response * history timestamp moved to tooltip off of history button * fixes #39: using openai embeddings for chromadb tends to error * adjust conversation again default instructions * poetry lock * remove debug message * chromadb - agent status error if openai embeddings are selected in api key isn't set * prep 0.16.0
2023-12-08 22:57:44 +02:00
</div>
2023-05-05 00:50:02 +03:00
</v-list-item>
Prep 0.16.0 (#40) * remove dbg message * more work to make clients and agents modular allow conversation and narrator to attempt to auto break AI repetition * application settings refactor setup third party api keys through application settings * runpod docs * fix wording * docs * improvements to auto-break-repetition functionality * more auto-break-repetition improvements * some cleanup to narrate on dialogue chance calculations * changing api keys via ux should now reflect to ux instantly. * memory agent / chromadb agent - wrap blocking functions calls in asyncio * clean up narrate progression prompt and function * turn off dedupe debug message for now * encourage the AI to break repetition as well * indicate if the current model is missing a LLM prompt template add prompt template to client modal fix a bunch of bad vue code * only show llm prompt when editing client * OpenHermes-2.5-neural-chat RpBird-Yi-34B * fix bug with auto rep break when no repetition was found * allow giving extra instructions to narrator agent * emit agents as needed, not constantly * fix a bunch of vue alerts * fix request-client-status event * remove undefined reference * log client / status emit * worldstate component track scene time * Tess Noromaid * fix narrate-character prompt context length overflow issues * disable worldstate refresh button while waiting for response * history timestamp moved to tooltip off of history button * fixes #39: using openai embeddings for chromadb tends to error * adjust conversation again default instructions * poetry lock * remove debug message * chromadb - agent status error if openai embeddings are selected in api key isn't set * prep 0.16.0
2023-12-08 22:57:44 +02:00
</div>
2023-05-05 00:50:02 +03:00
<div v-else-if="configurationRequired()">
<v-alert type="warning" variant="tonal">You need to configure a Talemate client before you can load scenes.</v-alert>
</div>
Prep 0.15.0 (#38) * send one request for assign all clients * tweak narrate-after-dialogue prompt * elevenlabs default to turbo model and make model id configurable * improve add client dialogue to be more robust * prompt for default character creation on character card loads * rename to model as to not conflict with pydantic * narrate after dialogue strip dialogue generation unless enabled via new option * starling and capybara-tess * narrate dialogue context increased * relabel tts agent to Voice, show agent label in status bar * dont expect LLM to handle * and " - most of them are not stable / consistent enough with it * starling template updated * if allow dialogue in narration is disabled just assume the entire string is a narration * reorganization the narrate after dialogue template * fix more issues with time passage calculations * move punkt download to agent init and silence * improved RAG during conversation if AI selected is enabled in conversation agent * prompt tweaks * deepseek, chromomaid-storytelling * relock * narrate-after-dialogue prompt tweaks * runpod status queries every 15 secs instead of 60 * default player character prompting when loading character card from talemate storage * better chunking during split tts generation * tweak narrate progress prompt * improvements to ensure_dialogue_format and tests * to pytest * prep 0.15.0 * update packages * dialogue cleanup fixes * fix openai default model name fix not being able to edit client due to name check * free form analyst was using wrong system prompt causing gpt-4 to actually generate json responses
2023-12-02 00:40:14 +02:00
<DefaultCharacter ref="defaultCharacterModal" @save="loadScene" @cancel="loadCanceled"></DefaultCharacter>
2023-05-05 00:50:02 +03:00
</template>
<script>
Prep 0.15.0 (#38) * send one request for assign all clients * tweak narrate-after-dialogue prompt * elevenlabs default to turbo model and make model id configurable * improve add client dialogue to be more robust * prompt for default character creation on character card loads * rename to model as to not conflict with pydantic * narrate after dialogue strip dialogue generation unless enabled via new option * starling and capybara-tess * narrate dialogue context increased * relabel tts agent to Voice, show agent label in status bar * dont expect LLM to handle * and " - most of them are not stable / consistent enough with it * starling template updated * if allow dialogue in narration is disabled just assume the entire string is a narration * reorganization the narrate after dialogue template * fix more issues with time passage calculations * move punkt download to agent init and silence * improved RAG during conversation if AI selected is enabled in conversation agent * prompt tweaks * deepseek, chromomaid-storytelling * relock * narrate-after-dialogue prompt tweaks * runpod status queries every 15 secs instead of 60 * default player character prompting when loading character card from talemate storage * better chunking during split tts generation * tweak narrate progress prompt * improvements to ensure_dialogue_format and tests * to pytest * prep 0.15.0 * update packages * dialogue cleanup fixes * fix openai default model name fix not being able to edit client due to name check * free form analyst was using wrong system prompt causing gpt-4 to actually generate json responses
2023-12-02 00:40:14 +02:00
import DefaultCharacter from './DefaultCharacter.vue';
2023-05-05 00:50:02 +03:00
export default {
name: 'LoadScene',
Prep 0.15.0 (#38) * send one request for assign all clients * tweak narrate-after-dialogue prompt * elevenlabs default to turbo model and make model id configurable * improve add client dialogue to be more robust * prompt for default character creation on character card loads * rename to model as to not conflict with pydantic * narrate after dialogue strip dialogue generation unless enabled via new option * starling and capybara-tess * narrate dialogue context increased * relabel tts agent to Voice, show agent label in status bar * dont expect LLM to handle * and " - most of them are not stable / consistent enough with it * starling template updated * if allow dialogue in narration is disabled just assume the entire string is a narration * reorganization the narrate after dialogue template * fix more issues with time passage calculations * move punkt download to agent init and silence * improved RAG during conversation if AI selected is enabled in conversation agent * prompt tweaks * deepseek, chromomaid-storytelling * relock * narrate-after-dialogue prompt tweaks * runpod status queries every 15 secs instead of 60 * default player character prompting when loading character card from talemate storage * better chunking during split tts generation * tweak narrate progress prompt * improvements to ensure_dialogue_format and tests * to pytest * prep 0.15.0 * update packages * dialogue cleanup fixes * fix openai default model name fix not being able to edit client due to name check * free form analyst was using wrong system prompt causing gpt-4 to actually generate json responses
2023-12-02 00:40:14 +02:00
components: {
DefaultCharacter,
},
2023-05-05 00:50:02 +03:00
data() {
return {
loading: false,
inputMethod: 'path',
sceneFile: [],
sceneInput: '',
scenes: [],
sceneSearchInput: null,
sceneSearchLoading: false,
Prep 0.12.0 (#26) * no " or * just treat as spoken words * chromadb perist to db * collect name should contain embedding so switching between chromadb configurations doesn't brick your scenes * fix save-as long term memory transfer * add chroma * director agent refactor * tweak director command, prompt reset, ux display * tweak director message ux * allow clearing of prompt log * remove auto adding of quotes if neither quote or * are present * command to reset long term memory for the scene * improve summarization template as it would cause some llms to add extra details * rebuilding history will now also rebuild long term memory * direct scene template * fix scene time reset * dialogue template tweaks * better dialog format fixing * some dialogue template adjustments * adjust default values of director agent * keep track of scene saved/unsaved status and confirm loading a different scene if current scene is unsaved * prompt fixes * remove the collection on recommitting the seen to memory, as the embeddings may have changed * change to the official python api for the openai client and make it async * prompt tweaks * world state prompt parsing fixes * improve handling of json responses * 0 seconds ago changed to moments ago * move memory context closer to scene * token counts for openai client * narrator agent option: narrate passage of time * gitignore * remove memory id * refactor world state with persistence to chromadb (wip) * remove world state update instructions * dont display blank emotion in world state * openai gpt-4 turbo support * conversation agent extra instructions * track prompt response times * Yi and UtopiaXL * long term memory retrieval improvements during conversations * narrate scene tweaks * conversation ltm augment tweaks * hide subconfig if parent config isnt enabled * ai assisted memory recall during conversation default to off * openai json_object coersion only on model that supports it openai client emit prompt processing time * 0.12.0 * remove prompt number from prompt debug list * add prompt number back in but shift it to the upper row * narrate time passage hard content limit restriction for now as gpt-4 would just write a whole chapter. * relock
2023-11-10 22:45:50 +02:00
sceneSaved: null,
2023-05-05 00:50:02 +03:00
expanded: true,
Prep 0.15.0 (#38) * send one request for assign all clients * tweak narrate-after-dialogue prompt * elevenlabs default to turbo model and make model id configurable * improve add client dialogue to be more robust * prompt for default character creation on character card loads * rename to model as to not conflict with pydantic * narrate after dialogue strip dialogue generation unless enabled via new option * starling and capybara-tess * narrate dialogue context increased * relabel tts agent to Voice, show agent label in status bar * dont expect LLM to handle * and " - most of them are not stable / consistent enough with it * starling template updated * if allow dialogue in narration is disabled just assume the entire string is a narration * reorganization the narrate after dialogue template * fix more issues with time passage calculations * move punkt download to agent init and silence * improved RAG during conversation if AI selected is enabled in conversation agent * prompt tweaks * deepseek, chromomaid-storytelling * relock * narrate-after-dialogue prompt tweaks * runpod status queries every 15 secs instead of 60 * default player character prompting when loading character card from talemate storage * better chunking during split tts generation * tweak narrate progress prompt * improvements to ensure_dialogue_format and tests * to pytest * prep 0.15.0 * update packages * dialogue cleanup fixes * fix openai default model name fix not being able to edit client due to name check * free form analyst was using wrong system prompt causing gpt-4 to actually generate json responses
2023-12-02 00:40:14 +02:00
appConfig: null, // Store the app configuration
2023-05-05 00:50:02 +03:00
}
},
Prep 0.16.0 (#40) * remove dbg message * more work to make clients and agents modular allow conversation and narrator to attempt to auto break AI repetition * application settings refactor setup third party api keys through application settings * runpod docs * fix wording * docs * improvements to auto-break-repetition functionality * more auto-break-repetition improvements * some cleanup to narrate on dialogue chance calculations * changing api keys via ux should now reflect to ux instantly. * memory agent / chromadb agent - wrap blocking functions calls in asyncio * clean up narrate progression prompt and function * turn off dedupe debug message for now * encourage the AI to break repetition as well * indicate if the current model is missing a LLM prompt template add prompt template to client modal fix a bunch of bad vue code * only show llm prompt when editing client * OpenHermes-2.5-neural-chat RpBird-Yi-34B * fix bug with auto rep break when no repetition was found * allow giving extra instructions to narrator agent * emit agents as needed, not constantly * fix a bunch of vue alerts * fix request-client-status event * remove undefined reference * log client / status emit * worldstate component track scene time * Tess Noromaid * fix narrate-character prompt context length overflow issues * disable worldstate refresh button while waiting for response * history timestamp moved to tooltip off of history button * fixes #39: using openai embeddings for chromadb tends to error * adjust conversation again default instructions * poetry lock * remove debug message * chromadb - agent status error if openai embeddings are selected in api key isn't set * prep 0.16.0
2023-12-08 22:57:44 +02:00
emits: {
loading: null,
},
2023-05-05 00:50:02 +03:00
inject: ['getWebsocket', 'registerMessageHandler', 'isConnected', 'configurationRequired'],
methods: {
Prep 0.15.0 (#38) * send one request for assign all clients * tweak narrate-after-dialogue prompt * elevenlabs default to turbo model and make model id configurable * improve add client dialogue to be more robust * prompt for default character creation on character card loads * rename to model as to not conflict with pydantic * narrate after dialogue strip dialogue generation unless enabled via new option * starling and capybara-tess * narrate dialogue context increased * relabel tts agent to Voice, show agent label in status bar * dont expect LLM to handle * and " - most of them are not stable / consistent enough with it * starling template updated * if allow dialogue in narration is disabled just assume the entire string is a narration * reorganization the narrate after dialogue template * fix more issues with time passage calculations * move punkt download to agent init and silence * improved RAG during conversation if AI selected is enabled in conversation agent * prompt tweaks * deepseek, chromomaid-storytelling * relock * narrate-after-dialogue prompt tweaks * runpod status queries every 15 secs instead of 60 * default player character prompting when loading character card from talemate storage * better chunking during split tts generation * tweak narrate progress prompt * improvements to ensure_dialogue_format and tests * to pytest * prep 0.15.0 * update packages * dialogue cleanup fixes * fix openai default model name fix not being able to edit client due to name check * free form analyst was using wrong system prompt causing gpt-4 to actually generate json responses
2023-12-02 00:40:14 +02:00
// Method to show the DefaultCharacter modal
showDefaultCharacterModal() {
this.$refs.defaultCharacterModal.open();
},
2023-05-05 00:50:02 +03:00
toggle() {
this.expanded = !this.expanded;
},
updateSearchInput(val) {
this.sceneSearchInput = val;
clearTimeout(this.searchTimeout); // Clear the previous timeout
this.searchTimeout = setTimeout(this.fetchScenes, 300); // Start a new timeout
},
fetchScenes() {
if (!this.sceneSearchInput)
return
this.sceneSearchLoading = true;
console.log("Fetching scenes", this.sceneSearchInput)
this.getWebsocket().send(JSON.stringify({ type: 'request_scenes_list', query: this.sceneSearchInput }));
},
loadCreative() {
if(this.sceneSaved === false) {
if(!confirm("The current scene is not saved. Are you sure you want to load a new scene?")) {
return;
}
}
2023-05-05 00:50:02 +03:00
this.loading = true;
this.getWebsocket().send(JSON.stringify({ type: 'load_scene', file_path: "environment:creative" }));
},
Prep 0.15.0 (#38) * send one request for assign all clients * tweak narrate-after-dialogue prompt * elevenlabs default to turbo model and make model id configurable * improve add client dialogue to be more robust * prompt for default character creation on character card loads * rename to model as to not conflict with pydantic * narrate after dialogue strip dialogue generation unless enabled via new option * starling and capybara-tess * narrate dialogue context increased * relabel tts agent to Voice, show agent label in status bar * dont expect LLM to handle * and " - most of them are not stable / consistent enough with it * starling template updated * if allow dialogue in narration is disabled just assume the entire string is a narration * reorganization the narrate after dialogue template * fix more issues with time passage calculations * move punkt download to agent init and silence * improved RAG during conversation if AI selected is enabled in conversation agent * prompt tweaks * deepseek, chromomaid-storytelling * relock * narrate-after-dialogue prompt tweaks * runpod status queries every 15 secs instead of 60 * default player character prompting when loading character card from talemate storage * better chunking during split tts generation * tweak narrate progress prompt * improvements to ensure_dialogue_format and tests * to pytest * prep 0.15.0 * update packages * dialogue cleanup fixes * fix openai default model name fix not being able to edit client due to name check * free form analyst was using wrong system prompt causing gpt-4 to actually generate json responses
2023-12-02 00:40:14 +02:00
loadCanceled() {
console.log("Load canceled");
this.loading = false;
this.sceneFile = [];
},
2023-05-05 00:50:02 +03:00
loadScene() {
Prep 0.12.0 (#26) * no " or * just treat as spoken words * chromadb perist to db * collect name should contain embedding so switching between chromadb configurations doesn't brick your scenes * fix save-as long term memory transfer * add chroma * director agent refactor * tweak director command, prompt reset, ux display * tweak director message ux * allow clearing of prompt log * remove auto adding of quotes if neither quote or * are present * command to reset long term memory for the scene * improve summarization template as it would cause some llms to add extra details * rebuilding history will now also rebuild long term memory * direct scene template * fix scene time reset * dialogue template tweaks * better dialog format fixing * some dialogue template adjustments * adjust default values of director agent * keep track of scene saved/unsaved status and confirm loading a different scene if current scene is unsaved * prompt fixes * remove the collection on recommitting the seen to memory, as the embeddings may have changed * change to the official python api for the openai client and make it async * prompt tweaks * world state prompt parsing fixes * improve handling of json responses * 0 seconds ago changed to moments ago * move memory context closer to scene * token counts for openai client * narrator agent option: narrate passage of time * gitignore * remove memory id * refactor world state with persistence to chromadb (wip) * remove world state update instructions * dont display blank emotion in world state * openai gpt-4 turbo support * conversation agent extra instructions * track prompt response times * Yi and UtopiaXL * long term memory retrieval improvements during conversations * narrate scene tweaks * conversation ltm augment tweaks * hide subconfig if parent config isnt enabled * ai assisted memory recall during conversation default to off * openai json_object coersion only on model that supports it openai client emit prompt processing time * 0.12.0 * remove prompt number from prompt debug list * add prompt number back in but shift it to the upper row * narrate time passage hard content limit restriction for now as gpt-4 would just write a whole chapter. * relock
2023-11-10 22:45:50 +02:00
if(this.sceneSaved === false) {
if(!confirm("The current scene is not saved. Are you sure you want to load a new scene?")) {
return;
}
}
Prep 0.15.0 (#38) * send one request for assign all clients * tweak narrate-after-dialogue prompt * elevenlabs default to turbo model and make model id configurable * improve add client dialogue to be more robust * prompt for default character creation on character card loads * rename to model as to not conflict with pydantic * narrate after dialogue strip dialogue generation unless enabled via new option * starling and capybara-tess * narrate dialogue context increased * relabel tts agent to Voice, show agent label in status bar * dont expect LLM to handle * and " - most of them are not stable / consistent enough with it * starling template updated * if allow dialogue in narration is disabled just assume the entire string is a narration * reorganization the narrate after dialogue template * fix more issues with time passage calculations * move punkt download to agent init and silence * improved RAG during conversation if AI selected is enabled in conversation agent * prompt tweaks * deepseek, chromomaid-storytelling * relock * narrate-after-dialogue prompt tweaks * runpod status queries every 15 secs instead of 60 * default player character prompting when loading character card from talemate storage * better chunking during split tts generation * tweak narrate progress prompt * improvements to ensure_dialogue_format and tests * to pytest * prep 0.15.0 * update packages * dialogue cleanup fixes * fix openai default model name fix not being able to edit client due to name check * free form analyst was using wrong system prompt causing gpt-4 to actually generate json responses
2023-12-02 00:40:14 +02:00
this.sceneSaved = null;
2023-05-05 00:50:02 +03:00
if (this.inputMethod === 'file' && this.sceneFile.length > 0) { // Check if the input method is "file" and there is at least one file
Prep 0.15.0 (#38) * send one request for assign all clients * tweak narrate-after-dialogue prompt * elevenlabs default to turbo model and make model id configurable * improve add client dialogue to be more robust * prompt for default character creation on character card loads * rename to model as to not conflict with pydantic * narrate after dialogue strip dialogue generation unless enabled via new option * starling and capybara-tess * narrate dialogue context increased * relabel tts agent to Voice, show agent label in status bar * dont expect LLM to handle * and " - most of them are not stable / consistent enough with it * starling template updated * if allow dialogue in narration is disabled just assume the entire string is a narration * reorganization the narrate after dialogue template * fix more issues with time passage calculations * move punkt download to agent init and silence * improved RAG during conversation if AI selected is enabled in conversation agent * prompt tweaks * deepseek, chromomaid-storytelling * relock * narrate-after-dialogue prompt tweaks * runpod status queries every 15 secs instead of 60 * default player character prompting when loading character card from talemate storage * better chunking during split tts generation * tweak narrate progress prompt * improvements to ensure_dialogue_format and tests * to pytest * prep 0.15.0 * update packages * dialogue cleanup fixes * fix openai default model name fix not being able to edit client due to name check * free form analyst was using wrong system prompt causing gpt-4 to actually generate json responses
2023-12-02 00:40:14 +02:00
// if file is image check if default character is set
if(this.sceneFile[0].type.startsWith("image/")) {
if(!this.appConfig.game.default_player_character.name) {
this.showDefaultCharacterModal();
return;
}
}
this.loading = true;
2023-05-05 00:50:02 +03:00
// Convert the uploaded file to base64
const reader = new FileReader();
reader.readAsDataURL(this.sceneFile[0]); // Access the first file in the array
reader.onload = () => {
//const base64File = reader.result.split(',')[1];
Prep 0.15.0 (#38) * send one request for assign all clients * tweak narrate-after-dialogue prompt * elevenlabs default to turbo model and make model id configurable * improve add client dialogue to be more robust * prompt for default character creation on character card loads * rename to model as to not conflict with pydantic * narrate after dialogue strip dialogue generation unless enabled via new option * starling and capybara-tess * narrate dialogue context increased * relabel tts agent to Voice, show agent label in status bar * dont expect LLM to handle * and " - most of them are not stable / consistent enough with it * starling template updated * if allow dialogue in narration is disabled just assume the entire string is a narration * reorganization the narrate after dialogue template * fix more issues with time passage calculations * move punkt download to agent init and silence * improved RAG during conversation if AI selected is enabled in conversation agent * prompt tweaks * deepseek, chromomaid-storytelling * relock * narrate-after-dialogue prompt tweaks * runpod status queries every 15 secs instead of 60 * default player character prompting when loading character card from talemate storage * better chunking during split tts generation * tweak narrate progress prompt * improvements to ensure_dialogue_format and tests * to pytest * prep 0.15.0 * update packages * dialogue cleanup fixes * fix openai default model name fix not being able to edit client due to name check * free form analyst was using wrong system prompt causing gpt-4 to actually generate json responses
2023-12-02 00:40:14 +02:00
this.$emit("loading", true)
2023-05-05 00:50:02 +03:00
this.getWebsocket().send(JSON.stringify({
type: 'load_scene',
scene_data: reader.result,
filename: this.sceneFile[0].name,
}));
this.sceneFile = [];
};
} else if (this.inputMethod === 'path' && this.sceneInput) { // Check if the input method is "path" and the scene input is not empty
Prep 0.15.0 (#38) * send one request for assign all clients * tweak narrate-after-dialogue prompt * elevenlabs default to turbo model and make model id configurable * improve add client dialogue to be more robust * prompt for default character creation on character card loads * rename to model as to not conflict with pydantic * narrate after dialogue strip dialogue generation unless enabled via new option * starling and capybara-tess * narrate dialogue context increased * relabel tts agent to Voice, show agent label in status bar * dont expect LLM to handle * and " - most of them are not stable / consistent enough with it * starling template updated * if allow dialogue in narration is disabled just assume the entire string is a narration * reorganization the narrate after dialogue template * fix more issues with time passage calculations * move punkt download to agent init and silence * improved RAG during conversation if AI selected is enabled in conversation agent * prompt tweaks * deepseek, chromomaid-storytelling * relock * narrate-after-dialogue prompt tweaks * runpod status queries every 15 secs instead of 60 * default player character prompting when loading character card from talemate storage * better chunking during split tts generation * tweak narrate progress prompt * improvements to ensure_dialogue_format and tests * to pytest * prep 0.15.0 * update packages * dialogue cleanup fixes * fix openai default model name fix not being able to edit client due to name check * free form analyst was using wrong system prompt causing gpt-4 to actually generate json responses
2023-12-02 00:40:14 +02:00
// if path ends with .png/jpg/webp check if default character is set
if(this.sceneInput.endsWith(".png") || this.sceneInput.endsWith(".jpg") || this.sceneInput.endsWith(".webp")) {
if(!this.appConfig.game.default_player_character.name) {
this.showDefaultCharacterModal();
return;
}
}
this.loading = true;
this.$emit("loading", true)
2023-05-05 00:50:02 +03:00
this.getWebsocket().send(JSON.stringify({ type: 'load_scene', file_path: this.sceneInput }));
this.sceneInput = '';
}
},
Prep 0.18.0 (#58) * vuetify update recent saves * use placeholder instead of prefilling text * fix scene loading when no coverage image is set * improve summarize and pin response quality * summarization use previous entries as informative context * fixes #49: auto save indicator missleading * regenerate with instructions * allow resetting of state reinforcement * creative tools: introduce new character creative tools: introduce passive character as active character * character creation adjustments * no longer needed * activate, deactivate characters (work in progress) * worldstate manager show inactive characters * allow setting of llm prompt template from ux reorganize llm prompt template directory for easier local overriding support a more sane way to write llm prompt templates * determine prompt template from huggingface * ignore user overrides * fix issue with removing narrator messages * summarization agent config for prev entry inclusion agent config attribute notes * client code clean up to allow modularity of clients + generic openai compatible api client * more client cleanup * remove debug msg, step size for ctx upped to 1024 * wip on stepped history summarization * summarization prompt fixes * include time message for hisory context pushed in scene.context_history * add / remove characters toggle narration of via ctrl * fix pydantic namespace warning fix client emit after reconfig * set memory ids on character detail entries * deal with chromadb race condition (maybe) * activate / deactivate characters from creative editor switch creative editor to edit characters through world state manager * set 0.18.0 * relock dependencies * openai client shortcut to set api key if not set * set error_action to null * if scene has just started provide intro for extra context in is_prsent and is_leaving queries * nice error if determine template via huggingface doesn't work * fix issue where regenerate would sometimes pick the wrong npc if there are multiple characters talking * add new openai models * default to gpt-4-turbo-preview
2024-01-26 12:42:21 +02:00
loadJsonSceneFromPath(path) {
this.loading = true;
this.$emit("loading", true)
this.getWebsocket().send(JSON.stringify({ type: 'load_scene', file_path: path }));
},
2023-05-05 00:50:02 +03:00
handleMessage(data) {
Prep 0.15.0 (#38) * send one request for assign all clients * tweak narrate-after-dialogue prompt * elevenlabs default to turbo model and make model id configurable * improve add client dialogue to be more robust * prompt for default character creation on character card loads * rename to model as to not conflict with pydantic * narrate after dialogue strip dialogue generation unless enabled via new option * starling and capybara-tess * narrate dialogue context increased * relabel tts agent to Voice, show agent label in status bar * dont expect LLM to handle * and " - most of them are not stable / consistent enough with it * starling template updated * if allow dialogue in narration is disabled just assume the entire string is a narration * reorganization the narrate after dialogue template * fix more issues with time passage calculations * move punkt download to agent init and silence * improved RAG during conversation if AI selected is enabled in conversation agent * prompt tweaks * deepseek, chromomaid-storytelling * relock * narrate-after-dialogue prompt tweaks * runpod status queries every 15 secs instead of 60 * default player character prompting when loading character card from talemate storage * better chunking during split tts generation * tweak narrate progress prompt * improvements to ensure_dialogue_format and tests * to pytest * prep 0.15.0 * update packages * dialogue cleanup fixes * fix openai default model name fix not being able to edit client due to name check * free form analyst was using wrong system prompt causing gpt-4 to actually generate json responses
2023-12-02 00:40:14 +02:00
// Handle app configuration
if (data.type === 'app_config') {
this.appConfig = data.data;
console.log("App config", this.appConfig);
}
2023-05-05 00:50:02 +03:00
// Scene loaded
if (data.type === "system") {
if (data.id === 'scene.loaded') {
this.loading = false;
this.expanded = false;
}
}
// Handle scenes_list message type
if (data.type === 'scenes_list') {
this.scenes = data.data;
this.sceneSearchLoading = false;
return;
}
Prep 0.12.0 (#26) * no " or * just treat as spoken words * chromadb perist to db * collect name should contain embedding so switching between chromadb configurations doesn't brick your scenes * fix save-as long term memory transfer * add chroma * director agent refactor * tweak director command, prompt reset, ux display * tweak director message ux * allow clearing of prompt log * remove auto adding of quotes if neither quote or * are present * command to reset long term memory for the scene * improve summarization template as it would cause some llms to add extra details * rebuilding history will now also rebuild long term memory * direct scene template * fix scene time reset * dialogue template tweaks * better dialog format fixing * some dialogue template adjustments * adjust default values of director agent * keep track of scene saved/unsaved status and confirm loading a different scene if current scene is unsaved * prompt fixes * remove the collection on recommitting the seen to memory, as the embeddings may have changed * change to the official python api for the openai client and make it async * prompt tweaks * world state prompt parsing fixes * improve handling of json responses * 0 seconds ago changed to moments ago * move memory context closer to scene * token counts for openai client * narrator agent option: narrate passage of time * gitignore * remove memory id * refactor world state with persistence to chromadb (wip) * remove world state update instructions * dont display blank emotion in world state * openai gpt-4 turbo support * conversation agent extra instructions * track prompt response times * Yi and UtopiaXL * long term memory retrieval improvements during conversations * narrate scene tweaks * conversation ltm augment tweaks * hide subconfig if parent config isnt enabled * ai assisted memory recall during conversation default to off * openai json_object coersion only on model that supports it openai client emit prompt processing time * 0.12.0 * remove prompt number from prompt debug list * add prompt number back in but shift it to the upper row * narrate time passage hard content limit restriction for now as gpt-4 would just write a whole chapter. * relock
2023-11-10 22:45:50 +02:00
// Handle scene status
if (data.type == "scene_status") {
this.sceneSaved = data.data.saved;
return;
}
Prep 0.15.0 (#38) * send one request for assign all clients * tweak narrate-after-dialogue prompt * elevenlabs default to turbo model and make model id configurable * improve add client dialogue to be more robust * prompt for default character creation on character card loads * rename to model as to not conflict with pydantic * narrate after dialogue strip dialogue generation unless enabled via new option * starling and capybara-tess * narrate dialogue context increased * relabel tts agent to Voice, show agent label in status bar * dont expect LLM to handle * and " - most of them are not stable / consistent enough with it * starling template updated * if allow dialogue in narration is disabled just assume the entire string is a narration * reorganization the narrate after dialogue template * fix more issues with time passage calculations * move punkt download to agent init and silence * improved RAG during conversation if AI selected is enabled in conversation agent * prompt tweaks * deepseek, chromomaid-storytelling * relock * narrate-after-dialogue prompt tweaks * runpod status queries every 15 secs instead of 60 * default player character prompting when loading character card from talemate storage * better chunking during split tts generation * tweak narrate progress prompt * improvements to ensure_dialogue_format and tests * to pytest * prep 0.15.0 * update packages * dialogue cleanup fixes * fix openai default model name fix not being able to edit client due to name check * free form analyst was using wrong system prompt causing gpt-4 to actually generate json responses
2023-12-02 00:40:14 +02:00
},
2023-05-05 00:50:02 +03:00
},
created() {
this.registerMessageHandler(this.handleMessage);
Prep 0.15.0 (#38) * send one request for assign all clients * tweak narrate-after-dialogue prompt * elevenlabs default to turbo model and make model id configurable * improve add client dialogue to be more robust * prompt for default character creation on character card loads * rename to model as to not conflict with pydantic * narrate after dialogue strip dialogue generation unless enabled via new option * starling and capybara-tess * narrate dialogue context increased * relabel tts agent to Voice, show agent label in status bar * dont expect LLM to handle * and " - most of them are not stable / consistent enough with it * starling template updated * if allow dialogue in narration is disabled just assume the entire string is a narration * reorganization the narrate after dialogue template * fix more issues with time passage calculations * move punkt download to agent init and silence * improved RAG during conversation if AI selected is enabled in conversation agent * prompt tweaks * deepseek, chromomaid-storytelling * relock * narrate-after-dialogue prompt tweaks * runpod status queries every 15 secs instead of 60 * default player character prompting when loading character card from talemate storage * better chunking during split tts generation * tweak narrate progress prompt * improvements to ensure_dialogue_format and tests * to pytest * prep 0.15.0 * update packages * dialogue cleanup fixes * fix openai default model name fix not being able to edit client due to name check * free form analyst was using wrong system prompt causing gpt-4 to actually generate json responses
2023-12-02 00:40:14 +02:00
//this.getWebsocket().send(JSON.stringify({ type: 'request_config' })); // Request the current app configuration
2023-05-05 00:50:02 +03:00
},
mounted() {
console.log("Websocket", this.getWebsocket()); // Check if websocket is available
}
}
</script>
<style scoped>
/* styles for LoadScene component */
</style>