[PR #34] [MERGED] Resolved an Issue: The Claude LLM instance call - ChatAnthropic() #108

Closed
opened 2025-11-06 14:33:10 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Shubhamsaboo/awesome-llm-apps/pull/34
Author: @Madhuvod
Created: 11/29/2024
Status: Merged
Merged: 11/29/2024
Merged by: @Shubhamsaboo

Base: mainHead: meeting-agent


📝 Commits (1)

  • 275432f calling the llm through crewai instead of langchain

📊 Changes

1 file changed (+7 additions, -12 deletions)

View changed files

📝 ai_agent_tutorials/ai_meeting_agent/meeting_agent.py (+7 -12)

📄 Description

So in the meeting_agent.py, the existing code has been using both openai's gpt4o and anthropic's sonnet. these were being called through langchain's llm classes; ChatOpenAI() and ChatAnthropic().

When I first tried to run the app, I got this error specifically:

BadRequestError: litellm.BadRequestError: LLM Provider NOT provided. Pass in the LLM provider you are trying to call. You passed model=model='claude-3-5-sonnet-20240620' anthropic_api_url='https://api.anthropic.com' anthropic_api_key=SecretStr('**********') model_kwargs={} Pass model as E.g. For 'Huggingface' inference endpoints pass in completion(model='huggingface/starcoder',..) Learn more: https://docs.litellm.ai/docs/providers

Went through the litellm docs, langchain docs and couldn't really figure out what it meant. I realised that the model attribute has been changed from ChatAnthropic(model_name = ) to ChatAnthropic(model = )

But I still got the same error along with the SerperDevTool() error.

So the changes were:

  • Using crewAI's LLM call directly : claude = LLM(model="claude-3-5-sonnet-20240620")
  • used only claude llm for all the agents - for better simplicity. (gpt4o was used for 2 agents previously)
  • changed the imports according to the crewai docs : from crewai import LLM
    from crewai.process import Process

that's about it. now, it works completely fine:

image


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Shubhamsaboo/awesome-llm-apps/pull/34 **Author:** [@Madhuvod](https://github.com/Madhuvod) **Created:** 11/29/2024 **Status:** ✅ Merged **Merged:** 11/29/2024 **Merged by:** [@Shubhamsaboo](https://github.com/Shubhamsaboo) **Base:** `main` ← **Head:** `meeting-agent` --- ### 📝 Commits (1) - [`275432f`](https://github.com/Shubhamsaboo/awesome-llm-apps/commit/275432f27f0b6a3290c678d8e283bdac651b39b4) calling the llm through crewai instead of langchain ### 📊 Changes **1 file changed** (+7 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `ai_agent_tutorials/ai_meeting_agent/meeting_agent.py` (+7 -12) </details> ### 📄 Description So in the meeting_agent.py, the existing code has been using both openai's gpt4o and anthropic's sonnet. these were being called through langchain's llm classes; ChatOpenAI() and ChatAnthropic(). When I first tried to run the app, I got this error specifically: > BadRequestError: litellm.BadRequestError: LLM Provider NOT provided. Pass in the LLM provider you are trying to call. You passed model=model='claude-3-5-sonnet-20240620' anthropic_api_url='https://api.anthropic.com' anthropic_api_key=SecretStr('**********') model_kwargs={} Pass model as E.g. For 'Huggingface' inference endpoints pass in `completion(model='huggingface/starcoder',..)` Learn more: https://docs.litellm.ai/docs/providers Went through the litellm docs, langchain docs and couldn't really figure out what it meant. I realised that the model attribute has been changed from ChatAnthropic(model_name = ) to ChatAnthropic(model = ) But I still got the same error along with the SerperDevTool() error. So the changes were: - Using crewAI's LLM call directly : claude = LLM(model="claude-3-5-sonnet-20240620") - used only claude llm for all the agents - for better simplicity. (gpt4o was used for 2 agents previously) - changed the imports according to the crewai docs : from crewai import LLM from crewai.process import Process that's about it. now, it works completely fine: ![image](https://github.com/user-attachments/assets/e2b900b4-5daf-4b9a-9e82-c73f43d5b15e) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-06 14:33:10 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-llm-apps#108