Easy AI Python Projects - Getting Started with Claude 2.1 API

Sdílet
Vložit
  • čas přidán 29. 06. 2024
  • In this Easy AI Python Projects series, I go over how you can get started with the new Claude 2.1 mode in Python. We'll start off by taking a detailed look at the documentation to understand the AI model. We will then build out this easy ai python project to interact with the Anthropic API to submit a prompt, calculate the tokens, use system prompts and get back a streaming response.
    This is the perfect tutorial for getting started with AI in Python. I love teaching Python with Projects so if that's something you're interested in, make sure you subscribe!
    🎬 WATCH NEXT
    Python Projects - • Python Projects 👨‍🍳
    📚 MY FAVOURITE PROGRAMMING BOOKS 📚
    Python Programming 👉 amzn.to/3TxsJx6
    Python Programming 2 👉 amzn.to/3IVa0GL
    HTML/CSS 👉 amzn.to/3vrKBBs
    Javascript and jQuery 👉 amzn.to/3TWiOmc
    Java 👉 amzn.to/49dcJWN
    Programming Interviews 👉 amzn.to/3TCr218
    Programming Interviews 2 👉 amzn.to/3VA6Dwp
    Programming Interviews 3 👉 amzn.to/49iGSUp
    ⌨️ MY DESK SETUP (I ACTUALLY USE) ⌨️
    Keyboard 1 👉 amzn.to/43Bizjx
    Keyboard 2 👉 amzn.to/4cABlLO
    Keyboard 3 👉 amzn.to/3Vy9aHm
    Mouse 👉 amzn.to/4cwMxJy
    Monitor 👉 amzn.to/3TxxczD
    📹 CREATOR SETUP 📹
    Camera Canon M50 👉amzn.to/3PDphQ8
    Condenser Microphone 👉 amzn.to/3vvmMJ2
    Condenser Audio Interface 👉 amzn.to/3Vvf1xe
    Microphone Arm 👉 amzn.to/49cHACH
    Video Light 👉amzn.to/3PEUvGz
    📱 GET IN TOUCH:
    Website: imdad.codes
    Instagram: / imdadcodes
    TikTok: / imdadcodes
    Medium: / imdadcodes
    ❤️ LIKE
    It takes me a long time to make these videos, please give the video a thumbs up 💪
    ✅ SUBSCRIBE:
    www.youtube.com/@imdadcodes?s...
    💁🏽‍♂️ WHO AM I:
    I'm Imdad, a startup founder and CTO in London, UK. I love making videos about life as a technical cofounder, teaching people to code through cool programming projects and productivity.
    I even teach Python tutorials as it is a great programming language that's used by the likes of Google, Facebook, Twitter, Quora and pretty much every big tech company you can name.
    #pythonforbeginners #pythonprojects #pythonautomation #claude #claude3 #claude3api
    00:00 What we're building
    1:15 Explaining the Claude API & Model
    12:40 Setting up our project
    23:17 System prompts in Claude 2.1
    25:56 Running the code
    28:52 What next?
    Disclaimer: The links above are affiliate links. If you decide to purchase any of these products through my links, I'll receive a small commission at no extra cost to you. This helps support my channel, and I only recommend products that I've personally used and believe in.
  • Věda a technologie

Komentáře • 7

  • @interceptorghost1149
    @interceptorghost1149 Před 3 měsíci +2

    Great video dude 😁😁

  • @Genius-Billionaire-Playboy
    @Genius-Billionaire-Playboy Před 3 měsíci +2

    Really thanks for this

    • @imdadcodes
      @imdadcodes  Před 3 měsíci

      Thank you! I'm releasing the Claude 3 API tutorial in a few days hopefully :)

  • @user-wb5ws1ub1k
    @user-wb5ws1ub1k Před 3 měsíci +1

    How can we achieve response formatting like that of Claude and GPT, including bullet points, code, space, numbering, etc.?
    and can we attach the file to an API if yes how can we do that do we need to send the buffer of it?
    Great explanation!
    Thanks!

    • @imdadcodes
      @imdadcodes  Před 3 měsíci

      The formatting you have to yourself unfortunately. E.g. process the `
      ` characters that come back in the response stream.
      For sending an image to the API, I think you'd have to send the image as a base64 string. Not sure if they've added anything new to their Python SDK (as they're releasing often). I'm making a dedicated video for how you can send prompts and images so stay tuned for that!

  • @Can-zg8gs
    @Can-zg8gs Před 2 měsíci

    Great video! thank you so much!
    I wanted to ask, especially with large system promts that contain a lot of data. Isn't that system promt going to be reapeatedly inculdet in my token 'cost'?
    As far as I understand it, in a longer conversation, I'm going to need to resend all that data for each conversational turn while continuosly adding to the historic conversation?
    So if I want a AI--Assistant that has to regularily answer questions based on knowledge gathered from a large DataBase, will that be incedibly expensive?