Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

from agents.extensions.models.litellm_model import LitellmModel #666

Copy link
Copy link
Open
@LuSrodri

Description

@LuSrodri
Issue body actions

When called: from agents.extensions.models.litellm_model import LitellmModel

Appers this error mensage:

Traceback (most recent call last):
  File "C:\Users\boomg\Documents\workspace\ws-python\sales-agent\example_1.py", line 5, in <module>
    from agent import sales_agent_factory, CompanysContext
  File "C:\Users\boomg\Documents\workspace\ws-python\sales-agent\agent.py", line 6, in <module>
    from agents.extensions.models.litellm_model import LitellmModel
  File "C:\Users\boomg\Documents\workspace\ws-python\sales-agent\env\lib\site-packages\agents\extensions\models\litellm_model.py", line 8, in <module>
    import litellm.types
  File "C:\Users\boomg\Documents\workspace\ws-python\sales-agent\env\lib\site-packages\litellm\__init__.py", line 763, in <module>
    from .cost_calculator import completion_cost
  File "C:\Users\boomg\Documents\workspace\ws-python\sales-agent\env\lib\site-packages\litellm\cost_calculator.py", line 19, in <module>
    from litellm.litellm_core_utils.llm_cost_calc.utils import (
  File "C:\Users\boomg\Documents\workspace\ws-python\sales-agent\env\lib\site-packages\litellm\litellm_core_utils\llm_cost_calc\utils.py", line 9, in <module>
    from litellm.utils import get_model_info
  File "C:\Users\boomg\Documents\workspace\ws-python\sales-agent\env\lib\site-packages\litellm\utils.py", line 188, in <module>
    json_data = json.load(f)
  File "C:\Users\boomg\AppData\Local\Programs\Python\Python310\lib\json\__init__.py", line 293, in load
    return loads(fp.read(),
  File "C:\Users\boomg\AppData\Local\Programs\Python\Python310\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 1980: character maps to <undefined>

Dependencies:

openai-agent==0.0.14
openai-agents[litellm]==0.0.14

Python version: 3.10.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.