Skip to content

[Bug]: Cannot import litellm (1.44.9) #5424

Description

@au-to-pi-lot

What happened?

When importing litellm 1.44.9, it throws an ImportError. This should not happen.

Relevant log output

Traceback (most recent call last):
  File "/home/autopilot/.local/share/JetBrains/Toolbox/apps/pycharm-professional/plugins/python/helpers/pydev/pydevd.py", line 1534, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/autopilot/.local/share/JetBrains/Toolbox/apps/pycharm-professional/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "src/main.py", line 7, in <module>
    from src.bot import DiscordBot
  File "/home/autopilot/Projects/nexari/src/bot.py", line 7, in <module>
    import litellm
  File "/home/autopilot/.conda/envs/llm-discord-bot/lib/python3.12/site-packages/litellm/__init__.py", line 893, in <module>
    MistralEmbeddingConfig,
^^^^^^^^^^^^^^^^^^^
  File "/home/autopilot/.conda/envs/llm-discord-bot/lib/python3.12/site-packages/litellm/main.py", line 106, in <module>
    from .llms.cohere import chat as cohere_chat
ImportError: cannot import name 'chat' from 'litellm.llms.cohere' (/home/autopilot/.conda/envs/llm-discord-bot/lib/python3.12/site-packages/litellm/llms/cohere.py)

Twitter / LinkedIn details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions