Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set api_key param to litellm client based on providers api keys #27851

Closed
wants to merge 2 commits into from

Conversation

jamesev15
Copy link
Contributor

  • PR title: "ChatLiteLLM: set api_key to litellm client"

  • PR message:

    • Description: The litellm client requires an api_key parameter, but it currently does not take any provider-specific API keys. I propose using the available provider API key as the api_key for litellm.
    • Issue: the issue anthropic_api_key not used for ChatLiteLLM #27826

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Nov 1, 2024
Copy link

vercel bot commented Nov 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 1, 2024 11:55pm

@dosubot dosubot bot added community Related to langchain-community 🤖:nit Small modifications/deletions, fixes, deps or improvements to existing code or docs labels Nov 1, 2024
@efriis
Copy link
Member

efriis commented Nov 4, 2024

this will introduce a new bug where it'll pass the incorrect api key for any models after the first one that has an api key

@efriis efriis closed this Nov 4, 2024
@chenzimin
Copy link
Contributor

chenzimin commented Nov 13, 2024

@efriis How about removing all existing *_api_key (since they are not used), and adding api_key (for litellm, only api_key is needed) to pass to litellm?

Litellm doc for completion: https://docs.litellm.ai/docs/completion/input#input-params-1

edit: I created PR #28097

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Related to langchain-community 🤖:nit Small modifications/deletions, fixes, deps or improvements to existing code or docs size:S This PR changes 10-29 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants