Day 11 - Develop ChatBot from Scratch with SQL Database including Memory

  Рет қаралды 3,340

Rajesh Srivastava

Rajesh Srivastava

Күн бұрын

Пікірлер: 22
@genieincodebottle
@genieincodebottle 3 ай бұрын
Star this GitHub repo to stay updated on the latest trends, updates, and interview questions related to GenAI. GitHub - github.com/genieincodebottle/generative-ai GenAI Interview Q&A - github.com/genieincodebottle/generative-ai/blob/main/docs/GenAI_Interview_Questions-Draft.pdf GenAI Roadmap - github.com/genieincodebottle/generative-ai/blob/main/GenAI_Roadmap.md
@swarupbiswal6632
@swarupbiswal6632 3 ай бұрын
Hi Rajesh , For tables which columns are not related to users question different tables have samw columns waht should be the approach ?
@genieincodebottle
@genieincodebottle 3 ай бұрын
Bro..I didn't get the question properly. Could you please elaborate that a bit more?
@seththunder2077
@seththunder2077 8 ай бұрын
I have a question about the parser. So you are using llm | parser so does that mean the output parser does not take what our prompt is into consideration as well since its just llm and parser?
@genieincodebottle
@genieincodebottle 8 ай бұрын
Prompt will always be there considering output but strparser is more standardised overrides prompt input for formatting. That's what I see
@siddheshphaple342
@siddheshphaple342 8 ай бұрын
How I can make this production ready? Also what if I host it (streamlit) do i have to give my db details on cloud?
@genieincodebottle
@genieincodebottle 8 ай бұрын
The process shown in video is good for POC but for production ready you need to consider few things. I take an example of AWS to explain that 1- Use AWS Lambda for writing business logic excluding UI part. You can write code and deploy at EC2 or EKS instances but Lambda is good for start as it’s pay per uses. 2- We can use AWS RDS that support different sql databases instead of sqlite. For advanced use cases we can use AWS S3, Glue, Athena as well these are data lake’s capabilities in AWS. 3. To store passwords and secrets we can use AWS secret managers that can be accessed via configuration or code. 4- UI can be used as React/ Angular etc and can be deployed to AWS S3 The same type of concept can be used for different clouds as well. I will create video later to deploy the similar type of application on AWS.
@seththunder2077
@seththunder2077 8 ай бұрын
Also can you please make a video similar but instead of using sqlite, we use common dbs like MySql for example? All the YT videos available and examples available use SQL lite just because its a lot easier to use but your videos has always been doing different things and I’d highly appreciate doing something different like a different type of DB
@genieincodebottle
@genieincodebottle 8 ай бұрын
Thanks buddy. I will create video with MySQL or any other SQL Database in sometime. I can provide code to connect different SQLDatabase In case if you are interested. It's almost similar but with some more syntax.
@seththunder2077
@seththunder2077 8 ай бұрын
@@genieincodebottle yes I’m personally very interested with MySQL
@seththunder2077
@seththunder2077 7 ай бұрын
@@genieincodebottle Yes please I'd be very interested in it. I'm still in university and learning these stuff which I'm a bit confused about so any help is appreciated.
@swapnilwagh-uv7zl
@swapnilwagh-uv7zl 7 ай бұрын
@rajesh ... i want to give an output prompt to this code for customization can you please help me how to do thiis ? db_chain = SQLDatabaseChain.from_llm( llm, db, memory=memory, prompt=prompt, return_direct=True,verbose=True, ) output_parser = StrOutputParser() chain = llm | output_parser except Exception as e: raise e return db_chain, chain i TRIED THIS.. db_chain = SQLDatabaseChain.from_llm( llm, db, memory=memory, prompt=prompt, return_direct=True,verbose=True, ) output_prompt=PromptTemplate(input_variables=[],template="""add *** to the end of the output to indicate the end of the output""") output_parser = StrOutputParser() chain = output_prompt | llm | output_parser But its not working
@genieincodebottle
@genieincodebottle 6 ай бұрын
Sorry for late reply Bro. I was busy with many other things. Let me check that if it's still not sorted
@swapnilwagh4725
@swapnilwagh4725 6 ай бұрын
Heyy Thanks for getting back to me. Its not sorted yet. Can you please look into it.
@asthajain7207
@asthajain7207 7 ай бұрын
Can i use sql sever management instead of sqlite
@genieincodebottle
@genieincodebottle 7 ай бұрын
Yes. Just need to change connection string compatible to sql server. You can find that at langchain docs. Onlything few prompts modification needed may be. But you can try that
@shyamkumarreddyanugu1020
@shyamkumarreddyanugu1020 8 ай бұрын
Does this work with Gpt 3.5 turbo ?
@genieincodebottle
@genieincodebottle 8 ай бұрын
It should work. Just need to change model to gpt and change of prompt if needed.
@phuonganhtrinh7654
@phuonganhtrinh7654 7 ай бұрын
Thanks for the video. I met problem with just modifying to OpenAI instead of Gemini, evenif I did add the OpenAI api key "C:\Users\Admin\anaconda3\envs\spark_env\Lib\configparser.py", line 1273, in __getitem__ raise KeyError(key) KeyError: 'OPENAI_API_KEY'. Hope you can help me. Thanks a lot
@genieincodebottle
@genieincodebottle 7 ай бұрын
He Bro .. Sorry for late reply. I missed msg. Have you added OPENAI_API_KEY at config file or you can use directly at the code
@phuonganhtrinh7654
@phuonganhtrinh7654 7 ай бұрын
@@genieincodebottle I did add OPENAI_API_KEY at config file
Day-12 Important Generative AI Interview Questions to prepare
15:58
Rajesh Srivastava
Рет қаралды 531
А что бы ты сделал? @LimbLossBoss
00:17
История одного вокалиста
Рет қаралды 11 МЛН
Wait for it 😂
00:19
ILYA BORZOV
Рет қаралды 9 МЛН
버블티로 부자 구별하는법4
00:11
진영민yeongmin
Рет қаралды 28 МЛН
How to whistle ?? 😱😱
00:31
Tibo InShape
Рет қаралды 23 МЛН
Chat with SQL and Tabular Databases using LLM Agents (DON'T USE RAG!)
58:54
Farzad Roozitalab (AI RoundTable)
Рет қаралды 65 М.
Day-10 Develop Text-to-Sql generation system with Google Gemini Pro LLM
40:07
Vector Database Explained | What is Vector Database?
6:52
codebasics
Рет қаралды 92 М.
Chat with MySQL Database with Python | LangChain Tutorial
37:11
Alejandro AO - Software & Ai
Рет қаралды 52 М.
John Mearsheimer: Israel is in Deep Trouble
12:49
The Chris Hedges YouTube Channel
Рет қаралды 139 М.
Domain-Driven Design: The Last Explanation You'll Ever Need
21:05
Software Developer Diaries
Рет қаралды 7 М.
А что бы ты сделал? @LimbLossBoss
00:17
История одного вокалиста
Рет қаралды 11 МЛН