Build Your Own OpenAI + LangChain Web App in 23 Minutes

2024 ж. 14 Мам.
39 603 Рет қаралды

Twitter: / gregkamradt
Newsletter: mail.gregkamradt.com/signup
Link to the app: globalize.streamlit.app/ Note: I now ask for your API key now that the free $25 is up. Thanks everyone!
Code: github.com/gkamradt/globalize...
Go try it out! First $25 of API calls are free. If you see that I ask you for your OpenAI API key then my wallet ran out :)
Careful: Only use extremely temporary API keys with this app. Although I don't store any data, I can't vouch for Streamlit. Revoke any key after you're done trying it out with this app.
App made using streamlit.io/
0:00 - The Setup & Hook
1:25 - Streamlit Overview
7:31 - Building Globalize Text App
19:00 - Deploy To Streamline
21:12 - Live App
22:42 - Outro
See the code for that app here: github.com/gkamradt/globalize...
This is based on the example in the official LangChain documentation: github.com/hwchase17/langchai...
Lazy Aftermoon by | e s c p | escp-music.bandcamp.com
Music promoted by www.free-stock-music.com
Creative Commons / Attribution 4.0 International (CC BY 4.0)
creativecommons.org/licenses/...

Пікірлер
  • Bless people with intellect and talent who are willing to help those who cannot repay them.

    @jeffreysoto4068@jeffreysoto4068 Жыл бұрын
  • I appreciate the hard work you did and the way you explain things. Thanks for making such content.

    @mohammadaqdas7998@mohammadaqdas7998 Жыл бұрын
    • Thanks for the kind words

      @DataIndependent@DataIndependent Жыл бұрын
  • Your channel is the most relatable as far as these ai api videos go. Articulate explanations. Great content. I’d love to explore your github repositories or notebooks. Any links?

    @vinosamari@vinosamari Жыл бұрын
    • Nice! Thank you. Code links are in the description

      @DataIndependent@DataIndependent Жыл бұрын
  • Great content, thank you. Really looking forward to seeing what you decide to cover next. Subscribed! ✅

    @mrwadams@mrwadams Жыл бұрын
    • Thanks! What're you building and want to see?

      @DataIndependent@DataIndependent Жыл бұрын
    • @@DataIndependent I'm looking at use cases for applying LLMs in the field of cyber security. For example, I'm currently working on an app to help teams improve the quality and consistency of their threat models. In terms of new content, I'd like to see videos on more advanced use of agents, as well as potential alternatives for LangChain.

      @mrwadams@mrwadams Жыл бұрын
  • Awesome content ! I could build a small app helping a dog shelter staff picking name for dogs by entering a short description and letting chat GPT come up with names. Only took me a few hours, including learning the tools.

    @JustinLoroy@JustinLoroy Жыл бұрын
    • Nice! That's super cool. Congrats on the tool.

      @DataIndependent@DataIndependent Жыл бұрын
    • it's great idea for the app. tech is not the key, the idea is

      @ziyewang1647@ziyewang16479 ай бұрын
  • Thanks for sharing - great project.

    @Myhands14@Myhands14 Жыл бұрын
  • very nice tutorial, thx and god bless you and the world... regards from hong kong ^_^

    @wuyanchu@wuyanchu5 ай бұрын
  • Love your work, thx for sharing!

    @Dasein031@Dasein031 Жыл бұрын
    • Nice! Thank you

      @DataIndependent@DataIndependent Жыл бұрын
    • @@DataIndependent what would be super useful is to learn how I can use chatgpt to understand user's intend to to call specific services - ex: I am yelp and have data in terms of specific venues. Can you use chatgpt to understand the intend (I want mexican food and am in SF) to call the YELP API on mexican food venuesin SF . Apologies for the trivial example but this would hlpe enterprises use chatgpt to use with their existing services.

      @Dasein031@Dasein031 Жыл бұрын
  • The best content in the industry. No financial gateway to the content no pay me for thr info bs. Hats off. Real thought leaders

    @ChatGPT-ef6sr@ChatGPT-ef6sr Жыл бұрын
    • Nice! Glad to hear it. I've thought about monetizing it but I usually do that when people want custom solution and advice, not for the general work!

      @DataIndependent@DataIndependent Жыл бұрын
  • Great, Thanks very much for the content

    @juancolamendy@juancolamendy Жыл бұрын
  • Watching all your videos

    @RossPfeiffer@RossPfeiffer Жыл бұрын
  • I just found your channel and really like your content...after watching this I feel like my scam emails are gonna be so well written in the future. Not your fault though haha, keep up the good work brother!

    @truemicro221@truemicro221 Жыл бұрын
    • Thanks - Use it for good!

      @DataIndependent@DataIndependent Жыл бұрын
  • I have been enjoying your videos as I am learning to build similar tools for a travel agency, just curious in this scenario is there any difference between using langchain prompt template and the chatgpt api with the same prompt?

    @timobrien4190@timobrien4190 Жыл бұрын
    • There are different models underneath so there will be differences in the output. For example, if you wanted to use gpt4 then you need to use the chat method. It's a bit of an awkward time for models right now. I sorta which the chat method didn't get introduced and we used chat history within normal models but oh well!

      @DataIndependent@DataIndependent Жыл бұрын
  • I Appreciate your hard work in explaining the things in a simpler manner But i had a doubt how can i connect this to a database ,like a git repo and ask it to give me if there are any duplicate code present in the repo ,here duplicate code means : 1.Functions which have same name and perform same action 2. Functions which have different name but perform the same action 3.Functions which perform the same action but have a different approach to do it Will i able to achieve this using langchain , your response is highly appreciated.

    @keshavchander5570@keshavchander55709 ай бұрын
  • Incredible video! I'm doing an application for healthcare and doing this using a chain (Langchain based). However, I ran into a "ValueError: Missing some input keys: {'input_documents'}" error that I can't overcome! I looked over the internet for a solution but had no luck. What would you suggest?

    @MrDocFP@MrDocFP Жыл бұрын
  • Thanks for the tutorial sir. Can u please help how to set environmental variables.

    @illachieveit3816@illachieveit38164 ай бұрын
  • Cool, thanks.

    @ratral@ratral Жыл бұрын
  • Amazing work

    @saburspeaks@saburspeaks Жыл бұрын
    • Thank you! Cheers!

      @DataIndependent@DataIndependent Жыл бұрын
  • What is the max length of the output that can be achieved? Is there a token limit for Streamlit?

    @Myhands14@Myhands14 Жыл бұрын
  • Great video! Can you also make a video on finetuning the model with custom datasets?

    @ADHDOCD@ADHDOCD Жыл бұрын
    • Nice! I can look into it. What’s the tactical example you’d want to walk through?

      @DataIndependent@DataIndependent Жыл бұрын
    • Taking data from tables using them to create prompts

      @petersmith8153@petersmith8153 Жыл бұрын
    • @@petersmith8153 would also love to see this video made

      @nickdaigler@nickdaigler Жыл бұрын
    • @@DataIndependent i would also love to see a video like this!

      @inigomartinllorente7440@inigomartinllorente7440 Жыл бұрын
  • THIS IS AWESOME!!

    @____2080_____@____2080_____ Жыл бұрын
    • Nice! Glad its working out

      @DataIndependent@DataIndependent Жыл бұрын
  • Great! Thank you so much!

    @AlgorithmicEchoes@AlgorithmicEchoes Жыл бұрын
    • Glad it was helpful! What else do you want to see?

      @DataIndependent@DataIndependent Жыл бұрын
    • @@DataIndependent I'd really want a tutorial on making a telegram bot (with memory) using chatgpt-turbo!

      @AlgorithmicEchoes@AlgorithmicEchoes Жыл бұрын
    • @@DataIndependent This is one of the best videos on streamlit. May KZheadrs assume certain things (for instance the app runs top to bottom) as something that everyone knows. Such minor details matter for newbies like me. I must say, you have a great knack for teaching!

      @AlgorithmicEchoes@AlgorithmicEchoes Жыл бұрын
    • @@AlgorithmicEchoes Great! Thank you for the nice words.

      @DataIndependent@DataIndependent Жыл бұрын
  • It’s been a while since your last video , would you make a video about deployment, how to deploy the code into a web app , that we can use

    @mikemansour4634@mikemansour4634 Жыл бұрын
  • Soooo interesting! めっちゃ面白い!(japanese)

    @tatsuyakaneko1913@tatsuyakaneko1913 Жыл бұрын
  • Again, thanks a lot for your amazing content. What is the difference between defining a function to get the variable (like get_text() in your example) and defining the variable directly? ChatGPT told me that the difference lies in flexibility and reusability of the code. Is it the case here? Thanks in advance :)

    @ahmadalis1517@ahmadalis151710 ай бұрын
    • Yep that is the case! and if we ever want to attach other code when we get the variable it's easier if we package it in a function

      @DataIndependent@DataIndependent10 ай бұрын
  • Amazing! Than you so much.. how would you upload a .csv insted of copying from clipboard?

    @cb4623@cb46238 ай бұрын
    • Good question! Ask chatgpt and they'll give you the code to load up a file

      @DataIndependent@DataIndependent8 ай бұрын
  • cool!! tnx!!

    @user-hv4ku2pz4z@user-hv4ku2pz4z Жыл бұрын
    • Nice!

      @DataIndependent@DataIndependent Жыл бұрын
  • How to get the User to provide the API key instead of using your own ?

    @rekalki01@rekalki01 Жыл бұрын
  • Thank you so much, love your content. I searched everywhere , but i was not able to find , what is the difference between gpt index and langchain? My basic shallow understanding is that both are libraries to help querying through open ai by using embeddings. Gpt index uses langchain. But i don't have clarity, If you can tell me difference clearly, i will be very grateful

    @ourawesomelyf2826@ourawesomelyf2826 Жыл бұрын
    • Awesome - and yes I get this all the time. I'm adding it to the list of videos to do. Right now it's #2 on the list.

      @DataIndependent@DataIndependent Жыл бұрын
    • @@DataIndependent thank you 😊

      @ourawesomelyf2826@ourawesomelyf2826 Жыл бұрын
  • Appreciate this series, I would like to make a request about calling a REST API through LangChain, This API request need an authorization to access the data. Is it possible to make a call to a system using REST API? Please make a video on this or provide some pointer how we can do this with the help of LangChain. Thanks in Advance.

    @AlokKumar-bo6se@AlokKumar-bo6se7 ай бұрын
  • thanks, for ebook scanning, is it required to use pinecone? can it work without using pinecone and just connecting openai llm with the text/pdf ? if both can work, the only difference would be in speed?

    @learnvik@learnvik11 ай бұрын
    • Depends how long the ebook is. You can do it with out a vector store but that’ll cost a lot of tokens

      @DataIndependent@DataIndependent11 ай бұрын
  • Hey, if we wanted to learn web front end more deeply, what language would you recommend?

    @method341@method34111 ай бұрын
    • JavaScript and a framework (like react) are popular

      @DataIndependent@DataIndependent11 ай бұрын
  • following line for line and having issues with module not found on the "from langchain import x" lines showing as module not found. Running in anaconda and checked that the requirements are satisfied for langchain running pip. Any guidance appreciated

    @evmond@evmond Жыл бұрын
    • Hm, sounds like there may be an issue with your environment? When you run pip show langchain does it come back with a result?

      @DataIndependent@DataIndependent Жыл бұрын
    • @@DataIndependent it does, but I’m using anaconda and I’m using a python venv. Don’t know if that makes a difference. Thanks for coming back to me

      @evmond@evmond Жыл бұрын
    • Also tried a conda forge and also forcing the settings in the interpreter in pycharm to use specific versions of openai

      @evmond@evmond Жыл бұрын
  • How long have you been doing data science related matters?

    @TheJunkmortha@TheJunkmortha Жыл бұрын
    • I've been doing data for ~7-8 years. Ranging from analysis, ETL, analytics stacks, managing teams and stakeholder management. Only more recently AI and Langchain because it's a beautiful mix of introductory w/ creating value.

      @DataIndependent@DataIndependent Жыл бұрын
  • Can we build a hotel booking bot using langchain framework with LLM?

    @aischool0912@aischool091211 ай бұрын
    • Totally - Do you want to be the one accepting bookings? Or be the one doing the bookings?

      @DataIndependent@DataIndependent11 ай бұрын
    • @@DataIndependent Accepting the bookings.

      @aischool0912@aischool091211 ай бұрын
  • I wish the documentation was better and gave actual real examples. It turns a chatbot that ends up being less than 100 lines of code into a week long project

    @peanuts4132@peanuts41325 ай бұрын
  • 13:51 Regarding your prompt: “There’s probably going to be some purist prompt engineers out there that say this isn’t correct”… Why? What’s wrong with it? Missing some optimization or what?

    @hansenmarc@hansenmarc7 ай бұрын
    • Looking back at it I actually like the prompt. I think it was lack of self-confidence which I'm getting better at.

      @DataIndependent@DataIndependent7 ай бұрын
  • You don't like word wrap do you?

    @l.e.nichols9382@l.e.nichols93825 ай бұрын
    • It's a bad habit I need to break

      @DataIndependent@DataIndependent5 ай бұрын
  • I really don’t understand why are you bothering for such silly things? Just past into Bing Chat Creative mode this prompt and you’re done. please convert this text to formal letter improving grammar and puncuation: [your-letter]

    @TsviGirsh@TsviGirsh10 ай бұрын
    • That may work for one-offs (I love quick MVPs), but you won't build scale by copy and pasting

      @DataIndependent@DataIndependent10 ай бұрын
KZhead