VioneT

joined 2 years ago
MODERATOR OF
[–] [email protected] 1 points 10 hours ago

I had made the assumption that because I can get local PNG files, I can also get local TXT files. That’s apparently not the case.

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, then image/png for image files?

[–] [email protected] 1 points 11 hours ago* (last edited 11 hours ago) (2 children)
  1. 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.
  2. IIRC only the lorebook of the main thread character is used.
  3. 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.
[–] [email protected] 1 points 11 hours ago* (last edited 11 hours ago)

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.

[–] [email protected] 1 points 1 day ago

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.

[–] [email protected] 1 points 3 days ago (1 children)

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.

[–] [email protected] 3 points 3 days ago (1 children)

On your output, you should select it first, then use the selected item.:

output
  [Lpheno = Furlength.selectOne] ... [pheno]

pheno
  [Lpheno.pheno]-furred
[–] [email protected] 2 points 4 days ago* (last edited 4 days ago) (1 children)

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.

[–] [email protected] 1 points 6 days ago

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
[–] [email protected] 3 points 6 days ago (1 children)

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.

[–] [email protected] 2 points 6 days ago
[–] [email protected] 2 points 6 days ago

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:

[–] [email protected] 1 points 6 days ago

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.

4
submitted 1 month ago* (last edited 1 month ago) by [email protected] to c/[email protected]
 

Test your prompts in the different styles with ease! You can also import your own {import:styles} to test.

https://perchance.org/multiple-style-tester

 

Welcome to the Perchance Community!

Perchance.org is a platform for sharing and creating random text generators.

This Lemmy community is for:

  • Asking for help with problems, issues, or requests about generators in Perchance
  • Sharing and showcasing your created generators, templates, plugins, or pages in Perchance
  • Starting friendly discussions about topics related to Perchance
If it is your first time in using Lemmy, please check out this message from Lemmy.World and the Support Page from Lemmy.World to get started on using Lemmy.

Posting from Mastodon

Feel free to checkout this post to know how to post in this Lemmy Community through Mastodon.

Other Community Links

Rules

Here are some rules in this community:

  • Please follow the lemmy.world instance rules.
  • Be kind and friendly.
    • Please be kind to others on this community (and also in general), and remember that for many people Perchance is their first experience with coding. We have members for whom English is not their first language, so please be take that into account too :)
  • Be thankful to those who try to help you.
    • If you ask a question and someone has made an effort to help you out, please remember to be thankful! Even if they don't manage to help you solve your problem - remember that they're spending time out of their day to try to help a stranger :)
  • Only post about stuff related to perchance.
    • Please only post about perchance related stuff like generators on it, bugs, and the site.
  • Search through the Community Before Posting
    • Please Search through the Community Posts here (and on Reddit) before posting to see if what you will post has similar post/already been posted.

Posting

Here are some optional tags to add in your title to categorize the posts. These are merely tags, you still need to title your post effectively.

  • [Bug] - if you think you find any bug in Perchance, use this tag.
  • [Question] or [Help] - this is to denote that your post is a question or requesting for help
  • [Suggestion] - for any suggestions in Perchance
  • [Feedback] or [Appreciation] - for any feedback or appreciation to any generator or to Perchance in general.
  • [{Generator Category}] - Used to share any generator with the specified category
    • Text, Image, Template, Hub, Plugin, Preprocessor, Community/RP, Game, Experiment, Useful Generator
  • [Fluff] or [Non-Generator] - Non-generator posts but about Perchance
  • [Tutorial] or [Guide] - for any Perchance related tutorials or guides to help others

AI Plugins Posts

Here is a FAQ for the AI tools in Perchance.

We would like to ask to refrain from posting here needing help specifically with prompting/achieving certain results with the AI plugins (text-to-image-plugin and ai-text-plugin) e.g. "What is the good prompt for X?", "How to achieve X with Y generator?"

There are guides, tutorials, and resources on the internet that can be applied when prompting in the AI tools in Perchance.

We will still be helping/answering questions about the plugins as long as it is related to building generators with them.

If you need help in prompting, please post on the 'sister' forum at Casual Perchance

Getting Started with Perchance

To get started with Perchance, check out the Perchance Tutorial or the Beginner Tutorial at the Perchance Hub Learn Tab to get to know the website.

Asking for help

Feel free to ask for help but please check out these tips on searching for an answer:

  • Check the following pages, to see if your question has already been answered or talked about or a plugin has been made for it. We recommend using the browser's search function (ctrl+f) and searching for similar keywords to your question/problem.
  • If you didn't find anything about your problem there, feel free to search through the posts/articles here:
  • If you can't still find anything related to your problem, feel free to post a thread here.
    • Please title your post effectively.
    • Please provide a link to your generator with your attempts of solving the problem.
    • Try to explain what you want it to do and what example output it should be doing.
view more: next ›