Skip to content

Input should be a valid dictionary or instance of Message [type=model_type, input_value='code', input_type=str] #290

@brianping7

Description

@brianping7

调用response = self.coze.chat.create_and_poll(
bot_id=bot_id,
user_id=user_id,
additional_messages=messages,
conversation_id=conversation_id
)
时报错,输入为

发起对话请求: [Message(role=<MessageRole.USER: 'user'>, type=<MessageType.QUESTION: 'question'>, content='你是一个专业的翻译器。请将给定的英文文本准确自然地翻译成中文。保持足球专业术语的准确性。', content_type=<MessageContentType.TEXT: 'text'>, meta_data=None, id=None, conversation_id=None, section_id=None, bot_id=None, chat_id=None, created_at=None, updated_at=None, reasoning_content=None)]

报错
翻译失败: Chat request failed: 1 validation error for Message
Input should be a valid dictionary or instance of Message [type=model_type, input_value='code', input_type=str]
For further information visit https://errors.pydantic.dev/2.11/v/model_type

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions