See edit at the bottom
Hi there, I know a little about LLM APIs. When you send requests, you can usually control advanced optional parameters like Temperature, Frequency Penalty, Presence Penalty, Top P, Top K which are a huge part of tweaking how the AI responds. The first three I listed there are particularly helpful for breaking the AI out of repetitiveness, which is something I’ve seen people here and on reddit complaining about.
I was curious why the AI Character Chat doesn’t let you tweak at least temperature, so I went digging in the code to see if the dev has blocked access to these parameters, but what I found is that they are (probably) accessible, they’re just not built into the UI, so I went ahead and added them.
There’s a line for the temperature field already there, it’s just commented out, and if you control-f through the ACC code, you can find references to all these parameters, so I just tried to add fields for them and make sure they don’t get reset to defaults. I hopefully have it working, but I’m not a professional and there’s like 14000 lines of code to parse through for just this generator.
Here you go, I don’t know how to set a custom url for this:
https://perchance.org/aus0716mp4
I’ve always liked at least having the option to mess around with these parameters with other LLMs, it can be really helpful sometimes to just drop temperature down a little if things are too chaotic, or bump frequency penalty up if it’s too repetitive. I’m not sure if anyone’s pointed out that these are there in the code before, I couldn’t find anything about it here or on reddit.
One issue is, and I’m not sure if it’s just how this model (Deepseek?) is, but even with all these parameters turned up all the way, the responses are usually coherent. Which I suppose is a good thing, but it makes it harder to tell whether changing one of them has done anything. It does seem to work, but I’m going to need to spend more time playing around with it to be sure, and it’s possible some of the parameters (like maybe TopP and TopK) are just being ignored by the backend (or I’m not sending them correctly).
I’m sure @perchance@lemmy.world could say for sure, I think it would be great to have these as advanced options in the base ai-character-chat. I also think the default General Writing Instructions could probably use some tweaking with the new model, it might help more inexperienced users get better results. Anyway, that’s my two cents, thank you dev for working to keep the site free and keeping it so open and editable.
Edit: The more I look at the code, the more I’m thinking it’s probably not doing anything. Even though all the parameters get defined and have checks, when it gets sent to getChatCompletion(), everything gets destructured, but only “messages” and “stopSequences” ultimately are sent to root.aiTextPlugin from there, so unless I’m missing something, I don’t think it matters. Maybe they were there because the dev planned to add them in at some point? I’m not sure. I tried adding them in to make sure it sends them, but it seems about the same, so I suspect the plugin just ignores them. The page with info about the plugin doesn’t mention them either.


This is really interesting. I don’t know how much this works, but I’m hoping more comments will pop up on this post for feedback in the future. Upvoted.
Agree, +1 I just wish I knew how to add this to the petrafied ACC for my existing chats, that would be awesome. OC, if you’re really bored, can you explain a little noob like me how to do this?
It is as the OP said on their edit. The temperature and other fields are not sent on the JSON that is sent to the backend server. If one checks it through the browser console, it only has the final prompt that is sent to the AI and some other fields, but none that the OP edited. Very likely this is having no effect at all.
The AI Text Plugin has a section where it takes only specific attributes. It is possible to change it to take these into account and add them to the JSON, but it would not matter anyway if the Perchance backend server does not use them.
Ah, yes, I wrote my comment before the post got edited ^^ Too bad, actually, it would have been nice for slow pace stories to tweak the temperature gradually away from the initial one. But thanks, also for your fork, it really helps me learn about AI at my pace and on my own conditions (I learn differently than many other ppl) :)