I followed all the step which you have mentioned but I'm getting error (Exception: SNlM0e value not found. Double-check __Secure-1PSID value or pass it as token='xxxxx'.) can you please help me in that.
Looks like your Secure 1PSID key is not correct. Could you double check that? Follow the steps mentioned in the video and copy the Secure 1PSID from the "Inspect" section. Which Browser are you using, anyways?
@@Analyticsvidhya Yessss now it's working. Thank you so much sir, I really appreciate that you are not just replying to the comment but also providing the solution as well. Thank you once again.
Please dont ever use this generic stock music in the background, makes the whole thing seem very very amateurish, which is not cool because your content is very good
when i run pip install bardapi and thenn try to import it return me module not found error i also restarted run time but no use, what to do sir help me ?
Just not a good way to get the API. Bard API is in beta and can be obtained legally only via Google cloud platform console. Getting the API the way you showed is not really the way to go.
Hi Noam, the learning objective of this video is to enable GenAI aspirants to get a hang of LLM API. At the time when this video was launched, Google PaLM API was not available for use (Now it is, via Google's MakerSuite Platform). And we have clearly mentioned in the video that it's not for production use. Just for educational hands-on.
@@Analyticsvidhyawhat we required to do for Production need to show my target person to solve their work through this as you understand want to sell that solution. Please make a video for guidance of custom sell chatbot
You got me :) Here's a short article from our blog, where we have detailed the step-by-step process: www.analyticsvidhya.com/blog/2023/05/how-to-use-chatgpt-api-in-python/
one of the most informative videos out here, Thank you so much. Question, I am working on a project to provide paid and free AI's for those of us in places such products aren't available or easy to access. I was curious as to how I can integrate these AI's into a website or bots in Telegram, or is it possible to follow these same steps on a website hosting servers?
Yes, it's absolutely possible to integrate LLM functionality on Website/App (using a paid API of ChatGPT / PaLM). However, be careful that Google Bard API that we have used in this video is purely meant for educational purposes. If you make queries on the API beyond a certain threshold, your Google Account might get impacted. So, be very careful..
@@Analyticsvidhya Thank you. I really appreciate how you help solve queries. I will really like to learn how to fully delve into chatbot, is there a program I can really learn with hands-on from beginner to pro. Even if it require me paying.
Dear learner, drop an email to our Career Counselling team for a free mentorship session: ummed@analyticsvidhya.com Alternatively, you may call on the any of the following numbers: Line1: +91 8068342847 Line2: +91 8046107668
Great video, when i try to import the BardApi i get this. ModuleNotFoundError: No module named 'bardapi' I have done the pip install bardapi Please help 😇
@@Analyticsvidhya Thanks I got that part working now. :) But now i get the "Exception: SNlM0e value not found. Double-check __Secure-1PSID value or pass it as token='xxxxx'." instead. I have checked the __Secure-1PSID and it's correct. Any ideas?
Hello, Hope you do well. I used Google Colab and used you exactly and I get an error. Could you please help me I have no experience in coding. I don't know what is wrong. I would greatly appreciate your help. Have a great day. Best regards Johan
Try this resolution: Here's a resolution to the error you're facing: github.com/dsdanielpark/Bard-API/issues/99#issuecomment-1633060128 Alternatively, Google now offers free API key to it's Gemini Model. Here's a quick hands-on tutorial: ua-cam.com/video/pJAzg8CORYI/v-deo.html
i have a doubt why i have to add all my data in prompt ? using bard cant i just question him based on the data i push.. just like open source ? am new to AI just curious
The thing is this: Bard has a limit on the input Prompt character length of 4000 characters. So, we have to split our book text into small chunks and then feed them to Bard. It's also possible to feed entire data within your prompt, with pre-condition being - it should be less than character limit.
Dear learner, drop an email to our Career Counselling team & we’ll help you out with all the information: ummed@analyticsvidhya.com Alternatively, you may call on the any of the following numbers: Line1: +91 8068342847 Line2: +91 8046107668
Hi, I am testing Chatbot with chatgpt API, but it is showing error for response = get_completion(prompt) as now v1 is migrated to newer one. Can you help me with the code for latest version?
Absolutely! With your trained deep learning model, building a chatbot on Colab is exciting. Here's what's next: 1. Interface: Craft a way for users to chat (text input/GUI). Python libraries like ChatterBot can help. 2. Connect: Bridge your model's predictions to the interface - it'll understand and respond to user input! 3. Deploy: Host your chatbot online (Colab's temporary, consider cloud platforms later). Resources like Rasa and Dialogflow can further enhance your chatbot features. Let me know if you need specific library pointers!
I'm working on a self-project and it needs a simple chatbot to help with productivity. How do I export this model so that I can use it on my application?
You'll need to adopt this Jupyter Notebook code to write an App Code for your Application. Could you tell a bit more about your app-building idea, so I may share specific info.
Are the APIs all the same.. i.e. is OpenAPI the same as the API used with Bard, Gemini, OpenAI's Assistant API , Au Mistral, Gemini Pro, llama2 , FastAPI etc? I'm interested in creating a Python application to do some basic OCR.. and if I use ChatGPT4 Assistant API (Vision/AI PDF Plugin) then I just pay the API costs whenever someone uses my application. Alternatively, if host an open-source model like Ollama on my own computer or on the cloud (beam cloud/ Replicate/Streamlit/replit) then I would just pay for cloud? Is there a model that is already hosted and can be accessed without a paid subscription key? For example, if my application uses a model on Google Colab what are the limitations?
Hi Ben, all providers generally share their own documentation for consuming their APIs, like: OpenAI, Google, Mistral, Anthropic. If you are consuming some model via Huggingface API (for the limited Open Source models available there), then there's a single documentation you need to follow. Additionally, Colab is not a platform where you can deploy your Apps. You may do that on Huggingface Spaces (if you are looking for a free platform). Alternatively, you may try out AWS/Azure/GCP - and start off with the free credits they offer.
NameError Traceback (most recent call last) in () 2 3 # creating a pdf reader object ----> 4 pdfReader = PdfReader(pdfFileObject) 5 text=[] 6 summary=' ' NameError: name 'pdfFileObject' is not defined i got this error why??
Can we access the "input image" feature of the bard by making this API call? Also is there any option for fine-tuning available on the free version of bard??
Sir i have one problem now it is showing that RAISE EXCEPTION BARD API KEY PROVIDED OR EXTRACTED FROM BROWSER. Bard Api key must be provided or extracted from browser... While still i have copied from The cookies .... Pls help pls help
Just to clarify - this is not an API. This is quote on quote "illegal" and I don't recommend doing this. Also, the token refreshes every 20 minutes or so, so it's very inpractical.
Hey! Learning objective of this video is to enable GenAI aspirants to get a hang of LLM API. At the time when this video was launched, Google PaLM API was not available for use (Now it is, via Google's MakerSuite Platform). And we have clearly mentioned in the video that it's not for production use. Just for educational hands-on. Additionally, now have PaLM API Hands-on Video live on the channel. Take a look: 1️⃣ Get PaLM API Key Free: ua-cam.com/video/pJAzg8CORYI/v-deo.html 2️⃣ Build GenAI Code Explainer App: ua-cam.com/video/c0w-EvhU8fE/v-deo.html
Ugh....this error is killing me JSONDecodeError Traceback (most recent call last) in () 2 # input_text = "Why is the sky blue?" 3 input_text = "What is the current status of Ashes Series 2023" ----> 4 print(Bard().get_answer(input_text)['content']) 3 frames /usr/lib/python3.10/json/decoder.py in raw_decode(self, s, idx) 353 obj, end = self.scan_once(s, idx) 354 except StopIteration as err: --> 355 raise JSONDecodeError("Expecting value", s, err.value) from None 356 return obj, end JSONDecodeError: Expecting value: line 1 column 1 (char 0) please help
Hey, don't fret on this. Between the time this video was released to now, Google has made it's Gemini Model API available on: aistudio.google.com Here's a quick tutorial to get your free API key from here: ua-cam.com/video/c0w-EvhU8fE/v-deo.html
not working, the erroe is: "{'content': 'Response Error: b\')]}\\\'\ \ 38\ [["wrb.fr",null,null,null,null,[7]]]\ 54\ [["di",51],["af.httprm",51,"5319462573973445201",0]]\ 25\ [["e",4,null,null,129]]\ \'. Unable to get response. Please double-check the cookie values and verify your network environment or google account.'} "
Book FREE 1:1 Mentorship for Gen AI / Data Science
Link 🔗 bit.ly/3wlIIGz
Very helpful vid. Thanks Vidhya!
I followed all the step which you have mentioned but I'm getting error (Exception: SNlM0e value not found. Double-check __Secure-1PSID value or pass it as token='xxxxx'.) can you please help me in that.
Looks like your Secure 1PSID key is not correct. Could you double check that? Follow the steps mentioned in the video and copy the Secure 1PSID from the "Inspect" section.
Which Browser are you using, anyways?
@@Analyticsvidhya Did that already. Actually sometimes it is working some time it is not.
@@Pradip_Deshmukh Excessive traffic
Here's a resolution to the error you're facing: github.com/dsdanielpark/Bard-API/issues/99#issuecomment-1633060128
@@Analyticsvidhya Yessss now it's working. Thank you so much sir, I really appreciate that you are not just replying to the comment but also providing the solution as well. Thank you once again.
This is interesting! Can't wait to try this.
Hope you like it!
Please dont ever use this generic stock music in the background, makes the whole thing seem very very amateurish, which is not cool because your content is very good
Thank you for your kind feedback.
when i run pip install bardapi and thenn try to import it return me module not found error i also restarted run time but no use, what to do sir help me ?
Try changing interpreter, worked for me but still no luck with the __Secure-1PSID
Here's a resolution to the error you're facing: github.com/dsdanielpark/Bard-API/issues/99#issuecomment-1633060128
@@Analyticsvidhya got it bro I need to clear cookies and copy new api 🔐, it worked after i cleared cookies
Thank you for the video. It's really helpful.
Glad you liked :)
This is work in hindi language use own hindi data ?
Yes, it will work in Hindi language, as well!
I am getting response error i checked many times but it still comming like that
Just not a good way to get the API. Bard API is in beta and can be obtained legally only via Google cloud platform console. Getting the API the way you showed is not really the way to go.
Hi Noam, the learning objective of this video is to enable GenAI aspirants to get a hang of LLM API. At the time when this video was launched, Google PaLM API was not available for use (Now it is, via Google's MakerSuite Platform).
And we have clearly mentioned in the video that it's not for production use. Just for educational hands-on.
@@Analyticsvidhyawhat we required to do for Production need to show my target person to solve their work through this as you understand want to sell that solution.
Please make a video for guidance of custom sell chatbot
wonderful video, but you did not explain how to obtain the api keys!
You got me :)
Here's a short article from our blog, where we have detailed the step-by-step process: www.analyticsvidhya.com/blog/2023/05/how-to-use-chatgpt-api-in-python/
one of the most informative videos out here, Thank you so much.
Question, I am working on a project to provide paid and free AI's for those of us in places such products aren't available or easy to access. I was curious as to how I can integrate these AI's into a website or bots in Telegram, or is it possible to follow these same steps on a website hosting servers?
Yes, it's absolutely possible to integrate LLM functionality on Website/App (using a paid API of ChatGPT / PaLM). However, be careful that Google Bard API that we have used in this video is purely meant for educational purposes. If you make queries on the API beyond a certain threshold, your Google Account might get impacted. So, be very careful..
Sir,I got a problem at the time of running the simplest chatbot section also,I can't understand how to solve the problem, it's showing error
Cool ! Thanks you for sharing.
Thanks for watching! 👍
Did create the files you used for this demonstration?
Secondly, is there special place we can get files in the event of doing use case scenario.
Dear Ali, link to download reference files is provided in the description part of this video. Do check that out.
@@Analyticsvidhya Thank you. I really appreciate how you help solve queries. I will really like to learn how to fully delve into chatbot, is there a program I can really learn with hands-on from beginner to pro. Even if it require me paying.
sir is it possible to customize the chatbot so that it can only answer questions on agriculture
Yes. Just treat your prompt accordingly.
how to train this ?
Dear learner, drop an email to our Career Counselling team for a free mentorship session: ummed@analyticsvidhya.com
Alternatively, you may call on the any of the following numbers:
Line1: +91 8068342847
Line2: +91 8046107668
can you add streamlit front page to this
Great video, when i try to import the BardApi i get this.
ModuleNotFoundError: No module named 'bardapi'
I have done the pip install bardapi
Please help 😇
Once you pip install bardapi, you should restart runtime, comment pip install and then import bardapi. Should work then..
@@Analyticsvidhya Thanks I got that part working now. :)
But now i get the "Exception: SNlM0e value not found. Double-check __Secure-1PSID value or pass it as token='xxxxx'." instead.
I have checked the __Secure-1PSID and it's correct.
Any ideas?
@@priimeone I'm also getting same issue.
@@Pradip_Deshmukh Which? ModuleNotFoundError: or __Secure-1PSID ?
@@priimeone I was using Opera Browser at first, it doesn't work. Then i moved to Edge, it worked only one time. I think it's a matter of traffic.
Can I use it for my 3rd year project
Yes, of course. Just one update, you may use Gemini API. Here's the tutorial: ua-cam.com/video/3z0a3Ymwj1k/v-deo.htmlsi=MmaeBqqiBlg6e_Ld
Hello, Hope you do well. I used Google Colab and used you exactly and I get an error. Could you please help me I have no experience in coding. I don't know what is wrong.
I would greatly appreciate your help. Have a great day. Best regards Johan
Could you elaborate the issue/error you got? Just go through the other comments on the video. And see if your issue is already discussed and resolved.
I keep getting an exception "Bard API Key must be provided as token argument or extracted from browser."
Try this resolution: Here's a resolution to the error you're facing: github.com/dsdanielpark/Bard-API/issues/99#issuecomment-1633060128
Alternatively, Google now offers free API key to it's Gemini Model. Here's a quick hands-on tutorial: ua-cam.com/video/pJAzg8CORYI/v-deo.html
thank you much it's really helpful and i have some doubts about creation of chatbot please clear it
Glad you liked it. Do share your queries here, please.
i have a doubt why i have to add all my data in prompt ? using bard cant i just question him based on the data i push.. just like open source ? am new to AI just curious
The thing is this: Bard has a limit on the input Prompt character length of 4000 characters. So, we have to split our book text into small chunks and then feed them to Bard.
It's also possible to feed entire data within your prompt, with pre-condition being - it should be less than character limit.
How can we make a custom chatbot specially for education purpose by using gemini
Dear learner, drop an email to our Career Counselling team & we’ll help you out with all the information: ummed@analyticsvidhya.com
Alternatively, you may call on the any of the following numbers:
Line1: +91 8068342847
Line2: +91 8046107668
Hi, I am testing Chatbot with chatgpt API, but it is showing error for response = get_completion(prompt) as now v1 is migrated to newer one. Can you help me with the code for latest version?
Check out this latest video, where we used Google Gemini API..
Can we build chatbot after training our deeplearning model and how can we execute that in google colab?,I am new to this field Can you please help me?
Absolutely! With your trained deep learning model, building a chatbot on Colab is exciting. Here's what's next:
1. Interface: Craft a way for users to chat (text input/GUI). Python libraries like ChatterBot can help.
2. Connect: Bridge your model's predictions to the interface - it'll understand and respond to user input!
3. Deploy: Host your chatbot online (Colab's temporary, consider cloud platforms later).
Resources like Rasa and Dialogflow can further enhance your chatbot features. Let me know if you need specific library pointers!
@@Analyticsvidhya okay thankyou if any doubts happening in my projects,i will ask u can u clear my doubts?
I'm working on a self-project and it needs a simple chatbot to help with productivity. How do I export this model so that I can use it on my application?
You'll need to adopt this Jupyter Notebook code to write an App Code for your Application. Could you tell a bit more about your app-building idea, so I may share specific info.
@@Analyticsvidhya I'm working with Flutter at the moment. How do i configure my project for that?
Refer to this video on our channel to know more on this: ua-cam.com/video/VKa_qDtGaYo/v-deo.html
i get an error when i try to use my cookie id, is it because it is turned to gemini?
Check out this latest tutorial: ua-cam.com/video/3z0a3Ymwj1k/v-deo.html
amazing on how to get session key
Are the APIs all the same.. i.e. is OpenAPI the same as the API used with Bard, Gemini, OpenAI's Assistant API , Au Mistral, Gemini Pro, llama2 , FastAPI etc?
I'm interested in creating a Python application to do some basic OCR.. and if I use ChatGPT4 Assistant API (Vision/AI PDF Plugin) then I just pay the API costs whenever someone uses my application.
Alternatively, if host an open-source model like Ollama on my own computer or on the cloud (beam cloud/ Replicate/Streamlit/replit) then I would just pay for cloud? Is there a model that is already hosted and can be accessed without a paid subscription key?
For example, if my application uses a model on Google Colab what are the limitations?
Hi Ben, all providers generally share their own documentation for consuming their APIs, like: OpenAI, Google, Mistral, Anthropic.
If you are consuming some model via Huggingface API (for the limited Open Source models available there), then there's a single documentation you need to follow.
Additionally, Colab is not a platform where you can deploy your Apps. You may do that on Huggingface Spaces (if you are looking for a free platform). Alternatively, you may try out AWS/Azure/GCP - and start off with the free credits they offer.
I'm getting the response error ..
Please read through the comments section for a resolution.
Project link will be useful! Thanks :)
Here's the link: docs.google.com/document/d/1NXyhKfj2ckQBXE0xqoI2gKD_2K-7QvfY_JoreITrpf4/edit?usp=sharing
NameError Traceback (most recent call last)
in ()
2
3 # creating a pdf reader object
----> 4 pdfReader = PdfReader(pdfFileObject)
5 text=[]
6 summary=' '
NameError: name 'pdfFileObject' is not defined
i got this error why??
Double check on the part where you defined pdfFileObject:
pdfFileObject = open(directory+filename, 'rb')
Where r the files, link,
Here's the link: drive.google.com/drive/folders/1fKdRQ2zSX86B50vEOplstwE77tboIrrf?usp=sharing
Can we access the "input image" feature of the bard by making this API call? Also is there any option for fine-tuning available on the free version of bard??
For "Input Image" feature, let us get back to you. Regarding fine-tuning BARD (PaLM-2 Model), unfortunately it's not freely avaiable.
@@Analyticsvidhya is there any method available where we can ask bard to access the contents of an image using API calls?
Sir i have one problem now it is showing that RAISE EXCEPTION BARD API KEY PROVIDED OR EXTRACTED FROM BROWSER.
Bard Api key must be provided or extracted from browser...
While still i have copied from The cookies .... Pls help pls help
Dear learner, please check this resolution link for the error you're facing: github.com/dsdanielpark/Bard-API/issues/99#issuecomment-1633060128
Just to clarify - this is not an API. This is quote on quote "illegal" and I don't recommend doing this. Also, the token refreshes every 20 minutes or so, so it's very inpractical.
Hey! Learning objective of this video is to enable GenAI aspirants to get a hang of LLM API. At the time when this video was launched, Google PaLM API was not available for use (Now it is, via Google's MakerSuite Platform). And we have clearly mentioned in the video that it's not for production use. Just for educational hands-on.
Additionally, now have PaLM API Hands-on Video live on the channel. Take a look:
1️⃣ Get PaLM API Key Free: ua-cam.com/video/pJAzg8CORYI/v-deo.html
2️⃣ Build GenAI Code Explainer App: ua-cam.com/video/c0w-EvhU8fE/v-deo.html
doesnt work
Check the other similar comments for troubleshoot.
Get Free access to PaLM API here: ua-cam.com/video/c0w-EvhU8fE/v-deo.html
can i use jupyter instead of google colab?
Yes, you can
Getting erro
Hi Subhadip, could you please share the error message you're getting?
"promosm" 😩
🤨
Please help what I choose secure -1PSIDC OR -1PSIDCC
This is the key you need "__Secure-1PSID"
Exception: SNlM0e value not found. Double-check __Secure-1PSID value or pass it as token='xxxxx'.
Here's a resolution to the error you're facing: github.com/dsdanielpark/Bard-API/issues/99#issuecomment-1633060128
Ugh....this error is killing me
JSONDecodeError Traceback (most recent call last)
in ()
2 # input_text = "Why is the sky blue?"
3 input_text = "What is the current status of Ashes Series 2023"
----> 4 print(Bard().get_answer(input_text)['content'])
3 frames
/usr/lib/python3.10/json/decoder.py in raw_decode(self, s, idx)
353 obj, end = self.scan_once(s, idx)
354 except StopIteration as err:
--> 355 raise JSONDecodeError("Expecting value", s, err.value) from None
356 return obj, end
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
please help
Hey, don't fret on this. Between the time this video was released to now, Google has made it's Gemini Model API available on: aistudio.google.com
Here's a quick tutorial to get your free API key from here: ua-cam.com/video/c0w-EvhU8fE/v-deo.html
not working, the erroe is:
"{'content': 'Response Error: b\')]}\\\'\
\
38\
[["wrb.fr",null,null,null,null,[7]]]\
54\
[["di",51],["af.httprm",51,"5319462573973445201",0]]\
25\
[["e",4,null,null,129]]\
\'.
Unable to get response.
Please double-check the cookie values and verify your network environment or google account.'}
"
Try using the free Gemini API, as demonstrated in this video: ua-cam.com/video/3z0a3Ymwj1k/v-deo.html