Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on lemmy.world
perchance·Perchance - Create a Random Text GeneratorbyAkshayy

Feature request: Optional custom OpenAI-compatible API support for AI Coder

Would it be possible to add an optional custom OpenAI-compatible API configuration to Perchance AI Coder?

This could be useful for people who prefer a different model or want more control over the AI Coder's behavior, especially given some of the recent concerns about the current AI helper/model.

Ideally, the settings could include:

  • Model ID — a text input where users can enter the model name/ID.
  • Model selection — optionally allow selecting from models returned by the configured API.
  • Base URL — for example, an OpenAI-compatible endpoint such as "https://example.com/v1".
  • API key — optional input for providers that require authentication.
  • Default Perchance model — keep the existing model as the default, so this would be completely optional.

The important part would be supporting OpenAI-compatible APIs, rather than tying the feature to one specific provider. This would let users connect compatible local or third-party endpoints without requiring Perchance to host or provide every model.

For example, the configuration could look something like:

API Base URL: https://example.com/v1 Model ID: my-coding-model API Key: ********

Then AI Coder could send requests using the standard OpenAI-compatible chat/completions interface.

This could also provide a way for users who prefer an older/different coding model to use their own provider while keeping the normal Perchance experience available for everyone else.

Would the Perchance devs consider adding something like this?

View original on lemmy.world
2

4 replies

lemmy.world

if I may be honest, I'm thinking about something like this, yet, let's just say I'm creating one and currently try to work out the bugs and features (plus security, as well to prevent API leaking within the generator, though I'm try to be heavy on wordings for constant reminder not to share any generator with API keys in it). Not sure when it'll be done, it could be a while, also, it won't be easy work flow since you'll still copy and paste to a new generator then save it there.

However, I was tempted to reply on that [dev] short note but not going to, but yes, adding better future such as API would help greatly (and maybe let us pay for whatever model to save their pocket money).

2
Akshayyreply
lemmy.world

Yeah, that actually sounds pretty cool. I can see why the security part would be a pain though, especially with making sure people don’t accidentally expose their API keys when sharing generators.

Even if the workflow is a bit clunky with having to copy/paste into a new generator, I think having the option to use your own OpenAI-compatible API would still be really useful. And yeah, being able to pay for our own model usage would probably help Perchance too.

No pressure on getting it done quickly though. Better to take your time and get the bugs/security sorted out properly. I’d definitely give it a try when you get it working.

2
JaxsTheFoxreply
lemmy.world

yup, and just a fair warning, even I did put the security stuff in and people exploit it, I'd be paying lot more by x/person. So my best advice is in two ways, A. Time the API (like say 7 days, if possible) or B. (the best) remove the API before publishing the AI Helper generator.

And it's CC License Attribute in a way where you can take, edit your own ways (maybe improved), publish (without paying and must be least credit the owner and all that), without asking me directly if you want it or not.

Also thanks about giving me more time, after all, I'm a living being that I need to live so I can work when I got the chance.

1

Yeah, that makes sense. The API-key risk is definitely something worth being careful about, especially if the generator can be shared publicly and someone could accidentally leave their key in it.

The time-limit idea could help, but I agree that removing the API key before publishing is probably the safest approach. The CC license is also really nice since people can build on it and improve it while still giving you credit.

And no worries about the time it takes-real life comes first. I appreciate you working on this at all, and I’ll definitely keep an eye out for it whenever you get it into a usable state. Good luck with the bugs and security side of it!

2

You reached the end

Feature request: Optional custom OpenAI-compatible API support for AI Coder | Spyke