Claude 3.5 API in Python • Explore AWESOME Use Cases!

Поділитися
Вставка
  • Опубліковано 21 гру 2024

КОМЕНТАРІ • 21

  • @Serari5072
    @Serari5072 5 місяців тому +5

    I'm a graduate student conducting research related to LLM in Korea. I was struggling with how to use the Claude API, but thanks to this video, I was able to resolve it easily. Thank you very much for creating this video.

    • @pixegami
      @pixegami  2 місяці тому

      So glad to hear that! :D Good luck with your research.

  • @paulham.2447
    @paulham.2447 5 місяців тому +2

    Beautifully clear and precise! THANKS

    • @pixegami
      @pixegami  5 місяців тому

      Glad you enjoyed it!

  • @1BMarcello
    @1BMarcello Місяць тому

    Great content, thanks!

  • @suapelol
    @suapelol 4 місяці тому +4

    Don't give up on posting brother. Your videos are great and I think you really have a talent for explanations. Please keep pushing forward!!

  • @fredericherrera
    @fredericherrera 4 місяці тому

    very good - bravo

  • @thomasbianco-SXO
    @thomasbianco-SXO 2 місяці тому

    nice job

    • @pixegami
      @pixegami  2 місяці тому

      Thanks! Glad you enjoyed it!

  • @memocappa5495
    @memocappa5495 2 місяці тому +1

    How would you structure the code if you have too many functions in your app? Similar to chain of command, can the AI first determine the category for what the user wants to do and only send a select list of functions’ jsons to Anthropic. For example, if the user wants to update the user table’s records, agent should only know functions that can update the user records in the table, and there’s no need to send the appointment booking functions’ jsons, until user wants to make an appointment.

    • @pixegami
      @pixegami  2 місяці тому

      Great question! You're on the right track with your thinking. Here's how you could approach this:
      1. Code structure: Consider using a modular approach, organizing functions into separate modules or classes based on their purpose (e.g., UserManagement, AppointmentBooking).
      2. Categorizing functions: Create a mapping of categories to function sets. For example:
      ```python
      function_categories = {
      "user_management": [update_user, delete_user, ...],
      "appointment_booking": [book_appointment, cancel_appointment, ...]
      }
      ```
      3. Selective function provision: Implement a pre-processing step where you determine the user's intent (you could use a simple keyword matching or a more advanced NLP approach). Then, only send the relevant function set to the AI:
      ```python
      def get_relevant_functions(user_input):
      category = determine_intent(user_input)
      return function_categories.get(category, [])
      relevant_functions = get_relevant_functions(user_input)
      ai_response = call_anthropic_api(user_input, relevant_functions)
      ```
      That's one idea I'd probably try. At the end of the day, it's just similar to converting a really large decision set into something like a tree instead, so each "step" has less breadth (which makes it easier to pick the right thing).

    • @pixegami
      @pixegami  2 місяці тому +1

      Great question! You're on the right track with your thinking. Here's how you could approach this:
      Code structure: Consider using a modular approach, organizing functions into separate modules or classes based on their purpose (e.g., UserManagement, AppointmentBooking).
      Categorizing functions: Create a mapping of categories to function sets. For example:
      function_categories = {
      "user_management": [update_user, delete_user, ...],
      "appointment_booking": [book_appointment, cancel_appointment, ...]
      }
      Selective function provision: Implement a pre-processing step where you determine the user's intent (you could use a simple keyword matching or a more advanced NLP approach). Then, only send the relevant function set to the AI:
      def get_relevant_functions(user_input):
      category = determine_intent(user_input)
      return function_categories.get(category, [])
      relevant_functions = get_relevant_functions(user_input)
      ai_response = call_anthropic_api(user_input, relevant_functions)
      That's one idea I'd probably try. At the end of the day, it's just similar to converting a really large decision set into something like a tree instead, so each "step" has less breadth (which makes it easier to pick the right thing).

    • @memocappa5495
      @memocappa5495 Місяць тому

      @ Thank you. Ended up going with an agentic workflow. A function calling model sets the function_type (as a variable)

  • @Vikas-eg7ks
    @Vikas-eg7ks 5 місяців тому

    Hey!!, Great video, I am a beginner, Please provide step by step video tutorial.

  • @cryptobourritos
    @cryptobourritos 4 місяці тому

    thanks

  • @PiyushSingh-vn7ql
    @PiyushSingh-vn7ql 3 місяці тому

    What's the name of this guy?

  • @omkarmore2769
    @omkarmore2769 4 місяці тому

    Hi pixegami please help on testing career from 🇮🇳

  • @PerfectArmonic
    @PerfectArmonic 5 місяців тому +4

    As long as Claude doesn’t have the ability to create images, cannot compete with chatGPT… unless drop the prices to 10$/per month…

    • @nnkaz1k856
      @nnkaz1k856 5 місяців тому +2

      Man, not everybody needs generating images...

    • @pixegami
      @pixegami  5 місяців тому

      I do wish Claude did offer image generation. But again not everyone will need that for their use-cases. The Sonnet model might just be better at a certain set of use-cases for some developers (e.g. writing code, or image analysis).
      Also, for API use-cases, you need to compare the $/per token pricing. GPT 4o is US$5.00/1M, and Sonnet 3.5 is US$3.00/1M.
      However, I saw GPT 4o-mini just came out recently as well, priced ridiculously low at US$0.15/1M.

    • @TheAremoh
      @TheAremoh 4 місяці тому +1

      Claude is better at coding in my opinion.