Skip to content

AttributeError: 'NoneType' object has no attribute 'model_dump_json' #1630

Open
@inlines10

Description

@inlines10

Describe the bug

                                       ^^^^^^^^^^^^^^^^^^^^^^^^

AttributeError: 'NoneType' object has no attribute 'model_dump_json'
Image

Reproduce

from langchain_community.chat_models.tongyi import ChatTongyi

from browser_use import Agent
from dotenv import load_dotenv
import os
load_dotenv()

import asyncio

api_key = os.getenv("DASHSCOPE_API_KEY")

llm = ChatTongyi(model="qwen-plus", dashscope_api_key=api_key)

async def main():
agent = Agent(
task="获取https://github.com/OpenInterpreter/open-interpreter仓库的前五个问题",
llm=llm,
use_vision=False,
)
result = await agent.run()
print(result)

asyncio.run(main())

Expected behavior

怎么解决

Screenshots

No response

Open Interpreter version

WARNING: Package(s) not found: open-interpreter

Python version

Python 3.11.9

Operating System name and version

macos15

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions