Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

refactor cohere to be in a folder

Ishaan Jafff9ea0d8fa985
diff --git a/litellm/llms/cohere_chat.py b/litellm/llms/cohere/chat.py
similarity index 99%
rename from litellm/llms/cohere_chat.py
rename to litellm/llms/cohere/chat.py
index f13e74614b2..b2569b4291e 100644
--- a/litellm/llms/cohere_chat.py
+++ b/litellm/llms/cohere/chat.py
@@ -13,7 +13,7 @@ import litellm
from litellm.types.llms.cohere import ToolResultObject
from litellm.utils import Choices, Message, ModelResponse, Usage
-from .prompt_templates.factory import cohere_message_pt, cohere_messages_pt_v2
+from ..prompt_templates.factory import cohere_message_pt, cohere_messages_pt_v2
class CohereError(Exception):
diff --git a/litellm/main.py b/litellm/main.py
index 2cf836890a7..1772e9b2bc7 100644
--- a/litellm/main.py
+++ b/litellm/main.py
@@ -83,7 +83,6 @@ from .llms import (
clarifai,
cloudflare,
cohere,
- cohere_chat,
gemini,
huggingface_restapi,
maritalk,
@@ -107,6 +106,7 @@ from .llms.anthropic_text import AnthropicTextCompletion
from .llms.azure import AzureChatCompletion, _check_dynamic_azure_params
from .llms.azure_text import AzureTextCompletion
from .llms.bedrock_httpx import BedrockConverseLLM, BedrockLLM
+from .llms.cohere import chat as cohere_chat
from .llms.custom_llm import CustomLLM, custom_chat_llm_router
from .llms.databricks import DatabricksChatCompletion
from .llms.huggingface_restapi import Huggingface