Hey!
Not sure if this is the palce to ask questions, but I have one.
I can't quite figure out how to submit ratings for generated images.
According to the API docs, the /v2/generate/rate/{id}
endpoint is for submitting ratings, but I can't figure out how to actually call this enpoint.
For starters, what is {id} in this case?
I've checked the source at github, and to my understanding it's a WaitingPrompt
id, which, if I'm correct is the id what /api/v2/generate/async
gives back in its response.
Now the API docs tells me I can submit a set of ratings and also a best one from that set. Is this means that if I generate multiple images with one request, I can rate only those images? And should I use the UUID of the images in each rating object, the id I get back from /v2/generate/status/{id}
in each generation object?
Also, should I specify the apikey in headers?
I tried to send POST requests to https://aihorde.net/api/v2/generate/rate/%7Bid%7D
, but I always get back the following message:
{'message':'The browser (or proxy) sent a request that this server could not understand.'}
In the request URL, I tried to use all the IDs I could think of. Job IDs, image IDs... I also realized in the meantime that ArtBot too generates UUIDs for itself...
My "final" request looked like this:
- in the URL, I used the job id of my image generation request
- In the message, I have put one rating, for which ID I used the id what I got in
/v2/generate/status/{id}
response. (generations[0].id)
As for why I try to send in ratings manually; the rating feature is broken in ArtBot (CORS errors, in all browser). As well as everywhere else.
I see references to the v1 API in websites that can in theory send in ratings to Horde, as well in the AI-Horde source code.
So, I'm kinda lost and confused with this rating thing. Maybe I'm doing things entirely wrong.
But anyway. Any help or answer is appreciated! :)
Thanks!
Imagine this scenario. You are like... 6 years old and you decide you want (or your parents send you) to play an instrument, let's say the guitar.
You just started it, had a few lessons already with your teacher, and soon it's Christmas, so the music school where you learn to play guitar has a Christmas event where all their students play something for an audience, as a small concert.
So, you have been playing the guitar for half or even one year now. And you know what? Objectively speaking, you are a terrible guitar player. Obviously, since you just started to learn that goddamn thing. But of course, you are just 7 years old now and you are cute with a large 4/4 guitar in your hands, and your mother loves every second of it, and it's wholesome... but there will be people in that audience who would do just anything to not listen to that, because they don't care that it's you, or that you are 7 or just playing guitar for less than one year.
So if you play like shit, what's the point of playing in a concert or even playing the guitar in the first place?
And it can be worse; let's say your music school was sponsored by Coca-Cola, and now all their advertisements for the following few years will include you, or guitar players just like you, in their ads. Everyone has to listen to it at least once a day who watches TV, and their favorite channel has those ads. They are here for some Family Guy, but still have to listen to some kids struggling on their guitars for 40 seconds just to be reminded that Coca-Cola is a thing.
But what they don't know is that since you continued to play the guitar, go to lessons, maybe study some solfege, practice, and play in concerts and competitions, after some time, you could become a decent guitarist. Not necessarily the best, but a decent one. Maybe you could base a career on playing the guitar. Who knows?
(Note: I have absolutely nothing against kids learning to play the guitar. That's a badass thing.)