Thank you very much!!! I made it by following your steps one by one. But the horrible thing is that when I talk to gpt, it says it is a real person instead of chatbot, lol.
Thanks. Thanks to you, I made an application that works flawlessly for the first time. Looking forward to your new works. By the way, Indians' English is more understandable. At least for me.
Thank you so much, very useful tutorial. If anyone faces the issue of "Only the original thread that created a view hierarchy can touch its views", you need to edit the the function which sets the output in chat to incorporate 'runOnUiThread' method. Copy paste the error in ChatGPT itself, it will suggest the exact fix :-) Thank you for the tutorial, once again!!
Hi , please can i ask you, I did this tutorial and its all good. But when i run the app and ask a question it keeps giving me the okhttp problem. it is because I dont have a paid version on the open ai ? thank you
Hello sir. Today is my viva and I made this app through this tutorial. Can you please clear some of my doubts so that I can answer the questions asked by my external? Android is not my forte that's why I need to understand some points by which this app is developed.
addResponse("Failed to load response due to "+response.body().toString()); addResponse("Failed to load response due to "+response.body().string()); toSting() change to .string() new format, if not will give you funny error message that you can't understand
Thanks for this tutorial, i most say its one of the best. Please i ran into error with the JSONObject section, i dont know why am having the error with all the JSONObject code. i have sent you a mail with screenshots, please can you respond to it, i really need your assistant to resolve this. thank you
Really nice video. I have one question how do i remove that purple area? i already removed the name "Easy chatgpt" but cant remove or find the code related to that?? Please help
Hello Thank you so much for this tutorial But mine run into some problem, after I finished the design I try to run the app but it kept crashing, I tried in my phone and emulator but it's all the same
Thank you for this tutorial! I have a question: if i have a main activity and this chatbot just a function to my app, how i can keep all the chat from this session? because when i try click on the button to use chatbot (Chatbot is the activity 2) and back to the main activity, all the chat will be clear.
Nice tutorial, very instructive and helpful. Say for instance, I want to italicize the term 'sangguniang barangay', how will I implement it in java string as illustrated in this code? faqList = new ArrayList(); faqList.add(new Faq(question: "Whether or not the city Mayor can refuse to fill a permanent vacancy in the sangguniang barangay despite a valid recommendation set forth in a Sangguniang Barangay Resolution.", answer: "Negative. Section 45 (a) (3) of the Local Government Code provides that a permanent vacancy in the sangguniang barangay shall be filled up by the municipal or city mayor upon the recommendation of the sangguniang barangay concerned. Should the recommendee possess all the qualifications and none of the disqualifications provided for by law, prescribed for an elective official under Sections 39 and 40 of the same Code, the city mayor cannot refuse to issue the necessary appointment to the former. "));
sir could you please make a tutorial on global messages in an app . By global messaging i means every one in this app can message and reply in global rest of the users can see it please
I do have failed to load response due to timeouts all the time when im asking something more than a 1+1 or a how are you question. Whats the solution? Maybe do as chatgpt and write every char that gets generated so I can at least partially something?
Sir Code is not working showing that failed to load response due to error message "you exceeded your current quote, please check your plan and billing details "
This app is not working properly for me... When we request from user side then bot not send any kind of response... And not exactly show the error also... Please help me to solve my problem....
Lots of people are facing timeout issue and also want to use new "gpt-3.5-turbo" model. Watch this video to fix the issue and use new model also. th-cam.com/video/uj93vVcDPQw/w-d-xo.html
Public static final Mediatype JSON =Mediatype.get("application/json;charset=utf-8");. Why Here is "get" color red?I couldn’t solve it.please can anyone solve this?
No idea why my comments kept deleted. I wanted to say your channel is great and subscribed it. Do you have any idea is there `timeout` feature on the API? I cant find it on document.
Thank you. This was one of the best videos on youtube to learn not only android development but how to build on openai.
Well done walking through the code. Especially how you write classes and point out the error when you need to implement metods. Thanks!
Glad it was helpful!
Thank you very much!!! I made it by following your steps one by one. But the horrible thing is that when I talk to gpt, it says it is a real person instead of chatbot, lol.
Thanks. Thanks to you, I made an application that works flawlessly for the first time. Looking forward to your new works.
By the way, Indians' English is more understandable. At least for me.
Thanks for comment.
Thank you! This is amazing! Guys, the API changed a little bit but with minor changes I still managed to get it running 🥰
Can you send me the source code?
Can you help me i have some issue!when app response it says failed to load response due to:
can you help me 😢 solving this issue?
mine is just typing no response from the bot
It's Amazing, I created my own chat GPT 🎉🎉🎉🎉🎉
Congrats
Thank you so much bro , i am always flowing you , and your coding skill is very impressive . I learn lot of thinks from you . again thank you .
Glad to hear that
I have no words to thank you brother....keep the good work up.god bless youu
Sir, while running your code from GitHub it's showing internal okhttp error, please tell me how to fix it
Thank you so much, very useful tutorial.
If anyone faces the issue of "Only the original thread that created a view hierarchy can touch its views", you need to edit the the function which sets the output in chat to incorporate 'runOnUiThread' method. Copy paste the error in ChatGPT itself, it will suggest the exact fix :-)
Thank you for the tutorial, once again!!
Hi , please can i ask you, I did this tutorial and its all good. But when i run the app and ask a question it keeps giving me the okhttp problem. it is because I dont have a paid version on the open ai ?
thank you
@@moongirl__________l-x7k I am also getting the okhttp error
?
👍👍👍really thank you for share that. I am beginner in Java, and that help me very so much
Thankyou, you video heplped me so much for hackathon ,we have made the project and it is one of the unique feature in our app
Works really well, would be nice if you could select the message to copy it from chat gpt though :)
Just in the Textview in xml
Add one extra property
android:textIsSelectable="true"
It will be done.
I have an issue the app don't response and said failed to load response due to: plz help me for this????
great tutorial....but could you change the input? Instead of typing a question....use speech as input?
Thats a great suggestion,You can implement that too.
@@EasyTuto1 lol.....i was hoping you would take that as a challenge...i dont have your skills!!!!!
excellent video very helpful. thank you so much. God bless!
error failed to load response okhttp3
Гарно. Будемо робити...
Hello, thanks I was able to implement following your guidance but I have challenge for my app to memorize such that the conversation follow relatedly.
Nice Tutorial! Thanks for sharing this.
Thanks
Well explained. Thank you
thank you it was amazing to learn from you sir!!
My pleasure!
Hello sir. Today is my viva and I made this app through this tutorial. Can you please clear some of my doubts so that I can answer the questions asked by my external?
Android is not my forte that's why I need to understand some points by which this app is developed.
Thanks for your good video
great work bro keep it up and thanks for full tutorial
Always welcome
addResponse("Failed to load response due to "+response.body().toString());
addResponse("Failed to load response due to "+response.body().string());
toSting() change to .string()
new format, if not will give you funny error message that you can't understand
how to remove this error
Same problem😂
Thanks for this tutorial, i most say its one of the best. Please i ran into error with the JSONObject section, i dont know why am having the error with all the JSONObject code. i have sent you a mail with screenshots, please can you respond to it, i really need your assistant to resolve this. thank you
thanks for the lecture
but your app is not working
Thank you, may God Bless you....🙂
Same to you!
Perfect
U r a genius
Thanks
Thanks!
Welcome!
Thank you 💞💞💞💞 it's really amazing 🤩
I love they way you teach 🤗
Thanks
Can you show a tutorial, how to make text to voice to read the item inside the recycle view.
Please try to help me, if you make this video for us?
i am getting an error broo .."failed due to okhttp body response "......how can i rectify..respond me as soon as possible broo
Same even I am getting
Decrease the maximum number of tokens
Guys Use API properly
Have you rectified it?
@@yatingambhir5440 noo broo
Thank you so much brother for your lovely tutorial.I have one question if it possible please reply.
How to solve timeout error??
I have addressed and fixed timeout issue.
You can watch video in my channel or check the pinned comment of this video.
@@EasyTuto1 Thank you so much brother.💌You are really great.
Great tutorial. It works. Can you make a video on how to create completions with "gpt-3.5-turbo"?
Yeah
super useful. thanks dude, thanks a lot
Thanks you too ❤️
at 10:05 the margin start is in the center of the box left chat box, why is this?
Very nice explanation bro ❤❤❤
Thanks 🙂
Thank you so much sir for your hard work....
It's my pleasure
Really nice video. I have one question how do i remove that purple area? i already removed the name "Easy chatgpt" but cant remove or find the code related to that?? Please help
Hello
Thank you so much for this tutorial
But mine run into some problem, after I finished the design I try to run the app but it kept crashing, I tried in my phone and emulator but it's all the same
Thanks, really learn value thing
Glad to help!
ty tutorial, do u know if its posible add duntion to read a image?
Perfect
Hey can you please provide me the source code..i have some error on this
Very helpful!
Glad it was helpful!
How to import MediaType and Okh on?its on 29:10 second. i try this many time its still wrong. may you explaind it again .. really thanks
having the same issue
I'm having the same issue too
app working excellent, but AI answer text copy option missing, solved Add the option
thank you sir.
Thanks
Thanks you much.
cool video)
Bro while running app in our mobile that it's displaying you exceeded your current quota please check you r plan and billing details
Thank you for this tutorial!
I have a question:
if i have a main activity and this chatbot just a function to my app, how i can keep all the chat from this session? because when i try click on the button to use chatbot (Chatbot is the activity 2) and back to the main activity, all the chat will be clear.
Yeah for that, You need to store the chat data in some local db may be Room DB.
Thanks 🙏
Welcome
Sir, while running your code from GitHub it's showing internal okhttp error, please tell me how to fix it sir??
Thank you Soooo much. After all, do you know how to use "gpt-3.5-turbo" model instead of "text-davinci-003"?
+1
private void callApi(String qQq) {
JSONObject jsonObject = new JSONObject();
try {
JSONObject jsonObject22 = new JSONObject();
jsonObject22.put("role", "user");
jsonObject22.put("content", qQq);
JSONArray jsonArray222 = new JSONArray();
jsonArray222.put(jsonObject22);
jsonObject.put("model", "gpt-3.5-turbo");
jsonObject.put("messages", jsonArray222);
jsonObject.put("max_tokens", 4000);
jsonObject.put("temperature", 0.7);
} catch (JSONException e) {
throw new RuntimeException(e);
}
RequestBody body = RequestBody.create(jsonObject.toString(), JSON);
Request request = new Request.Builder()
.url("api.openai.com/v1/chat/completions")
.header("Authorization", "Bearer apiKey")
.post(body)
.build();
OkHttpClient client = new OkHttpClient();
client.newCall(request).enqueue(new Callback() {
@Override
public void onFailure(@NonNull Call call, @NonNull IOException e) {
addResponse(e.getLocalizedMessage(), "210");
}
@Override
public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException {
if (response.isSuccessful()) {
if (response.body() != null) {
String responseBody = response.body().string();
try {
JSONObject jsonObject = new JSONObject(responseBody);
JSONArray choicesArray = jsonObject.getJSONArray("choices");
JSONObject firstChoice = choicesArray.getJSONObject(0);
JSONObject message = firstChoice.getJSONObject("message");
String content = message.getString("content");
addResponse(content, "ABC-D");
} catch (JSONException e) {
addResponse(e.getLocalizedMessage(), "2000");
}
}
}else {
addResponse(erTextFr, "210");
}
}
});
}
This for gpt-3.5-turbo. It works.
@@mcifci You're my savior. Thank you so much. It works!
how you did it ,use "gpt-3.5-turbo"
@M C
@oo0 o00
Nice tutorial brother keep up the good work! How can i make a placeholder that shows "typing" if the bot takes few seconds to answer?
You have not watched full video?
@@EasyTuto1 Ohh.. i see it. Dont know how i didnt see it before im confused haha. Thank you bro
Sure i will push it in github and provide link in description.
Sir It showing Failed to response okhttp3.internal.http.RealresponseBody ?
Yes same error showing to me did you get a solution?
Nice tutorial, very instructive and helpful. Say for instance, I want to italicize the term 'sangguniang barangay', how will I implement it in java string as illustrated in this code?
faqList = new ArrayList();
faqList.add(new Faq(question: "Whether or not the city Mayor can refuse to fill a permanent vacancy in the sangguniang barangay despite a valid recommendation set forth in a Sangguniang Barangay Resolution.",
answer: "Negative. Section 45 (a) (3) of the Local Government Code provides that a permanent vacancy in the sangguniang barangay shall be filled up by the municipal or city mayor upon the recommendation of the sangguniang barangay concerned. Should the recommendee possess all the qualifications and none of the disqualifications provided for by law, prescribed for an elective official under Sections 39 and 40 of the same Code, the city mayor cannot refuse to issue the necessary appointment to the former.
"));
Sir thank YU, When i run app its crashed, error : send_btn : No speakable text present
sir could you please make a tutorial on global messages in an app . By global messaging i means every one in this app can message and reply in global rest of the users can see it please
This is God level
Hi! Thanks very much for your excellent video!
You are welcome!
I do have failed to load response due to timeouts all the time when im asking something more than a 1+1 or a how are you question. Whats the solution? Maybe do as chatgpt and write every char that gets generated so I can at least partially something?
i have the same issue
I too have this issue.
I have addressed and fixed timeout issue.
You can watch video in my channel or check the pinned comment of this video.
You can ask whatever questions you want in this app?
Yes
What is the tool that can see the change of ui depend on changing the code in real time in this video?
Android studio
Thank you very much
Sir Code is not working showing that failed to load response due to error message "you exceeded your current quote, please check your plan and billing details "
Sir I want to add my words for bot's reply. Example:- I sent how are you ? bot should sent why are you ask ? 😂. Can I change bot's reply as this?
Thank You💖
Thanks
Thanks man. I used your video to write a kotlin app using the chatGPT API.
Fantastic!
Good
Bro pls help me After clicking send button the text that I entered in edit text is not showing in user's text view
same problem facing ......
Have you rectify this problem if yes how?
Bro can i add this as a new feature in an existing application please answer it's kind of urgent 🙏
Bro help me bro plugin not found in source nu error for what can I do and i want to how to set proxy manually
This app is not working properly for me... When we request from user side then bot not send any kind of response... And not exactly show the error also... Please help me to solve my problem....
won't scroll down bro and in up the message seems to overlap the tollbar
set top margin of recycler view 50dp
Lots of people are facing timeout issue and also want to use new "gpt-3.5-turbo" model.
Watch this video to fix the issue and use new model also.
th-cam.com/video/uj93vVcDPQw/w-d-xo.html
nice video but when i run it ,once i type something it closes the app.maybe got some idea?
How to implement type writer effect for bot respose
What can I do if all these codes are not running in my emulator
this is not working for me... my gets closed when we send the request from user side... please help to solve this problem
hello, does the conversation stays after restarting app?
I am getting error which says "Send_btn: No speakable text present How to fix it ?"
Thanks!!!!!😍
No problem!!
Public static final Mediatype JSON
=Mediatype.get("application/json;charset=utf-8");. Why Here is "get" color red?I couldn’t solve it.please can anyone solve this?
same problem here ....did you solve it?
@@k-popkdramaworld I have got same problem. how you solve it.
instead of get, write parse
Same problem too, have you been able to resolve it?
the same problem...can somebody solve it?
Sir.. there was a error.. not showing output. What to do??
What error?
Can you please provide a vedio for us who use kotlin ?😢
Brother, I want to use that as chatbot and I want to customize the Question and Answer, how can I do ? please help me. :(
Brother please reply what is the procedure if i want to use chat gpt 3.5 and gpt4 paid api in this app
Check another video in the pinned comment.
But buddy there is no pinned comment 🫠
Even tough... i am creating an app and most of your videos are helping a lot thanks
No idea why my comments kept deleted. I wanted to say your channel is great and subscribed it. Do you have any idea is there `timeout` feature on the API? I cant find it on document.
I have addressed and fixed timeout issue.
You can watch video in my channel or check the pinned comment of this video.
hi ive follwed this and its saying i havent used the api key pls help
Do you use a free or pai API key?
The app is opening but when I type something and click send the message does not show and there is no bot reply too
your code might be misconfigured "VISIBILITY" to GONE, check back the code and compare to this superb video.
Hi
I'm making a new toolbar in this app but the chats are overlaying on the action bar above. So how can I not let this happen?
Make sure your recycler view is below your toolbar
@@EasyTuto1 done 👍🏻 thanks. Can you help me add an image button on the toolbar for a new chat?
hello i'm having a problem, when i run this app in my phone it keeps stoping when i click the sendbutton in this app, please help me
Its crashing, Check the Logcat.
In android studio itself you can see in the bottm left.
There are options Build,Terminal,Logcat.
You can see the error message there.
hello thankyou very much! i already solve the problem thanks to your advice and god bless@@EasyTuto1
Hello, when i want to send the message, the app suddenly close by itself. What should I do to fix that?
It might be be crashing.
Check the logcat where exactly its crashing?
@@EasyTuto1@EasyTuto1 it said that my image button (send button) can't be detected, and everytime i click the send button it suddenly close
Getting an error sir "Failed to load response due to okhttp3.internal...." Please help
same error someone help please
I get the same
Mai physical device se kar raha hun kuch bhi response nahi aaraha hai
At chatGPT webside , there is no API option that's why I am not able to view new API , how can I generate new API key???
Go to Open AI website -> Documents -> API Refernce and login there.
Bro i can't take response from api what i do?
Sir ye app sirf virtual device me hi run hotha hai kya
No it will run on device also