Java spring boot dev and spring boot web and open ai and jte

I build study guide generator with Java and spring boot but I keep getting this error. Does anyone know why and how I can fix this ?
No description
20 Replies
Dead Society
Dead SocietyOP3w ago
I tried I think for 4 days and i believe it’s from API I’m not sure. I would appreciate any guidance on what to do and how to approach
Madjosz
Madjosz3w ago
Your process makes a request to an API and the resource is not available under that url, thus it returns error code 404 Not Found. This means that your webserver is up and running but you either call the wrong url from your process or there is something messed up with the GET mapping in the API.
h
h3w ago
show the code :flushin:
JavaBot
JavaBot3w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Dead Society
Dead SocietyOP3w ago
this is my codes
No description
No description
No description
No description
No description
No description
No description
No description
Dead Society
Dead SocietyOP3w ago
not sure what is the issue now it says "Error while generating study guide: HTTP 405 - No response body available"
h
h3w ago
images - so cursed anyways in AIService.generateAsset, in catch statement where you print "Error while generating..." print the full stacktrace Have you verified that your Spring AI is configured correctly? Also log the input message prompt for good measure
Dead Society
Dead SocietyOP3w ago
its made by professor so i cant really check but i will try that
h
h3w ago
Just log it using System.out.println or sl4j - or go through it with a debugger using breakpoints You probably dont wanna show your api key
Dead Society
Dead SocietyOP3w ago
🫠 im probably failing this assignment
h
h3w ago
oh and try https://openrouter.ai/api instead - remove /v1
Dead Society
Dead SocietyOP3w ago
i tried it but it gives me 401 error
h
h3w ago
yup I get 405 if I have v1 You likely have wrong API key try this one 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 with this api url https://openrouter.ai/api
Dead Society
Dead SocietyOP3w ago
it gives me 400 error Error while generating study guide: HTTP 400 - {"error":{"message":"google/gemini-2.0-flash-lite is not a valid model ID","code":400},"user_id":"user_2xS1DmocWK1nlE6alL88JI3CK1Z"} 🫠
h
h3w ago
that error is fairly obvious ^^ the model does not exist anymore or maybe never did
h
h3w ago
OpenRouter
Models | OpenRouter
Browse models on OpenRouter
h
h3w ago
use 2.5 flash lite or 2.0 which is google/gemini-2.5-flash-lite or google/gemini-2.0-flash-lite-001
Dead Society
Dead SocietyOP3w ago
omg workeddd thank youuu
JavaBot
JavaBot3w ago
If you are finished with your post, please close it. If you are not, please ignore this message. Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
JavaBot
JavaBot3w ago
Post Closed
This post has been closed by <@940101174403678288>.

Did you find this page helpful?