Тёмный

Create ChatBot Based On The Data Feed By You - GPT-Index | OpenAI | Python 

Shweta Lodha
Подписаться 11 тыс.
Просмотров 122 тыс.
50% 1

Check out this video to know how you can construct your own chatbot
by giving your own data. As we are feeding our own data and creating a knowledge base, all the responses will be based on our data.
Blog: www.shwetalodha...
Medium: / shweta-lodha
* REFERRAL LINK ************
Medium referral link: / membership
* REFERRAL LINK ************
How-To-Fix:
- GPT_Index ModuleNotFound - • How To Fix [GPT_Index]...
- ImportModule error: GPTSimpleVectorIndex - • How To Fix [GPT_Index]...
- All borken changes: • How to Fix[GPT-Index]:...
###### MORE PLAYLISTS ######
⭐Python for beginners: • #1 Python for Beginner...
⭐Python Pandas: • #1 Python Pandas: Intr...
⭐Python tips and tricks: • Python Tip: Take Multi...
⭐Jupyter tips & tricks: • Jupyter Tip: Run Termi...
⭐Microsoft Azure: • Know Response Time Of ...
⭐Azure ML and AI: • Getting Started with I...
⭐Visual Studio Code a.k.a. VS Code: • How to get started wit...
#chatbot #python #openai

Опубликовано:

 

