Build Your Own OpenAI + LangChain Web App in 23 Minutes

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.ค. 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/...

ความคิดเห็น • 82

  • @jeffreysoto4068
    @jeffreysoto4068 ปีที่แล้ว +5

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

  • @mohammadaqdas7998
    @mohammadaqdas7998 ปีที่แล้ว +1

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

  • @vinosamari
    @vinosamari ปีที่แล้ว +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?

    • @DataIndependent
      @DataIndependent  ปีที่แล้ว

      Nice! Thank you. Code links are in the description

  • @JustinLoroy
    @JustinLoroy ปีที่แล้ว +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  ปีที่แล้ว +1

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

    • @ziyewang1647
      @ziyewang1647 ปีที่แล้ว +1

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

  • @mrwadams
    @mrwadams ปีที่แล้ว

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

    • @DataIndependent
      @DataIndependent  ปีที่แล้ว

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

    • @mrwadams
      @mrwadams ปีที่แล้ว

      @@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 ปีที่แล้ว +1

    Love your work, thx for sharing!

    • @DataIndependent
      @DataIndependent  ปีที่แล้ว

      Nice! Thank you

    • @Dasein031
      @Dasein031 ปีที่แล้ว

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

  • @ChatGPT-ef6sr
    @ChatGPT-ef6sr ปีที่แล้ว +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  ปีที่แล้ว +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 ปีที่แล้ว

    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!

  • @juancolamendy
    @juancolamendy ปีที่แล้ว

    Great, Thanks very much for the content

  • @Myhands14
    @Myhands14 ปีที่แล้ว

    Thanks for sharing - great project.

  • @RossPfeiffer
    @RossPfeiffer ปีที่แล้ว

    Watching all your videos

  • @wuyanchu
    @wuyanchu 8 หลายเดือนก่อน

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

  • @timobrien4190
    @timobrien4190 ปีที่แล้ว

    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  ปีที่แล้ว +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!

  • @saburspeaks
    @saburspeaks ปีที่แล้ว

    Amazing work

  • @____2080_____
    @____2080_____ ปีที่แล้ว

    THIS IS AWESOME!!

  • @MrDocFP
    @MrDocFP ปีที่แล้ว

    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 ปีที่แล้ว

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

  • @keshavchander5570
    @keshavchander5570 11 หลายเดือนก่อน

    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.

  • @AlgorithmicEchoes
    @AlgorithmicEchoes ปีที่แล้ว

    Great! Thank you so much!

    • @DataIndependent
      @DataIndependent  ปีที่แล้ว

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

    • @AlgorithmicEchoes
      @AlgorithmicEchoes ปีที่แล้ว

      @@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 TH-camrs 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  ปีที่แล้ว

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

  • @illachieveit3816
    @illachieveit3816 6 หลายเดือนก่อน

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

  • @ratral
    @ratral ปีที่แล้ว

    Cool, thanks.

  • @user-hv4ku2pz4z
    @user-hv4ku2pz4z ปีที่แล้ว

    cool!! tnx!!

  • @ADHDOCD
    @ADHDOCD ปีที่แล้ว +2

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

    • @DataIndependent
      @DataIndependent  ปีที่แล้ว

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

    • @petersmith8153
      @petersmith8153 ปีที่แล้ว +2

      Taking data from tables using them to create prompts

    • @nickdaigler
      @nickdaigler ปีที่แล้ว

      @@petersmith8153 would also love to see this video made

    • @inigomartinllorente7440
      @inigomartinllorente7440 ปีที่แล้ว

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

  • @mikemansour4634
    @mikemansour4634 ปีที่แล้ว

    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

  • @ahmadalis1517
    @ahmadalis1517 ปีที่แล้ว

    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  ปีที่แล้ว +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

  • @cb4623
    @cb4623 10 หลายเดือนก่อน

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

    • @DataIndependent
      @DataIndependent  10 หลายเดือนก่อน

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

  • @tktktktk1913
    @tktktktk1913 ปีที่แล้ว

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

  • @ourawesomelyf2826
    @ourawesomelyf2826 ปีที่แล้ว

    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  ปีที่แล้ว +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 ปีที่แล้ว

      @@DataIndependent thank you 😊

  • @learnvik
    @learnvik ปีที่แล้ว

    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  ปีที่แล้ว

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

  • @rekalki01
    @rekalki01 ปีที่แล้ว

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

  • @method341
    @method341 ปีที่แล้ว

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

    • @DataIndependent
      @DataIndependent  ปีที่แล้ว +1

      JavaScript and a framework (like react) are popular

  • @AlokKumar-bo6se
    @AlokKumar-bo6se 9 หลายเดือนก่อน

    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 ปีที่แล้ว

    How long have you been doing data science related matters?

    • @DataIndependent
      @DataIndependent  ปีที่แล้ว +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.

  • @evmond
    @evmond ปีที่แล้ว

    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  ปีที่แล้ว

      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 ปีที่แล้ว

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

  • @aischool0912
    @aischool0912 ปีที่แล้ว

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

    • @DataIndependent
      @DataIndependent  ปีที่แล้ว

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

    • @aischool0912
      @aischool0912 ปีที่แล้ว

      @@DataIndependent Accepting the bookings.

  • @hansenmarc
    @hansenmarc 9 หลายเดือนก่อน

    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  9 หลายเดือนก่อน +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 7 หลายเดือนก่อน

    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

  • @l.e.nichols9382
    @l.e.nichols9382 7 หลายเดือนก่อน

    You don't like word wrap do you?

    • @DataIndependent
      @DataIndependent  7 หลายเดือนก่อน +1

      It's a bad habit I need to break

  • @TsviGirsh
    @TsviGirsh ปีที่แล้ว

    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  ปีที่แล้ว

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