LangChain on Microsoft Azure - ChatBot with Azure Web Service & Azure Cognitive Search

  Рет қаралды 10,378

Coding Crash Courses

Coding Crash Courses

Күн бұрын

Today, we're diving deep into the futuristic world of chatbots, powered by the dynamic LangChain and hosted on Microsoft's cloud giant - Azure. If you've ever wondered about integrating chat functionalities with cloud databases, or if phrases like "Azure Blob Storage" or "Cognitive Search" tickle your tech-senses, you're in for a treat! We're not just discussing theories; I'll be guiding you through a practical, step-by-step journey to deploy your very own chatbot.
Code: github.com/Coding-Crashkurse/...
Timestamps:
0:00 Introduction to MS Azure
2:22 Create Ressource Group
3:18 Blob Storage & Upload
8:02 Azure Cognitive Search
13:42 Streamlit Web Application
16:38 Container Registry
20:28 Deploy Image to Azure Web Service
24:47 Result
#langchain #azure #azureservices

Пікірлер: 59
@balh2325
@balh2325 7 ай бұрын
This was really great, seriously the best tutorial I've seen on Azure integration with LangChain! Just wanted to add some dependencies I needed to integrated on my end as of the date I post this comment that I needed to install on top of the requirements.txt. Some potential additional dependencies people might need to add are: pip install unstructured pip install unstructured[pdf] # if you want to upload PDF files pip install tiktoken pip install azure-search pip install openai pip install azure-search-documents==11.4.0b8 pip install azure-identity Also, if you're building your docker container from an M1 Mac you may need to transpile your container using --platform=linux/amd64, so my command for build looked more like: docker buildx build --platform=linux/amd64 -t . I was running into issues with my app service but after building my docker container like this on my M1 mac it appeared to fix it. Thanks once again for this great tutorial!
@codingcrashcourses8533
@codingcrashcourses8533 7 ай бұрын
Thank you. I pinned your comment
@uhtexercises
@uhtexercises 9 ай бұрын
Awesome walkthrough. These cloud service UIs are so convoluted and overwhelming when just getting started. This video really puts together all pieces of the puzzle. Thank you for sharing
@AliendaroN
@AliendaroN 11 ай бұрын
Man this is brilliant. One of the few creators who go beyond Notebooks.
@Leonid.Shamis
@Leonid.Shamis 11 ай бұрын
Very educational and informative content, thank you very much!
@crisgath3512
@crisgath3512 11 ай бұрын
Always elevating your content level. Thanks!
@prasenjitgiri919
@prasenjitgiri919 9 ай бұрын
this is a magnificent tutorial, ty!
@softvision3000
@softvision3000 8 ай бұрын
Thank you for this great tutorial! The most I learned was during fixing all the errors you luckily kept in the video. Please keep it that way, as barely all goes smooth from beginning. Due to the new API version of OpenAI, i faced even more issues, but could finally make it run.
@codingcrashcourses8533
@codingcrashcourses8533 8 ай бұрын
The langchain Team currently works on integrating openai 1.0. Will work Soon hopefully
@Namrata766
@Namrata766 4 ай бұрын
Thanks for uploading this. It is one of the best, simplest and working solutions available online. I created my first AI application after learning from this video. Please keep up the good work. And once again, thanks a ton. 😊
@codingcrashcourses8533
@codingcrashcourses8533 4 ай бұрын
Thank you
@syedhaideralizaidi1828
@syedhaideralizaidi1828 11 ай бұрын
This is so helpful. Please do more of videos covering azure services with LLM-powered Applications.
@codingcrashcourses8533
@codingcrashcourses8533 11 ай бұрын
thanks. Thought of something like tracking changes in a blogstorage and trigger building a new index with azure functions. I am also still experimenting with this, since there are few best practices :)
@TheVinaysuneja
@TheVinaysuneja 10 ай бұрын
Very good video !!
@paragdave76
@paragdave76 9 ай бұрын
Excellent video, nicely explained. Thank You! Pls share if you have video for leveraging Azure COSMOS DB as a Vector store.
@shashanksagar4878
@shashanksagar4878 Ай бұрын
Amazing video, along with the retrieved answer, how do I allow the user to print the relevant document as reference from the blob storage.
@brunomottini88
@brunomottini88 7 ай бұрын
Excelente video papa
@sung3898
@sung3898 7 ай бұрын
Thank you for the great content. Quick question. Why did you upload your data to Azure blob instead of just loading the txt file using TextLoader?
@codingcrashcourses8533
@codingcrashcourses8533 7 ай бұрын
Just to integrate more azure features. If you have an app in production, your data will probably not live in a persons PC:)
@LURASASA
@LURASASA 10 ай бұрын
Thank you for this excellent video! I followed your instructions and created the vector store in a Search service, pushed the Docker image to a container registry, and created the App service. However, I encountered some issues when I tried to run it. The Log stream showed this error message: “Container appXXX didn’t respond to HTTP pings on port: 80”. I have tried various solutions, such as changing the python-lite versions, adding EXPOSE 80 to Dockerfile, adding WEBSITES_PORT 80 to the app service, and so on, but none of them worked. I also got this error from Azure diagnostics: “The error message indicates that the container is unable to start due to an exec format error…exec /usr/local/bin/streamlit: exec format error”. I am really stuck and frustrated. Could you please give me some advice on how to fix this problem? I would really appreciate your help.
@codingcrashcourses8533
@codingcrashcourses8533 10 ай бұрын
Does the App run on 0.0.0.0? Thats is needed for a Container. Otherwise it is only accessible from inside the container. EXPOSE does not have any effect by the way.
@LURASASA
@LURASASA 10 ай бұрын
The Docker image built on my macOS M1 wasn't compatible with Azure Linux environment. Forced Docker to build the image for AMD64 and it was solved. Hope it helps.
@user-lv7wo4nl5n
@user-lv7wo4nl5n 11 ай бұрын
hi, thank you very much for such a beautiful content. does any of the steps mentioned requires payment?
@codingcrashcourses8533
@codingcrashcourses8533 11 ай бұрын
The Image registry costs a few bucks, but you can also deploy the app as Code instead of a container
@toanda76
@toanda76 8 ай бұрын
How to load the PDF files on the blob? If the directory on the blob have multi file types as pdf, txt, csv,... How to load it? thanks.
@codingcrashcourses8533
@codingcrashcourses8533 8 ай бұрын
Azure has a very good Python SDK, which allows you to do that easily. If you have different files, you have to use different Loaders. You can use a Factory Pattern to select the correct loader, based on the file ending
@HushingDonner
@HushingDonner 9 ай бұрын
Nice step by step tutorial. Now, how do I add custom metadata to cognitive search as custom fields and make it part of vector_store.add_documents() method?
@codingcrashcourses8533
@codingcrashcourses8533 9 ай бұрын
add_documents takes list of Documents. These contain a metadata field which you can update as you wish. Take a look at it´s implementation, it´s one of the core classes of langchain. [ Document { pageContent: "Hello world", metadata: { id: 2 } }
@user-gr9ty1se6q
@user-gr9ty1se6q 7 ай бұрын
Do you have an idea how to delete these files? You just have to delete them from the blob, or how do you delete them from the cognitive search index?
@codingcrashcourses8533
@codingcrashcourses8533 7 ай бұрын
You could use Azure Functions which are triggered by an Event in your Blob Storage. That function then triggers the indexing logic in ACS.
@fealgu100
@fealgu100 3 ай бұрын
Does anyone know if running the docker builds will eat all the computer space? Using docker desktop
@codingcrashcourses8533
@codingcrashcourses8533 2 ай бұрын
What you mean? You ask what to do If that happens or you want to know what to do against it?
@mEuclide
@mEuclide 11 ай бұрын
Hi. Thank you for this interesting video. Why don't you use Azure OpenAI?
@codingcrashcourses8533
@codingcrashcourses8533 11 ай бұрын
Its currently not available for everybody. I am at least not allowed to create a Ressource.
@nicolaslee5722
@nicolaslee5722 10 ай бұрын
I'm using azure open ai, would there be Any modification to the files
@user-rv8bq9nw3j
@user-rv8bq9nw3j 7 ай бұрын
Hi is there any option to download the output file
@codingcrashcourses8533
@codingcrashcourses8533 7 ай бұрын
can you say what exact part of the video you relate to and what you want to download? then I may help you :)
@prateeklath
@prateeklath 10 ай бұрын
Hi, i need 1 small help, i am able to load container, but what about if i have to load a directory under a container, not entire container.
@codingcrashcourses8533
@codingcrashcourses8533 10 ай бұрын
Can you be a little bit more specific, with an example?
@prateeklath
@prateeklath 10 ай бұрын
@codingcrashcourses8533 yes. I want to load documents from container/myfolder directory for chunking. The example shows only for container. But when i m trying to put slash after container it is showing me error
@codingcrashcourses8533
@codingcrashcourses8533 10 ай бұрын
@@prateeklath what error? path not found? Make sure you are accessing the correct path. You can maybe try use the docker exec command to debug this: stackoverflow.com/questions/30172605/how-do-i-get-into-a-docker-containers-shell
@prateeklath
@prateeklath 10 ай бұрын
@codingcrashcourses8533 yes invalid resource uri. I will be trying azur bobclient service to test. I have to add multiple files from directory under container for chunking
@prateeklath
@prateeklath 10 ай бұрын
@codingcrashcourses8533 i resolved the problem by passing myfolder/filename in blob name parameter
@saurabhjain507
@saurabhjain507 9 ай бұрын
Please make more videos on Azure OpenAI. Thank you for the video
@codingcrashcourses8533
@codingcrashcourses8533 8 ай бұрын
I will probably make a full course on that for Udemy with event driven document updates, blobstorage, ACS and more :)
@saurabhjain507
@saurabhjain507 8 ай бұрын
I am going to enroll in that course for sure!
@paulatreides7547
@paulatreides7547 10 ай бұрын
I tried but I could not get this to run, when attempting to create the index I get the following errors: dimensions is not a known attribute of class and will be ignored azure.core.exceptions.HttpResponseError: (InvalidRequestParameter) The request is invalid. Details: definition : The vector field 'content_vector' must have the property 'dimensions' set. Code: InvalidRequestParameter Message: The request is invalid. Details: definition : The vector field 'content_vector' must have the property 'dimensions' set. Exception Details: (InvalidField) The vector field 'content_vector' must have the property 'dimensions' set. Parameters: definition
@codingcrashcourses8533
@codingcrashcourses8533 10 ай бұрын
99% the wrong version of azure-cognitive-search. Which one do you use?
@paulatreides7547
@paulatreides7547 10 ай бұрын
Thanks, I changed the version and now it runs but I'm working through another error. I can create the indexes and store the documents. When I try to run the application the streamlit service starts and I can input a question then it crashes. I'm getting the following error: raise Exception(f"Error in search request: {response}") Exception: Error in search request:
@eriklindquist5025
@eriklindquist5025 10 ай бұрын
What version did you change it to and how?
@eriklindquist5025
@eriklindquist5025 10 ай бұрын
I have a similar error but it is related to failing to make a connection and I am using azure-search-documents 11.4.0b8 azure.core.exceptions.ServiceRequestError: : Failed to establish a new connection: [Errno 11001] getaddrinfo failed
@codingcrashcourses8533
@codingcrashcourses8533 10 ай бұрын
@@eriklindquist5025 for me that looks like an DNS misconfiguration, not something related to the package
@user-fg4ht4fx3d
@user-fg4ht4fx3d 4 ай бұрын
many thanks, could you explain by example how I can create data source, skillset, index and indexer on Azure AI Search :) pllllllllllllllllz 🤗
@codingcrashcourses8533
@codingcrashcourses8533 4 ай бұрын
Currently no plans to do that, sorry! I don´t like ACS at all :/
@user-ot9pj3ge2g
@user-ot9pj3ge2g 3 ай бұрын
That was great! I just got an error on the live app, everytime I search says MissingSchema: Invalid URL on File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 439, in prepare_url raise MissingSchema(
@codingcrashcourses8533
@codingcrashcourses8533 3 ай бұрын
Did you enter your own URL? Please check if you made any mistakes. My guess would be that the format is wrong
DataStreaming with LangChain & FastAPI
8:51
Coding Crash Courses
Рет қаралды 15 М.
DO YOU HAVE FRIENDS LIKE THIS?
00:17
dednahype
Рет қаралды 105 МЛН
Scary Teacher 3D Nick Troll Squid Game in Brush Teeth White or Black Challenge #shorts
00:47
Does size matter? BEACH EDITION
00:32
Mini Katana
Рет қаралды 18 МЛН
KINDNESS ALWAYS COME BACK
00:59
dednahype
Рет қаралды 152 МЛН
Introducing Vector Search in Azure Cognitive Search | Azure Friday
21:36
Azure OpenAI BYOD: ChatGPT with Your Own Data!
9:07
Dan Wahlin
Рет қаралды 45 М.
OpenAI Embeddings and Vector Databases Crash Course
18:41
Adrian Twarog
Рет қаралды 422 М.
RAG at scale: production-ready GenAI apps with Azure AI Search | BRK108
46:33
Building an Agent to Query a SQL Database and Analyze Data
26:21
Build a RAG app in minutes using Langflow OpenAI and Azure | StudioFP101
16:12
AZ-305 Designing Microsoft Azure Infrastructure Solutions Study Cram - Over 100,000 views
3:38:35
John Savill's Technical Training
Рет қаралды 425 М.
DO YOU HAVE FRIENDS LIKE THIS?
00:17
dednahype
Рет қаралды 105 МЛН