Build Your Own OpenAI + LangChain Web App in 23 Minutes

Sdílet
Vložit
  • čas přidán 23. 07. 2024
  • 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/...

Komentáře • 82

  • @jeffreysoto4068
    @jeffreysoto4068 Před rokem +5

    Bless people with intellect and talent who are willing to help those who cannot repay them.

  • @mohammadaqdas7998
    @mohammadaqdas7998 Před rokem +1

    I appreciate the hard work you did and the way you explain things.
    Thanks for making such content.

  • @vinosamari
    @vinosamari Před rokem +4

    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?

  • @JustinLoroy
    @JustinLoroy Před rokem +14

    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.

    • @DataIndependent
      @DataIndependent  Před rokem +1

      Nice! That's super cool. Congrats on the tool.

    • @ziyewang1647
      @ziyewang1647 Před rokem +1

      it's great idea for the app. tech is not the key, the idea is

  • @mrwadams
    @mrwadams Před rokem

    Great content, thank you. Really looking forward to seeing what you decide to cover next. Subscribed! ✅

    • @DataIndependent
      @DataIndependent  Před rokem

      Thanks! What're you building and want to see?

    • @mrwadams
      @mrwadams Před rokem

      @@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.

  • @Dasein031
    @Dasein031 Před rokem +1

    Love your work, thx for sharing!

    • @DataIndependent
      @DataIndependent  Před rokem

      Nice! Thank you

    • @Dasein031
      @Dasein031 Před rokem

      @@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.

  • @juancolamendy
    @juancolamendy Před rokem

    Great, Thanks very much for the content

  • @Myhands14
    @Myhands14 Před rokem

    Thanks for sharing - great project.

  • @wuyanchu
    @wuyanchu Před 8 měsíci

    very nice tutorial, thx and god bless you and the world... regards from hong kong ^_^

  • @RossPfeiffer
    @RossPfeiffer Před rokem

    Watching all your videos

  • @ChatGPT-ef6sr
    @ChatGPT-ef6sr Před rokem +3

    The best content in the industry. No financial gateway to the content no pay me for thr info bs. Hats off. Real thought leaders

    • @DataIndependent
      @DataIndependent  Před rokem +1

      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!

  • @truemicro221
    @truemicro221 Před rokem

    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!

  • @____2080_____
    @____2080_____ Před rokem

    THIS IS AWESOME!!

  • @saburspeaks
    @saburspeaks Před rokem

    Amazing work

  • @timobrien4190
    @timobrien4190 Před rokem

    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?

    • @DataIndependent
      @DataIndependent  Před rokem +1

      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!

  • @AlgorithmicEchoes
    @AlgorithmicEchoes Před rokem

    Great! Thank you so much!

    • @DataIndependent
      @DataIndependent  Před rokem

      Glad it was helpful! What else do you want to see?

    • @AlgorithmicEchoes
      @AlgorithmicEchoes Před rokem

      @@DataIndependent I'd really want a tutorial on making a telegram bot (with memory) using chatgpt-turbo!

    • @AlgorithmicEchoes
      @AlgorithmicEchoes Před rokem

      @@DataIndependent This is one of the best videos on streamlit. May CZcamsrs 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!

    • @DataIndependent
      @DataIndependent  Před rokem

      @@AlgorithmicEchoes Great! Thank you for the nice words.

  • @MrDocFP
    @MrDocFP Před rokem

    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?

  • @Myhands14
    @Myhands14 Před rokem

    What is the max length of the output that can be achieved? Is there a token limit for Streamlit?

  • @ratral
    @ratral Před rokem

    Cool, thanks.

  • @user-hv4ku2pz4z
    @user-hv4ku2pz4z Před rokem

    cool!! tnx!!

  • @illachieveit3816
    @illachieveit3816 Před 6 měsíci

    Thanks for the tutorial sir. Can u please help how to set environmental variables.

  • @keshavchander5570
    @keshavchander5570 Před 11 měsíci

    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.

  • @tktktktk1913
    @tktktktk1913 Před rokem

    Soooo interesting! めっちゃ面白い!(japanese)

  • @mikemansour4634
    @mikemansour4634 Před rokem

    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

  • @cb4623
    @cb4623 Před 10 měsíci

    Amazing! Than you so much.. how would you upload a .csv insted of copying from clipboard?

    • @DataIndependent
      @DataIndependent  Před 10 měsíci

      Good question! Ask chatgpt and they'll give you the code to load up a file

  • @ahmadalis1517
    @ahmadalis1517 Před rokem

    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 :)

    • @DataIndependent
      @DataIndependent  Před rokem +1

      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

  • @ADHDOCD
    @ADHDOCD Před rokem +2

    Great video! Can you also make a video on finetuning the model with custom datasets?

    • @DataIndependent
      @DataIndependent  Před rokem

      Nice! I can look into it.
      What’s the tactical example you’d want to walk through?

    • @petersmith8153
      @petersmith8153 Před rokem +2

      Taking data from tables using them to create prompts

    • @nickdaigler
      @nickdaigler Před rokem

      @@petersmith8153 would also love to see this video made

    • @inigomartinllorente7440
      @inigomartinllorente7440 Před rokem

      @@DataIndependent i would also love to see a video like this!

  • @learnvik
    @learnvik Před rokem

    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?

    • @DataIndependent
      @DataIndependent  Před rokem

      Depends how long the ebook is. You can do it with out a vector store but that’ll cost a lot of tokens

  • @ourawesomelyf2826
    @ourawesomelyf2826 Před rokem

    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

    • @DataIndependent
      @DataIndependent  Před rokem +1

      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.

    • @ourawesomelyf2826
      @ourawesomelyf2826 Před rokem

      @@DataIndependent thank you 😊

  • @rekalki01
    @rekalki01 Před rokem

    How to get the User to provide the API key instead of using your own ?

  • @method341
    @method341 Před rokem

    Hey, if we wanted to learn web front end more deeply, what language would you recommend?

  • @evmond
    @evmond Před rokem

    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

    • @DataIndependent
      @DataIndependent  Před rokem

      Hm, sounds like there may be an issue with your environment? When you run pip show langchain does it come back with a result?

    • @evmond
      @evmond Před rokem

      @@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 Před rokem

      Also tried a conda forge and also forcing the settings in the interpreter in pycharm to use specific versions of openai

  • @AlokKumar-bo6se
    @AlokKumar-bo6se Před 9 měsíci

    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.

  • @TheJunkmortha
    @TheJunkmortha Před rokem

    How long have you been doing data science related matters?

    • @DataIndependent
      @DataIndependent  Před rokem +1

      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.

  • @aischool0912
    @aischool0912 Před rokem

    Can we build a hotel booking bot using langchain framework with LLM?

    • @DataIndependent
      @DataIndependent  Před rokem

      Totally - Do you want to be the one accepting bookings? Or be the one doing the bookings?

    • @aischool0912
      @aischool0912 Před rokem

      @@DataIndependent Accepting the bookings.

  • @l.e.nichols9382
    @l.e.nichols9382 Před 7 měsíci

    You don't like word wrap do you?

  • @hansenmarc
    @hansenmarc Před 9 měsíci

    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?

    • @DataIndependent
      @DataIndependent  Před 9 měsíci +1

      Looking back at it I actually like the prompt. I think it was lack of self-confidence which I'm getting better at.

  • @peanuts4132
    @peanuts4132 Před 7 měsíci

    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

  • @TsviGirsh
    @TsviGirsh Před rokem

    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]

    • @DataIndependent
      @DataIndependent  Před rokem

      That may work for one-offs (I love quick MVPs), but you won't build scale by copy and pasting