30 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 311   
@njorogekamau3820
@njorogekamau3820 Год назад
This tutorial truly stands out from the rest! After struggling with coding along other RU-vid tutorials on GPT-index and langchain, I finally stumbled upon this gem, and behold, my code worked like a charm. Thanks for sharing your expertise and making it easy to follow. You're a lifesaver!
@glebp7020
@glebp7020 Год назад
Thank you, Shweta. I was able to get something working based on your code. Please note that lots of libraries are now outdated (gpt_index is now llama_index). My complete code (works 100%!): from langchain import OpenAI import sys import os from llama_index import SimpleDirectoryReader,GPTListIndex,GPTVectorStoreIndex,LLMPredictor,PromptHelper,ServiceContext from llama_index import StorageContext, load_index_from_storage def create_index(path): max_input = 4096 tokens = 200 chunk_size = 600 #for LLM, we need to define chunk size max_chunk_overlap = 20 prompt_helper = PromptHelper(max_input,tokens,max_chunk_overlap,chunk_size_limit=chunk_size) #define prompt llm_predictor = LLMPredictor(llm=OpenAI(temperature=0, model_name="text-ada-001",max_tokens=tokens)) #define LLM docs = SimpleDirectoryReader(path).load_data() #load data service_context = ServiceContext.from_defaults(llm_predictor=llm_predictor, prompt_helper=prompt_helper) vectorIndex = GPTVectorStoreIndex.from_documents( docs, service_context=service_context ) vectorIndex.storage_context.persist(persist_dir="storage") return vectorIndex def answerMe(): storage_context = StorageContext.from_defaults(persist_dir="storage") index = load_index_from_storage(storage_context) query_engine = index.as_query_engine() q = "What is the best plan?" print(q) print('------------') response = query_engine.query(q) print(response) #create_index('data') answerMe()
@shweta-lodha
@shweta-lodha Год назад
Thanks Gleb. I have created few videos on how to fix these broken ones and few more are on the way. Please feel free to let me know, if anything else is not working. I will try to provide solutions at my earliest convenience. Thanks once again.
@stalinamirtharaj1353
@stalinamirtharaj1353 Год назад
Great bro... It was helpful to test it out.
@sumankalyanghosh645
@sumankalyanghosh645 Год назад
@@shweta-lodha Currently I am getting RateLimitError with whatever account I try. Is there a way I can bypass this and test out
@sumankalyanghosh645
@sumankalyanghosh645 Год назад
With the above code I have tried as well mentioned by Gleb.
@SmritiChaudhary-k5b
@SmritiChaudhary-k5b Год назад
Hii, I am facing this error RetryError: RetryError[] while calling answerMe function, can you please help me out .
@deepaksartape9502
@deepaksartape9502 Год назад
Please cover UI part as well in one of the coming video. Thank you so much in advance.
@mikhailtrufanov9356
@mikhailtrufanov9356 Год назад
Hi, thank you for the video! I have tried this code to answer questions based on data about a very specific product. It answers well, however, it answers general questions as well (such as "What is Earth?") having no information at all about this in the files provided. How can I make this code answer based on the information that I provided only?
@shweta-lodha
@shweta-lodha Год назад
Thanks for watching Mikhail. Give a try to my this video, it gives better results - Use Your Locally Stored Files To Get Response From GPT like ChatGPT | Python
@shivampatel4179
@shivampatel4179 Год назад
ImportError Traceback (most recent call last) Cell In[29], line 1 ----> 1 from gpt_index import SimpleDirectoryReader, GPTListIndex, GPTSimpleVectorIndex, LLMPredictor, PromptHelper 2 from langchain import OpenAI 3 import sys What should I do for this error???
@shweta-lodha
@shweta-lodha Год назад
Please refer my how to fix video entitled as breaking changes. Things are broken because of API enhancements
@fascinatingstories101
@fascinatingstories101 3 месяца назад
Thank you. Is there a way to capture user inputs like contact details (email, name etc)? That would be really useful.
@narjessabbassi124
@narjessabbassi124 Год назад
Hello, this tutorial is really amazing but i was trying to replicate the same work but got an error when executing the function createVectorIndex saying that the function __init__() in GPTSimpleVectorIndex got an unexpected keyword argument 'documents' did anyone get the same issue ?
@shweta-lodha
@shweta-lodha Год назад
Please check my How-To-Fix video
@ddsharma2327
@ddsharma2327 Год назад
Question about execution flow: Hi Sweta - Thanks for a very helpful tutorial. Trying to wrap my head around the execution flow. For example, createvectorIndex probably sends the document to openAI servers, the servers return embeddings that are then stored locally. During answerMe - is the prompt sent back to openAI for embeddings? Does answerMe again send document embeddings back to openAI servers? How much is done in the local process (on PC) vs how much is done by openAI servers? Thanks.
@shweta-lodha
@shweta-lodha Год назад
One way to understand this is by disabling the internet connection once you have embedding stored on your local device and then try to call answerMe. Doing this will clear all your doubts 😊
@shweta-lodha
@shweta-lodha Год назад
GPTIndex Medium link : medium.com/@shweta-lodha/create-chatbot-based-on-the-data-feed-by-you-gpt-index-openai-python-772291576bee LlamaIndex Medium link: shweta-lodha.medium.com/create-chatbot-based-on-the-data-feed-by-you-gpt-index-llamaindex-openai-3efd7abe3ed9 For PromptHelper and documents error: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-E6Fi2ZVkO1U.html
@sevarakenjaeva7138
@sevarakenjaeva7138 Год назад
your video and medium source article do not sync up. you mention createvectorindex in one place and createindex in another. maybe you should take a look as this does not help anyone who is trying to follow ... watching video and copying code from medium.
@syedrizwanali5212
@syedrizwanali5212 14 дней назад
Hi Mam, Does this work today also? Gpt_index does not have any function?
@shweta-lodha
@shweta-lodha 13 дней назад
Perhaps not as lot many things have changed recently, in terms of SDK and API. Lot many functions are renamed and moved here and there.
@syedrizwanali5212
@syedrizwanali5212 13 дней назад
@@shweta-lodha Thank you for the reply. Would you have any latest video on same topic? Or would you know if someone have created on this topic in simpler way like you had done here.
@maggynewnham
@maggynewnham Год назад
Hi Shweta - I am planning to follow this tutorial, it looks amazing, I was wondering if you know if the local data we used is kept and is local only or if any of the data gets make public or goes back to OpenAI?
@shweta-lodha
@shweta-lodha Год назад
Thanks Maggy, glad you find it useful. Data will go to OpenAI servers
@smittrivedi7924
@smittrivedi7924 Год назад
This Is old version so please update it getting many errors @sweta
@shweta-lodha
@shweta-lodha Год назад
Hey, I have already created a video on the api changes happened recently
@Phrixos
@Phrixos Год назад
Thank you so much for this! You made something very intimidating to me super easy to understand. I am very grateful for the time and effort your put into this video. Thanks a lot!
@LEARNINGS-Amit
@LEARNINGS-Amit Год назад
Hi Shweta, Awesome video, great learning. Thanks. Just one concern - when we grant access to ChatGpt to our custom data stored in our machine, then is there a risk that the data can be copied/ used by users of ChatGPT or Open AI or otherwise?
@darkmode4467
@darkmode4467 10 дней назад
What is the token for? Is it limited to ask the bot? Is there a way it can be unlimited?
@tejaabhimanyu6121
@tejaabhimanyu6121 Год назад
def _initialize_persistent_process(prompt: str) -> pexpect.spawn: ^^^^^^^^^^^^^ AttributeError: module 'pexpect' has no attribute 'spawn'...getting this error while importing the packages..please help
@shweta-lodha
@shweta-lodha Год назад
I didn’t come across this error. Which package are you importing?
@tejaabhimanyu6121
@tejaabhimanyu6121 Год назад
@@shweta-lodha from langchain.embeddings.openai import OpenAIEmbeddings...while trying to import this package
@shweta-lodha
@shweta-lodha Год назад
Some recent breaking changes happened in langchain. Please use specific version and give it a try
@M-ABDULLAH-AZIZ
@M-ABDULLAH-AZIZ Год назад
having data in a file and real time embeddings vs embeddings in a db for chatbot for an application (provides information about an application)?
@naveennoelj
@naveennoelj Год назад
@shweta-lodha, wonderful video and article. Thank You. Please keep up the good work. One qs: is there a way to implement the same solution using a web based solution - angular, react etc.
@shweta-lodha
@shweta-lodha Год назад
Thank you so much Naveen, glad you liked it. I was thinking to try this out but couldn't find API endpoints. Please let me know, if you come across any such documentation.
@mehdirizvi3305
@mehdirizvi3305 Год назад
For me, this code was throwing an error. If you update the code by first importing ServiceContext from gpt_index (along with the other stuff you were already importing) and then update the code by adding the following lines, '-----#load data docs = SimpleDirectoryReader(path).load_data() service_context=ServiceContext.from_defaults(llm_predictor=llmPredictor,prompt_helper=PromptHelper) #create vector index vectorIndex=GPTSimpleVectorIndex.from_documents(documents=docs,service_context=service_context) --- it should solve your issue. P.S: I used this code from another one of your videos :))
@shweta-lodha
@shweta-lodha Год назад
Please refer my How-To-Fix video. All this happened because of breaking changes in API 😊
@shahbazzaman4143
@shahbazzaman4143 Год назад
I have implemented code, works perfectly, Thanks for that, I have question, it is just providing answer from context, Is gpt_index is all about context ? can not get general information like, who is trump or any other information? if there is way please help me with in this code
@shweta-lodha
@shweta-lodha Год назад
This video is about how to get answers based on context. If you want general info, then you can simply achieve that using OpenAI
@gauravrathi5028
@gauravrathi5028 Год назад
Hi Shweta, Very useful tutorial and I followed the same but m always getting the response None for any question, However I kept the document at same place where you have mentioned. Could you please help me out, what could be the reason for the same.
@shweta-lodha
@shweta-lodha Год назад
Please give complete/absolute path and try it. If still it doesn’t work, then issue is not with the input file
@sriramyapriya4110
@sriramyapriya4110 Год назад
Hi, thanks for the great video. I'm a beginner. How do I proceed now that gpt_index has been replaced by llama_index? I'm getting the error "No module named 'gpt_index'
@shweta-lodha
@shweta-lodha Год назад
Yes, there are changes. Please refer my How-To-Fix video, it has the fix.
@pauldad1
@pauldad1 Год назад
This looks like a brilliant tutorial thank you. Please excuse the silly question, but where are you editing your code, I opened IDLE but it must be some other editor/console? Thank you again.
@shweta-lodha
@shweta-lodha Год назад
I am using Visual Studio Code (VS Code). You can install it as it very easy to use. Please make sure to install Python and Jupyter extension from Extensions panel.
@pauldad1
@pauldad1 Год назад
Amazingly helpful, thank you!
@sqlsql4304
@sqlsql4304 Год назад
Very good tutorial, one question if have some logs which contains sensitive data like ip etc, if I feed the logs to the llm will my data move out of my system to the llm model provider's server. If so is there a security threat. I have a presentation to make on using llm to my company and for sure this question will rise, any feedback will be appreciated
@shweta-lodha
@shweta-lodha Год назад
Thanks. Yes, it will go to model provider’s server and it could be a security threat. If privacy is your concern, then my suggestion would be to use Azure OpenAI
@AliRaza-u3u1m
@AliRaza-u3u1m Год назад
Hi Shweta, You did a great job. Can you please help me how to set that environment on which your are doing code.
@shweta-lodha
@shweta-lodha Год назад
Sure. Drop me an email and we will connect
@nikunjpatel6522
@nikunjpatel6522 Год назад
i am getting this error while running code: Output exceeds the size limit. Open the full output data in a text editor--------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[17], line 1 ----> 1 vectorIndex = createVectorIndex('Chatbot') Cell In[14], line 16, in createVectorIndex(path) 13 docs = SimpleDirectoryReader(path).load_data() 15 #create vector index ---> 16 vectorIndex = GPTSimpleVectorIndex(documents=docs,llmPredictor=llmPredictor,prompt_helper=prompt_helper) 17 vectorIndex.save_to_disk('vectorIndex.json') 18 return vectorIndex
@shweta-lodha
@shweta-lodha Год назад
APIs have changed a bit, since I published this video. Please refer the updated documentation, I am sure, it would be easy to fix.
@smart-sg5cs
@smart-sg5cs Год назад
hi shweta your tutorial is really helpful and your knowledge on open Ai. i have also emailed you please reply
@shweta-lodha
@shweta-lodha Год назад
I'll try to respond at the earliest.
@liyuanzhu6111
@liyuanzhu6111 Год назад
Thank you for this wonderful video🎉. I have a question when I was trying it. I run the codes to create vector index,but I cannot find it in the OSDisk. There is no error😂
@shweta-lodha
@shweta-lodha Год назад
If you didn't provide complete path, then it must be in your current directory. Current directory is the one, from where you are running your script.
@SGSaisreenath
@SGSaisreenath Год назад
@Shweta this is brilliant! as usual top notch like any of your other videos, thank you so much for taking time doing this. One question here, can you please provide the differences in the parameter if the same had to be achieved through Azure Open AI with openai.api_base, openai.api_type, openai.api_version, deployment_name - I have been trying to meddle with this but no luck so far..
@shweta-lodha
@shweta-lodha Год назад
Sure, I'll cover this in my Azure OpenAI series, which I started recently :)
@harshilpatel323
@harshilpatel323 Год назад
Hi Shweta, that was a great tutorial! However, I have a question. Just like you used the custom data from the local disk here, How can we use the data from aws/elasticsearch?. I have a huge database (About 20 million records) which our employees access via querying on elasticsearch, and If I wish to create a custom chatbot trained on that data, how would one achieve that?
@aaron6822
@aaron6822 Год назад
i got this error "TypeError: BaseGPTIndex.__init__() got an unexpected keyword argument 'documents'". dont know if i will get any assistance what the heck.
@shweta-lodha
@shweta-lodha Год назад
Please refer my How-To-Fix video
@Mr.AIFella
@Mr.AIFella Год назад
ImportError: cannot import name 'GPTSimpleVectorIndex' from 'llama_index'
@shweta-lodha
@shweta-lodha Год назад
Please check my How To Fix video. I discussed the complete solution there.
@mayurbhor2231
@mayurbhor2231 Год назад
Thanks a lot . Can we use llama_index instead of gpt_index ?
@shweta-lodha
@shweta-lodha Год назад
Yes, you have to use as gpt_index is deprecated. You can refer my GPT_Index breaking changes video for that.
@spicytuna08
@spicytuna08 Год назад
getting this error on line PromptHelper(): chunk_overlap_ratio must be a float between - and 1
@shweta-lodha
@shweta-lodha Год назад
Yes, you need to change this between 0 and 1 due to recent API changes
@SPonharshitaP
@SPonharshitaP Год назад
could this learn from new unlabeled questions provided by the user ? Is this a trainable chatbot which could learn new things every time user asks a new question
@shweta-lodha
@shweta-lodha Год назад
No
@harshvindersingh5330
@harshvindersingh5330 Год назад
Can u help in making similar bot for providing solution to accounts questions in step by step manner accurately!!!
@shweta-lodha
@shweta-lodha Год назад
100% accuracy can’t be guaranteed, this is AI 😊
@joserodolfobeluzo3100
@joserodolfobeluzo3100 Год назад
HI Shweta Lodha! First... Thanks a lot for the tutorial! :) I have a problem with an error. Can You help me? I wrote the same code and use the same data. But when I try to run the code, this error appear: TypeError: __init__() got an unexpected keyword argument 'documents'. I Printed the variable and it contains the book text... The error is on the line: vectorIndex = GPTSimpleVectorIndex(documents=docs,llm_predictor=llmPredictor,prompt_helper=prompt_helper) I looked for it on internet but I didn't understand why there's a problem with the arg "documents"... :/
@joserodolfobeluzo3100
@joserodolfobeluzo3100 Год назад
I solved! :D For anyone that had the some problem I had, here is my function: def createVectorIndex(path): max_input = 1024 tokens = 256 chunk_size = 600 max_chunk_overlap = 20 #define LLM llm_predictor = LLMPredictor(llm=OpenAI(temperature=0, model_name="text-ada-001")) #load data docs = SimpleDirectoryReader(path).load_data() service_context = ServiceContext.from_defaults(llm_predictor=llm_predictor, chunk_size_limit=512) vectorIndex = GPTSimpleVectorIndex.from_documents(docs, service_context=service_context) vectorIndex.save_to_disk('vectorIndex.json') return vectorIndex The problem is: I removed this line: prompt_helper = PromptHelper(max_input,tokens,max_chunk_overlap,chunk_size_limit=chunk_size) Should it be a problem? It worked here without it and with other texts... If it's a problem, could anyone explain the part of the code?
@shweta-lodha
@shweta-lodha Год назад
Please have a look at documentation, in case something has changed. At the time of this video, it was all good.
@shweta-lodha
@shweta-lodha Год назад
You rock! I just created a video on how to fix this :)
@danish1794
@danish1794 Год назад
Hello Shweta Lodha, I have a couple of questions. Firstly, do you have any ideas on how we can reduce the cost of tokens? It would be really helpful if you could make a video explaining any potential solutions. Additionally, as a learner, I'm facing issues with expired APIs. Do you have any suggestions on how I can resolve this problem? Thank you in advance for your help.
@shweta-lodha
@shweta-lodha Год назад
I have already created a video on cost factor, please check my playlist. I didn’t understand- what do you mean by expired API
@SergeyBazyliuk
@SergeyBazyliuk Год назад
ValueError: One of documents or index_struct must be provided. what i need to do with this error?
@shweta-lodha
@shweta-lodha Год назад
Looking like it is not able to generate JSON properly. Please validate your docs
@rayfellers
@rayfellers Месяц назад
As someone just learned how to use GPT-4o Mini to write python code, your explanations are well done.
@congtycophanxaydungo.m.d1735
thanks for your contribution, it's easy to understand for a beginner like me. You can continue to make the next video to guide the question and answer continuously like chatgpt.
@spicytuna08
@spicytuna08 Год назад
there is no longer GPTKeywordVectorIndex. There is GPTSImpleKeywordTableIndex() are they the same?
@gamerak7096
@gamerak7096 5 месяцев назад
Hlo mam i have used the new Llam_Index but it also not working
@shweta-lodha
@shweta-lodha 5 месяцев назад
Lot many changes have happened in last few months. What error are you getting?
@shivansh12
@shivansh12 Год назад
Can I create a chat bot without Openai API key because my free trial is expired in OpenAi
@shweta-lodha
@shweta-lodha Год назад
Unfortunately, you can’t use OpenAI without a key
@haxx6139
@haxx6139 Год назад
Could you please provide me GitHub link for this project ?
@shweta-lodha
@shweta-lodha Год назад
Here you go: shweta-lodha.medium.com/create-chatbot-based-on-the-data-feed-by-you-gpt-index-openai-python-772291576bee
@zhiyingwang1234
@zhiyingwang1234 Год назад
Is my own data imported to openai system in this case? I don't want to breach the company's data confidentiality code.
@shweta-lodha
@shweta-lodha Год назад
Yes
@giadavolpin3564
@giadavolpin3564 Год назад
Thank you so much Shweta! You got me so passionate on the topic. After completing your tutorial how do I move this into a chatbot that I can bring to my app? I’m stuck
@shweta-lodha
@shweta-lodha Год назад
You need web UI
@fakeshirin4642
@fakeshirin4642 Год назад
@@shweta-lodha can you drop a tutorial on that because that would be very helpful
@LearnWithSibin
@LearnWithSibin Год назад
I noticed that in the implementation shown in the video, the GPT model is being called every time a user prompt is received, and this can be expensive in a real-world scenario where the application is serving multiple users concurrently. Each request to the GPT model requires a certain number of OpenAI tokens, and this can quickly add up and become expensive.
@shweta-lodha
@shweta-lodha Год назад
Indeed! For production scenarios, you have to extensively used vector database
@saisantosh4523
@saisantosh4523 Год назад
Ma'am, will this code work offline. I mean not connecting to internet?
@shweta-lodha
@shweta-lodha Год назад
No
@akashgoyal8141
@akashgoyal8141 9 месяцев назад
I got error gpt_index not found when I import it
@shweta-lodha
@shweta-lodha 8 месяцев назад
API has changed and gpt_index is renamed to Llama-Index. Please follow my How-To-Fix playlist
@alexdomla
@alexdomla Год назад
HI! This is a very helpful tutorial. I have a question: How would you bring this to a website? I mean, creating a chat website where you can ask questions and the bot answers based on your custom data. Is it possible? Thanks in advance :)
@shweta-lodha
@shweta-lodha Год назад
Glad you find it useful. Either you can create a website or you can create a widget and plug it onto your website
@SanjanaMagar-d5q
@SanjanaMagar-d5q Год назад
hi Shweta, i tried this code on my end but in { vectorIndex.save_to_disk('vectorIndex.json') } is giving me an error so i tried { index.storage_context.persist('vectorIndex') } this is not creating a vectorIndex.json file on my system its creating a folder name vectorIndex.json inside which i has 4 json file docsstore, graph_store, index_store and vector_store.. can you pls tell me where i am going wrong
@adityakadam2256
@adityakadam2256 Год назад
That's a great video thanks for sharing this. I have a question if you don't mind. How different is this method rather than using Open AI APIs for chat completion, embedding and completion? Thanks.
@shweta-lodha
@shweta-lodha Год назад
Here you can save the vectored index locally and re-read it.
@adityakadam2256
@adityakadam2256 Год назад
@@shweta-lodha Thanks a lot for a prompt reply. One last question. The method you explained under the hood it uses text-ada-002 model for embedding and text-davinci-003 for completion, right?
@shweta-lodha
@shweta-lodha Год назад
Yes, you're right :)
@adityakadam2256
@adityakadam2256 Год назад
@@shweta-lodha thanks for the response and clarification 😁
@emuskk
@emuskk Год назад
Hi when i run this code it is showing that the documents argument is unexpected
@shweta-lodha
@shweta-lodha Год назад
API changes has happened in last few weeks. Please check my ‘How to fix’ video, which I published few days ago
@aryanpatel8140
@aryanpatel8140 Год назад
How to add this to a website
@DandaFundas
@DandaFundas Год назад
Thank you Swetha. It can’t get any better than your explanation with show and tell 👍
@Gapxpag
@Gapxpag Год назад
Hi Shweta, amazing job, hope you can help me: when running vectorIndex = create_index('Knowledge'), I get an error message: Output exceeds the size limit. Open the full output data in a text editor. maybe you know why?
@shweta-lodha
@shweta-lodha Год назад
Hope 'Knowledge' directory exists in the same path, from where you are running your script.
@EllenSimpson-w9n
@EllenSimpson-w9n Год назад
Hi Shweta, this tutorial is amazing! I have one question after running the bot, on my OpenAI usage I am getting text-davinci requests as well as text-embedding-ada-002-v2. Any thoughts on why I am getting the davinci requests?
@shweta-lodha
@shweta-lodha Год назад
I didn’t understand your question completely. Your embeddings would be using text-embedding-Ada-002-v2 model. Don’t you want to use this?
@EllenSimpson-w9n
@EllenSimpson-w9n Год назад
@@shweta-lodha Thank you for your reply. My usage looks like this does this make more sense? 10:55 PM Local time: Apr 26, 2023, 8:55 AM text-davinci, 2 requests 3,805 prompt + 75 completion = 3,880 tokens 10:55 PM Local time: Apr 26, 2023, 8:55 AM text-embedding-ada-002-v2, 1 request 8 prompt + 0 completion = 8 tokens
@EllenSimpson-w9n
@EllenSimpson-w9n Год назад
The bot is also able to answer questions about topics that I have not fed it. I think that it is accessing other sources than what I have fed it.
@ralphanthony5198
@ralphanthony5198 Год назад
Hello, Shweta Lodha! Great job. I really love your videos. And I have a quick question: Do I have to have a paid GPT plan in order for the code to work?
@shweta-lodha
@shweta-lodha Год назад
No necessary. It would work with your free account too, assuming you have required credits.
@ralphanthony5198
@ralphanthony5198 Год назад
@@shweta-lodha Thank you so much., Shweta. But I will get me a subscription today anyhow. I don't want to ran out of credits. With Love from Tijuana. You are great!
@jeffersonhope2668
@jeffersonhope2668 Год назад
Outstanding preparation and presentation. Thanks so much!
@shweta-lodha
@shweta-lodha Год назад
Glad you enjoyed it!
@youwang9156
@youwang9156 Год назад
appreciate for your work, just wonder if this method works for extracting specific number ? like i want to extract some price for mutilple products
@shweta-lodha
@shweta-lodha Год назад
Yes, I tried this and in most of the cases, I got accurate output.
@youwang9156
@youwang9156 Год назад
@@shweta-lodha thank u so much for reply
@nofussfixer
@nofussfixer Год назад
vectorIndex = GPTSimpleVectorIndex(documents = docs, llm_predictor = llm_predictor, prompt_helper=prompt_helper) This is not recognizing documents argument. vectorIndex = GPTSimpleVectorIndex(documents = docs, llm_predictor = llm_predictor, prompt_helper=prompt_helper) TypeError: __init__() got an unexpected keyword argument 'documents'
@shweta-lodha
@shweta-lodha Год назад
Please check my ‘How to fix’ video which I posted lately. It will solve your problem, which occurred due to API change 👍🏻
@mneama4383
@mneama4383 Год назад
Thanks a lot great video , just want to know if all my data is stored in sharepoint how can i take them all into the same mechanizm u did thanks again for this great tutorial
@rajparmar6420
@rajparmar6420 7 месяцев назад
hi shweta, does this take structured data like csv or excel for manipulate any data?
@PoojaSinha-ir3rw
@PoojaSinha-ir3rw Год назад
Please how to use ChatGPT code in wix
@shweta-lodha
@shweta-lodha Год назад
Please create a widget and plug in.
@Shailukool
@Shailukool Год назад
Hii need your help. I have followed exact same steps but facing below issue. I have given pip install gpt_index and got response same as shown in your video then when I am giving from gpt_index import SinpleDirectoryReader code then I am getting error Module not found “gpt_index” I tried uninstalling, re-installing and checking on chatgpt but failed for everything. Plz plz plz plz help
@shweta-lodha
@shweta-lodha Год назад
Please check my most recent How-To-Fix video. It contains the solution
@Bludgeoned
@Bludgeoned Год назад
Hi, it seems I can’t find VectorSimpleIndex, has it been replaced by VectorStoreIndex?
@shweta-lodha
@shweta-lodha Год назад
Please check my latest video: How to Fix[GPT-Index]: Fixing GPT-Index Related Broken Pieces
@Bludgeoned
@Bludgeoned Год назад
@@shweta-lodha because it's llama_index right?
@shweta-lodha
@shweta-lodha Год назад
Absolutely!
@aggelosbb
@aggelosbb Год назад
Can you feed it more than 1 files?
@shweta-lodha
@shweta-lodha Год назад
Yes
@rdhaneshm22
@rdhaneshm22 Год назад
Instead of files can we feed data from db?
@shweta-lodha
@shweta-lodha Год назад
Directly you can’t inject but yeah there are ways to achieve this .
@thebicycleman8062
@thebicycleman8062 Год назад
people that use light mode scare me...
@shweta-lodha
@shweta-lodha Год назад
I really didn’t mean to scare you 🤣
@homemadefoodgasm
@homemadefoodgasm Год назад
This is helpful, but how will I get it to the openai version, is there any way to upload my knowledge base to open ai, so that it will give me answer according to my needs?
@shweta-lodha
@shweta-lodha Год назад
OpenAI just provide you with a model, you can use any vector based db to save your information.
@shitaldhakne7989
@shitaldhakne7989 Год назад
Hi shweta, this is very helpful tutorial. I tried this code but after asking question, it is not responding...I waited for 15 minutes...still no response.
@shweta-lodha
@shweta-lodha Год назад
Are you using VS Code? If so, please check your terminal, your py file or command box
@ShantanooKirtane-y1m
@ShantanooKirtane-y1m Год назад
Hi @shweta Lodha - I followed all the steps mentioned in your videos. Also, followed this ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-E6Fi2ZVkO1U.html to fix errors but whenever I run the code to index the document i get rate limiting error. I have checked my openAI dashboard and I do not see any rate-limiting violations there
@shweta-lodha
@shweta-lodha Год назад
This error appears because of the frequency of your requests. Please try to reduce it and check with paid account
@michelletang5314
@michelletang5314 Год назад
Thanks for the video but I have problem with the code After typeing: vectorIndex = createVectorIndex('Knowledge') it shows an error: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[16], line 1 ----> 1 vectorIndex = createVectorIndex('Knowledge') may I know what to do?
@shweta-lodha
@shweta-lodha Год назад
In my case, Knowledge is the directory name. You need to replace this with yours.
@educationdelightenglish3819
madam, I am from India, after doing tons of research on ChatGPT API ,this is the best! I am working on Linux platform and have Jupyter notebook, will it work in that env?
@shweta-lodha
@shweta-lodha Год назад
Yes, it should.
@noronhasanjay
@noronhasanjay Год назад
I am having issues installing gpt_index. I install it using pip install but when I do a pip list I see gpt-index (note the hyphen). I then cannot import gpt-index. Has anyone faced this problem? Thank you.
@shweta-lodha
@shweta-lodha Год назад
GptIndex doesn’t exist anymore, it has been renamed. Please check my how to fix video on breaking changes of gptIndex
@noronhasanjay
@noronhasanjay Год назад
@@shweta-lodha Thanks Shweta. Just saw the other video. Much appreciated.
@noronhasanjay
@noronhasanjay Год назад
Shweta, please note that llama_index does not have GPTSimpleVectorIndex
@shweta-lodha
@shweta-lodha Год назад
It has been changed to GPTVectorStoreIndex.
@faisalsaddique3323
@faisalsaddique3323 Год назад
This is really useful, Shweta! Thank you so much for making such an awesome content.
@shweta-lodha
@shweta-lodha Год назад
Glad you think so!
@iulihardt9368
@iulihardt9368 Год назад
Hi, I done it with sucess! really thank you! However its possible to start one chat as the last part of the video and save where it stop and come back in other moment?
@shweta-lodha
@shweta-lodha Год назад
Glad you find it useful. You need to save your chat history and refer it whenever you're starting your conversation next time.
@RISHIKESWARANSURKRA
@RISHIKESWARANSURKRA Год назад
INFO:openai:error_code=None error_message='You exceeded your current quota, please check your plan and billing details.' error_param=None error_type=insufficient_quota message='OpenAI API error received' stream_error=False what if my new email account new API key free trial usage shown like this means what can I do am using newly by seeing your video but while executing it showing like this I tried other openai API key's also
@shweta-lodha
@shweta-lodha Год назад
Please go to platform.openai.com/account/usage and see, if you have balance there. If your balance is 0, then you have to buy subscription.
@karthikeyand6678
@karthikeyand6678 Год назад
@Shweta, Awesome video and Thanks for sharing.. I have data in CSV which has many text columns and many rows. I want to build chat application based on the data. Can you please let me know how can i implement this .
@shweta-lodha
@shweta-lodha Год назад
You can read CSV in memory, chunk it and you’re good to go
@vy1330
@vy1330 Год назад
Mam it is use this without inter ah mam
@shweta-lodha
@shweta-lodha Год назад
No
@thinanadl4939
@thinanadl4939 Год назад
Hi @shweta, can this bot integrate with any database..?
@sambeetsahu3045
@sambeetsahu3045 8 месяцев назад
How to store the coversation history
@shweta-lodha
@shweta-lodha 8 месяцев назад
You can maintain in memory and later on dump it wherever you want
@madakuse
@madakuse Год назад
I try to run this line but I got the error line vectorIndex = createVectorIndex('knowledge') --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[5], line 1 ----> 1 vectorIndex = createVectorIndex('knowledge') NameError: name 'createVectorIndex' is not defined
@madakuse
@madakuse Год назад
Ok i fixed this. Can I put pdf files in the folder and make this read all of them? I tried copying your codes from your blog that's why I have the issues previously.
@shweta-lodha
@shweta-lodha Год назад
There is different way to read pdf. Same approach won’t work for pdf
@ibrahimjaballa2706
@ibrahimjaballa2706 Год назад
I am a beginner When using gpt chat, do I have to get the API from it, or can I get it from anywhere?
@shweta-lodha
@shweta-lodha Год назад
Please get it from Openai.com
@sumankalyanghosh645
@sumankalyanghosh645 Год назад
The code snippet that you have shared is not working. It always gives RateLimitError. Do you mind to have a look at it?
@shweta-lodha
@shweta-lodha Год назад
RateLimitError depends on your data, frequency of your request and the OpenAI plan you opted for. You can work on any of these individual pieces to sort this out. Hope this helps.
@sumanghosh6326
@sumanghosh6326 Год назад
Post, llama-index replaced by gpt-index, I am getting the error during creation of vector index. Wondering if anyone else was also facing the same. INFO:openai:error_code=404 error_message='Resource not found' error_param=None error_type=None message='OpenAI API error received' stream_error=False
@shweta-lodha
@shweta-lodha Год назад
Please check out my How-To-Fix videos. Perhaps they can help you 😊
@oreos_overdose
@oreos_overdose Год назад
Hello and thanks for the video. Very useful. Is it possible to use a sphinx generated website (essentially a handful of html pages) as the resource documents instead of a plan txt file?
@bombibombi7258
@bombibombi7258 Год назад
Hello, how to insert into new knowledge into json file?
@shweta-lodha
@shweta-lodha Год назад
You can append it
@bombibombi7258
@bombibombi7258 Год назад
@@shweta-lodha I mean into vector index
@kaushambichandel8185
@kaushambichandel8185 Год назад
can we access the api for free?
@shweta-lodha
@shweta-lodha Год назад
Until you exhausted your free credits 😄
@leoheise9967
@leoheise9967 Год назад
hey, any tips on how to fine tune a model based on a very large pdf document without the " " to split prompt/resolution? I thought maybe have a script break down in every question mark? Or is there some other way?
@shweta-lodha
@shweta-lodha Год назад
I'm going to publish a video on this today. Stay tuned!
@reymardp
@reymardp Год назад
Hi, just want to ask if the data that I will feed will be exposed to public or to openAI? Is this safe for business? Thank you.
@shweta-lodha
@shweta-lodha Год назад
IT would be exposed to OpenAI. If you are concerned about security part, I would recommend you to check Azure OpenAI.
@kareemmatouk
@kareemmatouk Год назад
Hey so im wondering How I can create a interface once I have made my language model.
@shweta-lodha
@shweta-lodha Год назад
You can go for flask
@Fluttydev
@Fluttydev Год назад
Can we add memory to this?
@shweta-lodha
@shweta-lodha Год назад
Yes, you can
@RitvikGautam-p9z
@RitvikGautam-p9z Год назад
Hi shweta please tell which extensions you have used in VS code for this video
@shweta-lodha
@shweta-lodha Год назад
Jupyter
@satishkumar-ir9wy
@satishkumar-ir9wy Год назад
I have not found such a detailed explanation of Open AI based Chat bot, Thankyou for Sharing. Can you please make a video about how i can feed my NLP based ML model to create a Chat bot based on ChatGPT.
@shweta-lodha
@shweta-lodha Год назад
Yes, soon
@jmisc
@jmisc Год назад
How do we load multiple data, and will the script and OpenAI remember the prior conversation?
@shweta-lodha
@shweta-lodha Год назад
For memory, you need to change this implementation a bit
@jimbadans609
@jimbadans609 Год назад
thank you for this video. i keep getting the error: NameError: name 'createVectorIndex' is not defined. what am i doing wrong please
@shweta-lodha
@shweta-lodha Год назад
Have you defined the function named createVectorIndex() ?
@nikunjpatel6522
@nikunjpatel6522 Год назад
also getting this as well Output exceeds the size limit. Open the full output data in a text editor
@shweta-lodha
@shweta-lodha Год назад
This is because you have restricted the output length for Jupyter. You can open it in notepad to see full error. Not a big deal 👍🏻
Далее
Run your own AI (but private)
22:13
Просмотров 1,5 млн
МОЮ ТАЧКУ РАЗБИЛИ...!
39:06
Просмотров 281 тыс.
Has Generative AI Already Peaked? - Computerphile
12:48
Use Open AI (ChatGPT) On Your Own Large Data -Part 1
23:32
МОЮ ТАЧКУ РАЗБИЛИ...!
39:06
Просмотров 281 тыс.