BerriAI / litellm

Python SDK, Proxy Server (LLM Gateway) to call 100+ LLM APIs in OpenAI format - [Bedrock, Azure, OpenAI, VertexAI, Cohere, Anthropic, Sagemaker, HuggingFace, Replicate, Groq]
https://docs.litellm.ai/docs/
Other
14.07k stars 1.66k forks source link

(refactor) anthropic - move _process_response in transformation.py #6834

Closed ishaan-jaff closed 1 day ago

ishaan-jaff commented 1 day ago

Title

Relevant issues

Type

๐Ÿ†• New Feature ๐Ÿ› Bug Fix ๐Ÿงน Refactoring ๐Ÿ“– Documentation ๐Ÿš„ Infrastructure โœ… Test

Changes

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

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

Description by Korbit AI

What change is being made?

Refactor the Anthropic module by moving the _process_response method and _convert_tool_response_to_message static method from handler.py to transformation.py.

Why are these changes being made?

These changes are made to improve code organization and modularity by relocating the response processing functionality to a more appropriate module, transformation.py. This refactoring supports better code maintenance and readability. The decision to move these methods was driven by their relevance to data transformation activities rather than direct request handling.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

korbit-ai[bot] commented 1 day ago

Hey there, my name is Korbit. I've joined the team as your AI code reviewer. I'll automatically scan your PRs and raise any issues I find. I can also help you write a PR description. As you work with me, I'll learn about your priorities and codebase and get smarter over time. My goal is to help improve your code quality and save time for the human reviewers on your team. Let's get started!

vercel[bot] commented 1 day ago

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 Nov 20, 2024 8:08pm
krrishdholakia commented 21 hours ago

hey @ishaan-jaff can we rename this to transform_response? this will keep it consistent with naming convention in other configs