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

Add cohere /v2/chat pass-through cost tracking support #8235

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

krrishdholakia
Copy link
Contributor

@krrishdholakia krrishdholakia commented Feb 4, 2025

Title

Ensures pass-through calls for cohere have cost tracking

from langchain_cohere import ChatCohere # pip install langchain-cohere~=0.4.1

base_url = "http://0.0.0.0:4000/" # 👈 PROXY BASE URL
token = "sk-1234"

llm = ChatCohere(
    model="command-r",
    cohere_api_key=token,
    base_url=f"{base_url}/cohere",
)

llm.invoke("hola")

Relevant issues

Type

🆕 New Feature
🐛 Bug Fix
🧹 Refactoring
📖 Documentation
🚄 Infrastructure
✅ Test

Changes

[REQUIRED] Testing - Attach a screenshot of any new tests passing locally

If UI changes, send a screenshot/GIF of working UI fixes

Copy link

vercel bot commented Feb 4, 2025

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

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 5, 2025 6:09am

@krrishdholakia krrishdholakia changed the title Litellm dev 02 03 2025 p5 Add cohere /v2/chat pass-through cost tracking support Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant