- Can you link your lorebook file that you are trying to add. Using rentry links needs you to add a metadata to access the /raw now. Alternatively, you could use this method of creating the lorebook.
- IIRC only the lorebook of the main thread character is used.
- Yes, only the main thread character's custom code is used in the thread. You could add a trigger to check the name of the AI that sent the message to run a different custom code within the thread to have multiple characters use different custom codes.
You can dynamically create the options with the following:
selectOpts
[Dd1_data.getPropertyKeys.map(a => `<option value="${Dd1_data[a]}">${a}</option>`).join('')]
output
[selectEl.value]
Dd1_data
Option1 = selected option 1
Option2 = selected option 2
Then on the HTML
<select id="selectEl" onchange="update(out)">[selectOpts]</select>
<p id="out">[output]</p>
A possible problem would be using just the update()
instead of specifying an element to update like update(out)
, in which it would re-display the [selectOpts]
in which it would reset the selection.
Here is also a similar solution to a similar problem.
Lorebooks are text files and not web pages. The URL should end with .txt
or is returning a text file for it to work. You could use a Perchance Generator as a Lorebook, see this guide.
Hi there, I've modified your code and here is the working code. Just specify your API Key and User ID on the top variables, then upon loading the custom code, select the voice you want to use.
On your output, you should select it first, then use the selected item.:
output
[Lpheno = Furlength.selectOne] ... [pheno]
pheno
[Lpheno.pheno]-furred
On the 'gear' icon on the top left of each editor, you can disable the 'IntelliSense'/AI prediction for both editors as well as the AI bug checking. You can also enable and disable it through a short cut ctrl+shift+space
to toggle. If you want the AI to predict on command, you can use ctrl+space
to run it.
Btw, it seems to load/hang a little bit each time the button to randomize is clicked, so I've made an adjustment with the code, so it loads and selects an item faster, so just change the following lines:
getTxtList(url) =>
if (!url.endsWith('.txt')) return;
let fileName = url.split('/file/')[1].replace('.txt', '');
if (!root[fileName]) {
const request = new XMLHttpRequest();
request.open("GET", url, false);
request.send(null);
let list = request.responseText
list = list.split(/[\n\r]/).filter(a => a)
// changes
root[fileName] = {}
let maxPerSubset = 5000
for(i = 0; i < Math.ceil(list.length / maxPerSubset); i++) {
root[fileName][i] = [... list.slice((0 + i) * maxPerSubset, (1 + i) * maxPerSubset)]
}
}
return root[fileName][Object.keys(root[fileName]).selectOne] // change
Most of the code that runs on the /ai-character-chat is on the page itself. You can click the 'edit' button on the top right and it would open up the code panels. On the HTML panel is most of the code while there are also some on the Lists Panel. It is also mainly based on the OpenCharacters but with some tweaks and changes.
If you are talking about how the AI model is set up on the server, I'm not sure, but I'll ping the Perchance Dev for insights.
Might be because it is running a JavaScript script. Try to disable it first, reload the page, then run the /print
on the field. It should show something like this after running the /print
:
Then you can click select all, then right click the window -> print:
By creating a backup, I mean something like the version control on perchance in which every save creates a version of the previous generator without the changes. If you are editing with the collab link, and you aren't the owner/creator of the page, there is no 'backup' icon on the top right, meaning the changes aren't saved in a version although the changes are saved on the generator, thus I think it requires the owner to manually save to create a backup version, unless I'm mistaken.
As for the edit password, I've attached an image on my previous comment of the example prompt that shows up when I click the "Collab Link" on another generator that I don't own. For example, on this one, I clicked the "Collab Link" on /beautiful-people and it shows this prompt:
Also, when I previously created a collab link, it asked me for an edit password, but now I don't see it, which is why I provided the Password: hello
previously since I've set it to that, and checking with you if there should be an edit password if you don't have the collab link.
I'm assuming that you have it set up on a 'GET' API, I think the solution might be to have the local server return the content type specifically e.g.
text/plain
for .txt files, thenimage/png
for image files?