LangChain 101: Quickstart Guide

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024

Комментарии • 173

  • @burakylmaz9973
    @burakylmaz9973 Год назад +77

    Hi Greg, I'm diving deep into all your lang-chain related videos today and wanted to say 'thank you' for putting these out there.

    • @DataIndependent
      @DataIndependent  Год назад +4

      Awesome, thank you!

    • @struki84
      @struki84 Год назад +4

      yep and also it's split into manageable time formats, not a 90 min lecture :D

    • @Amr-Ibrahim-AI
      @Amr-Ibrahim-AI Год назад

      Same here. I am watching the full playlist and I am grateful to you Greg. Thank you so much.

  • @LesCalvin3
    @LesCalvin3 Год назад +10

    I'm fairly lost, because I've thrown myself into the deep end with this stuff. But when you got to "Dynamically call chains..." Holy moly. I'm blown away.
    I really hope videos like this can help me get up to speed before I get left behind. Thank you so much. 🙏

    • @DataIndependent
      @DataIndependent  Год назад +3

      Nice! I'm glad to hear it.
      Check out my latest video on the 7 core concepts of LangChain which I think will help

  • @AngusLou
    @AngusLou Год назад +4

    Short and sweet, clearly explained the concepts of langchain and how it works with OpenAI

  • @sreeramkrishnamachari8556
    @sreeramkrishnamachari8556 Год назад +4

    Great videos, Greg - Thanks for pulling this content together. Quick one - Looks like the "llm-math" is expecting input a certain way to calculate prime number below the age of Japans leader. It is not getting the query in the right format to to do the calculation. It is doing the first two steps accurately. I am getting ValueError message:
    ValueError: unknown format from LLM: This is not a math problem and cannot be translated into an expression that can be executed using Python's numexpr library.
    Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

  • @nattapongthanngam7216
    @nattapongthanngam7216 4 месяца назад

    Thank you for this clear and concise introduction to LangChain! The four examples you provided were very helpful in understanding how to use the library. I'm excited to explore LangChain further and I'm excited to keep going through your playlist. Thanks again!

  • @adhithia
    @adhithia 10 месяцев назад +1

    Hey Greg, I am just entering the world of LangChain, and it is mind blowing! What's more mind blowing is the simple but effectively explained content you have in your videos! This is beautiful! A big thanks! ✨

  • @mahdiyartaghavi9753
    @mahdiyartaghavi9753 6 месяцев назад

    At the end of the video, when the chatbot remembered you said 'Hi there', the satisfaction in your eyes is priceless!

    • @DataIndependent
      @DataIndependent  6 месяцев назад

      Ha, nice! Thank you. I had to go back and look at it. It looks like that video was filmed with a potato

  • @zwdavezhang6408
    @zwdavezhang6408 Год назад +1

    Thank you for your teaching, I started to understand LangChain from this, I also compiled some notes to share with my partners, these introductory courses will give us the opportunity to open the future world.
    Thank you very much!

  • @martinp3839
    @martinp3839 Год назад

    I am so glad I stumbled across your channel. You have a gift of explaining things and not skipping the basic steps especially for beginners. Thanks!

  • @RunyCalmera
    @RunyCalmera Год назад

    Greg!!! ❤❤❤❤❤ thank you so much!!
    I just put 3 months away to follow this series. Every day I will do one tutorial.
    I’m conviced that I need to invest in this as a python programmer!!!

  • @ADHDOCD
    @ADHDOCD Год назад +1

    Wow, finally understand where langchain can be used!

  • @MarkusEicher70
    @MarkusEicher70 9 месяцев назад

    Hello Greg. Thanks for giving us a high level overview of what we can do with langchain. As a newbie, I like this kind of introduction. Just going through the whole playlist now and I'm sure, I will come back often to your channel for further studies. Have a good time and be well.

    • @DataIndependent
      @DataIndependent  9 месяцев назад

      Awesome! Thank you Markus! I hope you enjoy

  • @brentdunklau4536
    @brentdunklau4536 Год назад

    This is an awesome series. One observation: At 9:10, I got a different answer than 65/61. I actually got 68/67. Then I just re-ran that step and got 65/61. Kinda surprised by that.

    • @DataIndependent
      @DataIndependent  Год назад

      These language models aren't always deterministic which is a pain for reliability. So that behavior isn't unexpected

  • @ankansharma4897
    @ankansharma4897 Год назад +1

    Hey Greg, Everything is great. But there is one feedback please improve your video quality to 1080p standard aspect ratio for future videos. Thank you for the effort.

    • @DataIndependent
      @DataIndependent  Год назад

      Nice! thank you - I upgraded the set up a bunch since this first video

  • @myselfandpesit
    @myselfandpesit 7 месяцев назад +1

    Hi Greg, this is my first video about langchain. When I run the code, I get ratelimiterror. How is it possible? I've never made any calls to OpenAI before.

  • @chandankumarmishra336
    @chandankumarmishra336 5 месяцев назад

    Hi Greg, thanks a ton for creating this masterpiece and useful stuff on the real world examples and awesome presentation...kudos...

  • @OfficialPeterArizBurner
    @OfficialPeterArizBurner Год назад

    Wow! Thanks Greg! Best walk-through video I've found yet! Keep it up. Thanjs again

  • @feignedjesse2
    @feignedjesse2 Год назад

    This introduction is great, I'm gonna go through the whole series!

  • @smreeves2004
    @smreeves2004 Год назад +3

    I figured out how to install jupyter but how do you open the notebook for langchain??

    • @Gorto68
      @Gorto68 Год назад

      I'm equally mystified - where is the link to launch the notebook?

  • @PunjabiCodeMaster
    @PunjabiCodeMaster Год назад

    Thanks Greg!! Will follow entire series.

  • @codeandfood
    @codeandfood Год назад

    you made it so clear to understand LangChain. Thank you!

  • @luqi4230
    @luqi4230 Год назад +2

    your video really helps a lot for a beginner! Thanks for the effort!

    • @DataIndependent
      @DataIndependent  Год назад

      Great! Thank you for the kind words

    • @b326yr
      @b326yr Год назад

      Beginner? I must be really really far behind

    • @b326yr
      @b326yr Год назад

      NAH, this is not for me 😁

  • @tejaswi1995
    @tejaswi1995 Год назад

    Thank you Greg for these tutorials. Super helpful

  • @anihe8892
    @anihe8892 Год назад

    This is an excellent tutorial about langchain. Many thanks!🤩

  • @amansharma5139
    @amansharma5139 Год назад

    Great explanation and easy to follow. Thanks

  • @mrlions420
    @mrlions420 Год назад

    Awesome tutorials. Also, I loved you in Limitless

  • @pragatijagadale134
    @pragatijagadale134 Год назад +1

    I get this error, every time-
    You exceeded your current quota, please check your plan and billing details.

  • @gurmukhsingh-uh5qo
    @gurmukhsingh-uh5qo Год назад +1

    thank you for sharing

  • @romakhajiev9535
    @romakhajiev9535 4 месяца назад

    I have a question, if I were to use langchain on a website where multiple users can have a conversation with the bot and if I use conversationChain , does it remember every single user’s chat history even though all the users send a request to a backend API?

  • @premsaikarampudi3944
    @premsaikarampudi3944 Год назад

    Hi Greg, I was trying to execute the code but then I got an error saying exceeded limit. I did some research looks like we need to pay to use OpenAI?

  • @user-dz2gg4jn6w
    @user-dz2gg4jn6w 11 месяцев назад

    you've done a great job. please keep going

    • @DataIndependent
      @DataIndependent  11 месяцев назад

      Awesome thank you - more videos on the way

  • @Harry_Hugh
    @Harry_Hugh Год назад +1

    quick question: around 3'36 for prediction, which gpt model are you using by default?

  • @KinoInsight
    @KinoInsight Год назад

    Thanks Buddy! This is extremely useful

  • @HeatonResearch
    @HeatonResearch 8 месяцев назад +1

    Note, alot of the syntax here is out of date and will give warnings and soon not work.

    • @DataIndependent
      @DataIndependent  8 месяцев назад

      Ya - it’s worth an update shortly.
      One of the downsides of making tutorials so quick for the content

  • @lij3900
    @lij3900 Год назад +1

    I was following the tutorial and encountered this error while running the agent on leader of Japan and prime number smaller than their age:
    ValueError: unknown format from LLM: This is not a math problem and cannot be translated into an expression that can be executed using Python's numexpr library.
    Anyone see the same?

    • @anielkali704
      @anielkali704 Год назад

      I encountered the same problem.

    • @blueslee1
      @blueslee1 Год назад

      try change the temperature in line 22 to 0.9 instead of 0.

  • @succesonline2581
    @succesonline2581 7 месяцев назад

    amazing video! As a complete noob at Python and Ai.. I was wondering whether it'd be possible to have an output to be a complete social media post following a certain provided template, based on information like a PDF for example? All other non-coding solutions like ChatGPT and other AI's didn't work... Keep up the good stuff man!

  • @andresrello
    @andresrello Год назад +5

    This is really cool thanks! Do you do these videos as a hobby? I always wonder how people has time to do this kind of things

    • @DataIndependent
      @DataIndependent  Год назад +15

      Long story short: Yes just a hobby for now. I’m putting full time energy into my own venture outside of this.
      Doing these videos are fun, make me learn new things and introduce me to other builders which is fun too. And I like helping others leverage up their skills

    • @CentigradeMind
      @CentigradeMind Год назад +1

      @@DataIndependent Thank you.

    • @lutfiikbalmajid
      @lutfiikbalmajid Год назад +1

      @@DataIndependent keep it up! Thanks 🙏🙇

  • @merodiro
    @merodiro Год назад +3

    Note: LLM-math here didn't help with the prime number answer. it gave the wrong answer (65) but because GPT-3 already memorized the first prime numbers it was able to answer

  • @kiranjoshi4966
    @kiranjoshi4966 Год назад

    Hello! Grey, In this line llm = OpenAI(temperature=0.9) getting error is Did not find openai_api_key, please add an environment variable `OPENAI_API_KEY` which contains it, or pass `openai_api_key` as a named parameter. (type=value_error). Pls help me out here.

    • @DataIndependent
      @DataIndependent  Год назад

      You need to give your open ai key. You can do this via an environment variable or place it right when you create your llm.
      Pass your error into chatgpt for more help on debugging

  • @mr.daniish
    @mr.daniish Год назад

    Amazing content Greg!

  • @____2080_____
    @____2080_____ Год назад +1

    I’m more excited about Langchain then I am with GPT itself.

  • @tenicg7045
    @tenicg7045 Год назад

    Great job, Greg! Your walkthrough video was incredibly helpful, and I learned a lot from it.

  • @Whiskey9o5
    @Whiskey9o5 Год назад

    Whoaaa, You have my attention. Subscribed!

  • @kaushikkatikala
    @kaushikkatikala 9 месяцев назад

    print(llm(text))
    and
    print(llm(prompt.format(food="desserts")))
    both these are not executing for me

  • @cornershop5268
    @cornershop5268 Год назад

    Hi Greg, for some reason when I run it - it does not search for the prime ministers age - see the below. How can I fix this?
    I need to find out who the leader of Japan is and then use a calculator to find the largest prime number that is smaller than their age.
    Action: Search
    Action Input: "Current leader of Japan"
    Observation: Fumio Kishida
    Thought: I now need to find the largest prime number that is smaller than Kishida's age.
    Action: Calculator
    Action Input: Kishida's age (68)
    Observation: Answer: 68
    Thought: I now know the final answer.
    Final Answer: 67

  • @tanujgarg20
    @tanujgarg20 Год назад

    The question you asked to your large language model about what are 5 vacation destination ,the output is searched by OPENAI or you have fed some document and searched from that?

  • @potmmy
    @potmmy Год назад

    Great videos, looking forward to your videos :)

  • @manelaloui7069
    @manelaloui7069 Год назад

    Hi , thank you for this tuto,
    But I faced an error:
    RateLimitError: You exceeded your current quota, please check your plan and billing details.
    What should I do , I generated this token just one week ago.

  • @JackyZhang69
    @JackyZhang69 Год назад

    This is what I really want. Thanks

  • @caioraimundo1609
    @caioraimundo1609 Год назад

    Awesomeeeee stuff! Thanks for sharing!

  • @archiewoosung5062
    @archiewoosung5062 Год назад

    good idea to have short videos...those taking 17hrs are daunting!
    Why did chaining cause a list of countries to be returned in response to a 'fruit' prompt...places to go to eat fruit?

  • @AliAliOxenFree
    @AliAliOxenFree Год назад

    First off, excellent content. Prompt engineering is gonna be the hot ticket for probably the next 2-3 years.
    unfortunately i've been stuck at the 7:22 mark (i even went to your github and copied the exact code in case i made a spelling mistake or something). And i keep getting the same error with the initialize_agent: AttributeError: 'str' object has no attribute 'value'.
    Anyways super stoked to have stumbled on your channel, can't wait to go through all your content.

    • @AliAliOxenFree
      @AliAliOxenFree Год назад

      ok i found the solution... I think things may have changed since this video was made.
      First add this line to imports:
      from langchain.agents import AgentType
      then modify the initialization of the agent to this:
      agent = initialize_agent(tools, llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True)

    • @DataIndependent
      @DataIndependent  Год назад +2

      Thanks for letting me know. I’ll see if I can reproduce the bug.
      If this one gets stuck I recommend heading over to the “7 core concepts” video which will work

  • @vidbina
    @vidbina Год назад +1

    Liking the series. Tinkering with LangChain atm and watching your vids to find things I may have missed.
    What do you use to record these videos?

    • @DataIndependent
      @DataIndependent  Год назад +1

      Thanks, glad they are helping. Any run through you want to see specifically?
      I started with Loom. It’s super easy to record with, but limited.
      Went to OBS for the recent videos which gives you more flexibility.
      I’ll likely stick with that if I keep upgrading my set up

  • @LuisOrtega-ue1vp
    @LuisOrtega-ue1vp Год назад

    When I try running the code snippet at 3:29 I get a RateLimitError. Do I need to buy something on OpenAI before continuing?

    • @DataIndependent
      @DataIndependent  Год назад

      Check out openai's documentation on rate limits and see if you went over it. I sometimes do

    • @varshitvijaykumar3608
      @varshitvijaykumar3608 Месяц назад

      were you able to get rid of the error? i tried everything but I still am getting the same error

  • @venkat1195
    @venkat1195 Год назад +2

    you are a legend :)

  • @tauantorresmendes1671
    @tauantorresmendes1671 Год назад +1

    Hey, man! Thank you for your videos. They are very helpful. I would like to ask you if you could do a video explaining how did install the LangChain, because I am having a lot of trouble doing it. Thanks, man!

    • @DataIndependent
      @DataIndependent  Год назад

      Are you having a hard time with LangChain or a supporting library?

  • @OfficialChatbotBuilder
    @OfficialChatbotBuilder Год назад

    This is great for those that know code! For those that don't a visual editor is the fastest and easiest way to use AI🚀

  • @katotoy6755
    @katotoy6755 Год назад

    mind blown to the demo.. 😁

  • @rajivraghu9857
    @rajivraghu9857 Год назад

    One thing I did not understand in agent :: user gave input as ‘"Who is the current leader of Japan? What is the largest prime number that is smaller” …. And after we run , it shows > Entering new AgentExecutor chain...
    I need to find out who the leader of Japan is and then calculate the largest prime number th at' is smaller than their age. . Did it send the prompt to openai In order to rephrase

    • @DataIndependent
      @DataIndependent  Год назад

      Yep exactly. There are a lot of calls happening in the background to form the decisions

  • @user-ms2zi2oq6f
    @user-ms2zi2oq6f Год назад

    is it possible to do the same thing your doing with vertexAI instead of OPENAI?

    • @DataIndependent
      @DataIndependent  Год назад +1

      Yep totally, just swap out your LLM for whatever you want

    • @user-ms2zi2oq6f
      @user-ms2zi2oq6f Год назад

      @@DataIndependent okay any documentation which could be referred to do so?

  • @sushmaregandla4902
    @sushmaregandla4902 Год назад

    I am getting error at llm = OpenAI (temperature=0.9). Can anyone help me on this

    • @DataIndependent
      @DataIndependent  Год назад

      What's the error? Make sure your api key is set as an environment variable or set in when your make your LLM

  • @evapardeza1647
    @evapardeza1647 Год назад

    ChatGPT API is not free... is there any way to learn Lang Chain without using ChatGPT API?

  • @robodev6033
    @robodev6033 Год назад

    Hi I have a question can langchain understand the data of the mechanical drawing and electrical drawing in the pdf?

    • @DataIndependent
      @DataIndependent  Год назад +1

      No not yet, but you could try and image recognition model from another provider

    • @robodev6033
      @robodev6033 Год назад +1

      @@DataIndependent I have tried but none of these can do that yet. I think it's time to invent this thing up.

    • @nahfid2003
      @nahfid2003 Год назад +1

      @@robodev6033 tell us when u do

  • @johnsarvosky533
    @johnsarvosky533 5 месяцев назад

    Hi Greg, Thanks for the Video. OpanAI API key is no longer free. Can you please show/ comment how to implement other opensource LLMs with Langchain..?
    Thanks again!

    • @DataIndependent
      @DataIndependent  5 месяцев назад +1

      All LLMs will cost a bit if you don't run them locally. I haven't dipped into local running yet

  • @shahriardhruvo6281
    @shahriardhruvo6281 Год назад

    Please consider recording future videos with a better software than loom example: OBS studio. The reason is as you are showing a lot of text content if things get blurry it gets difficult for us viewer to read them. And lastly thank you for these awesome tutorials

    • @DataIndependent
      @DataIndependent  Год назад +3

      ya...I've considered it and likely will. My setup is currently getting an upgrade that will be finished tonight or tomorrow.

  • @skillerd7429
    @skillerd7429 Год назад +1

    Great!

  • @petera.4707
    @petera.4707 Год назад

    didn't understand anything. where to start as a beginner? python?

  • @sampsonarchibaldclaxton7872
    @sampsonarchibaldclaxton7872 Год назад +1

    I am inspired by your tutorials, but I am a complete noob. Do you have training on how to even access the screen you are on, Jupyter? I was lost trying to figure out where to put the pip install langchain and it was all downhill from there.

    • @DataIndependent
      @DataIndependent  Год назад +1

      Try installing anaconda: www.anaconda.com/products/distribution
      That is the place I usually start w/ a fresh computer. There are tons of tutorials for it online.
      Alternatively you can use a google colab notebook which is like a jupyter notebook but in the cloud.

    • @4f52
      @4f52 Год назад

      Yep I have no idea what is happening but I try to follow and backtrack from that

  • @BasselIssa
    @BasselIssa Год назад

    Actually this is great, but in some cases Google search is not getting the right answer so it can be used in the math lib. there should be a way to validate the results the agent returns first before proceeding

  • @KerimBahadirTunc
    @KerimBahadirTunc Год назад

    Hey, I guess I'm the clumsy one but I don't understand how to get it to work. Even when I entered the links, I could only look at it. Can someone tell me how I can do this setup and take advantage of this great blessing?

    • @DataIndependent
      @DataIndependent  Год назад +2

      Check out tutorials on jupyter notebooks or google colab notebooks if you want to get the editor up and running

  • @fraternitas5117
    @fraternitas5117 Год назад +1

    how do I hookup langchain with a non english language model?

    • @DataIndependent
      @DataIndependent  Год назад +1

      Here's the integrations they support and should have documentation on how to do what you want
      langchain.readthedocs.io/en/latest/modules/llms/integrations.html

    • @drmartinbartos
      @drmartinbartos Год назад +1

      As far as I can see, the language dependency is in the model you use, not the Langchain library itself (except if there are any character encoding issues with prompt passing), so presumably you just need to have a suitable end-use language model.. and the integrations show you how you could link up to various sources which may include models of the language you are looking for..

  • @lokeshsharma5088
    @lokeshsharma5088 6 месяцев назад +1

    pip install -U langchain-openai
    from langchain_openai import OpenAI
    llm = OpenAI(temperature=0.9)
    text = "which are the top 5 countries in pick pocket cases?"
    print(llm.invoke(text))

  • @MatthiasHerodotus
    @MatthiasHerodotus Год назад

    wonderful video. I have a question about how to output a result more than maximum tokens?

    • @DataIndependent
      @DataIndependent  Год назад +1

      You can either
      * Call your LLM multiple times and append the outputs to each other for more data
      * Adjust your max_token parameter to something higher

  • @Dnyanu01d
    @Dnyanu01d Год назад

    hey there i can't able to assign API KEY . please help

    • @DataIndependent
      @DataIndependent  Год назад +1

      You need to get an openai api key and them pass it in when you make your LLM

    • @Dnyanu01d
      @Dnyanu01d Год назад

      @@DataIndependent it worked. Thank you.

  • @ryandury
    @ryandury Год назад

    Wow, this is fantastic. One thing I didn't see demonstrated is: Will this chain use an OpenAI model to answer the question, rather than using google api if it has the answer? Did you demo that in another video? Thank you so much.

    • @DataIndependent
      @DataIndependent  Год назад +1

      If you're working with an agent it will have a series of tools to choose from. It may choose google or straight to openai if it feels that's the best one to go for.

    • @ryandury
      @ryandury Год назад

      @@DataIndependent Thank you for your response, that's what I was wondering. Great series. Appreciate it!

  • @amitchaudhary6
    @amitchaudhary6 Год назад +1

    Hi really great video, why aspect ratio of this video is 4:3 and not 16:9 or 18:9?

    • @DataIndependent
      @DataIndependent  Год назад

      This was before I switched over to obs. New videos are better.

  • @user-zt4fr2eb2f
    @user-zt4fr2eb2f Год назад

    Hey bro! What you're doing here? You best suits for Hollywood.

  • @neerajshrivastava5600
    @neerajshrivastava5600 Месяц назад

    Excellent content, however if you speak slowly it will make it easy to absorb the information

  • @artemiofilho
    @artemiofilho 5 месяцев назад

    The largest prime number smaller than 66 is 61.

  • @starjx126
    @starjx126 Год назад

    You are handsome and make so good contents, keep on

  • @VaibhavPatil-rx7pc
    @VaibhavPatil-rx7pc Год назад

    Really awesome quick start !!

  • @nikhilsingh-jy9dt
    @nikhilsingh-jy9dt Год назад

    bro i am getting empty message

  • @gogogame268
    @gogogame268 Год назад

    i wanted to say your explaining is extremely good
    But it's really sad that you are using the openai api instead of free open source llm on hugging cause not a lot of people that are watching your videos and want to learn langchain have the access to buy the openai api keys
    eventhough thank you so much for explaining the basics

  • @_thehunter_
    @_thehunter_ Год назад

    most of the part are replaced by chatgpt plugins except for memory

    • @DataIndependent
      @DataIndependent  Год назад

      And customizing agents, and prompt templates, example selection and a bunch of others. Check out my latest video on 7 core concepts for more.

  • @Gorto68
    @Gorto68 Год назад

    For the life of me I can't seem to follow how to load the notebook.

    • @DataIndependent
      @DataIndependent  Год назад

      Try asking gpt 3.5 or gpt 4 to help trouble shoot

    • @Gorto68
      @Gorto68 Год назад

      @@DataIndependent What I mean is -- where is the link to the notebook you are running, or is the direction to create the notebook from scratch ourselves and to type in the commands. The latter route is what I ended up doing. Which was probably for the best, as it forced me to learn the notebook format. For Dynamic calls and Add state to chain, I received "Error in on_chain_start callback: 'name'" Tried to find a solution through GPT, but no luck. Any thoughts? Otherwise following along with the tutorial. For the Japanese Prime minister, my answer was 67.

    • @DataIndependent
      @DataIndependent  Год назад +1

      Oh, the code is in the description of all my videos!

  • @MartinsErmanis
    @MartinsErmanis 3 месяца назад

    Came for a quickstart guide - got a 50% guide. Was good information, but the things i came here to understand you said: "Already did that, so I won't do it." :(
    Otherwise Thanks!

  • @DoctorMandible
    @DoctorMandible Год назад

    You need a compressor on your voice over. The quiet parts are too quiet.

    • @DataIndependent
      @DataIndependent  Год назад

      Thanks for the feedback. This video was using my v.5 set up ha, I've upgraded since then.
      For a longer quickstart guide check out this video
      ruclips.net/video/2xxziIWmaSA/видео.html

  • @Rundik
    @Rundik Год назад

    Isn't it just a glorified text templating engine?

  • @glenhinkle
    @glenhinkle Год назад

    Another notebook tutorial. Hidden state, visual clutter, and interleaved context. Hooray. I'm starting to believe that all of these tutorial videos are made by people that don't actually create software.

  • @danielhenshaw3089
    @danielhenshaw3089 7 месяцев назад

    Hey Greg! Thank you for this beautiful content.
    Actually, I am stuck somewhere. First I want to import OpenAi from langchain.llms but I got an error message. Did some research and found out that I needed to change them all to lowercase I.e openai as against OpenAi. That went successfully.
    Now I’m trying to write the code llm= openai(temperature=0.9) and I keep getting the TypeError that the module object is not callable

  • @shivrajnag12
    @shivrajnag12 Год назад

    Hi Greg, I am facing this error
    Retrying langchain.llms.openai.completion_with_retry.._completion_with_retry in 4.0 seconds as it raised RateLimitError: You exceeded your current quota, please check your plan and billing details..
    I would see it's related to rate limit but in OpenAI console under Usage tab I could see that I haven't exceeded the limit. Please help

    • @DataIndependent
      @DataIndependent  Год назад

      You may not have exceeded your quota but looks like you’re over your rate limit.
      Try putting in a sleep timer

    • @shivrajnag12
      @shivrajnag12 Год назад

      @@DataIndependent But how is this even possible I am using OpenAI API for the first time. Anyways can you tell me where I need to add this line ?

    • @DataIndependent
      @DataIndependent  Год назад

      They have a token per minute limit so you don’t overload them. For example you can’t send them 3 textbooks in 1000 parallel requests. It would overload them.
      Just make your calls slower so you don’t go over the limit. I think it’s 40k tokens/minute

  • @sankarsana
    @sankarsana Год назад

    I tried OpenAI api for the first time following this tutorial. I get this error.
    Retrying langchain.llms.openai.completion_with_retry.._completion_with_retry in 4.0 seconds as it raised RateLimitError: You exceeded your current quota, please check your plan and billing details. I am on free tier since April.

    • @DataIndependent
      @DataIndependent  Год назад

      Looks like you may have to get on a paid plan or wait till your limits pass

    • @sankarsana
      @sankarsana Год назад

      @@DataIndependent I see. This is the first time I used and it is not clear how the limit was exceeded. Later I noticed there was an 18 USD limit that was probably created automatically when I registered in April. Today the status shows the limit has expired.

  • @aswathinrp
    @aswathinrp Год назад

    got this error: 'Retrying langchain.llms.openai.completion_with_retry.._completion_with_retry in 4.0 seconds as it raised RateLimitError: You exceeded your current quota, please check your plan and billing details..'

    • @learnvik
      @learnvik Год назад

      I got the same error, any resolution ? I get the response from chat gpt when I put the same question directly, but not getting any response via API

  • @jmojnida
    @jmojnida 4 месяца назад

    How to deal with errors in case of agents?
    My prompt is this:
    qry = "Who is the current prime minister of UK? What is the largest prime number that is smaller than his age? Include the name and age of the prime minister in your response."
    agent.run(qry)
    It found the prime minister of US Rishi Sunaak. His age 42 years (may be). But, check out the prime number, it arrives at 42. 42 is NOT a prime number. How to deal with such errors?
    Action Input: "Rishi Sunak age"
    Observation: 43 years
    Thought: I need to find the largest prime number that is smaller than 43.
    Action: Calculator
    Action Input: "Largest prime number smaller than 43"
    Observation: Answer: 42
    Thought: I now know the final answer.
    Final Answer: The current prime minister of UK is Rishi Sunak, who is 43 years old. The largest prime number that is smaller than his age is 42.
    > Finished chain.
    The current prime minister of UK is Rishi Sunak, who is 43 years old. The largest prime number that is smaller than his age is 42.

  • @usoppgostoso
    @usoppgostoso Год назад

    Conversation.predict returns nothing for me, weirdly.