Skip to content

Claude code 使用中的API error 422 反馈 #97

@Huaizz-shawen

Description

@Huaizz-shawen

测试中发现,给claude code 特定提示词(或上下文中触及某些特定词时,会出现报错)
● Search(pattern: "*.yaml")
⎿ Found 0 files
⎿ API Error: 422 {"error":{"message":"Failed to deserialize the JSON body into the target type: messages[2]: data did not match any variant of untagged enum MessageContent
at line 1 column 37352","type":"json_rejection","code":422}}

示例:

You are an expert machine learning engineer. Please help me train a model in this existing project by leveraging the current codebase and available data.

Key Requirements:

  1. Project Analysis: Thoroughly examine the entire project structure to understand the codebase
  2. Data Discovery: Automatically identify and locate all available datasets within the project
  3. Script Identification: Find existing training scripts in the project rather than creating new ones
  4. Environment Setup: Use an appropriate conda environment available on the system

Your Task:

  • Start by exploring the complete project structure and dependencies
  • Identify all available datasets and their formats/purposes
  • Locate existing training/model scripts and understand their functionality
  • Determine the correct data-script combinations based on code analysis
  • Set up and execute the training using the project's existing infrastructure
  • Use the project's existing logging, evaluation, and saving mechanisms

Important:

  • DO NOT create new training scripts - use what already exists in the project
  • Respect the project's existing architecture and conventions

Begin by providing a comprehensive analysis of the project structure, available data, and existing training capabilities.

● I'll help you train a model by first thoroughly analyzing this project. Let me start by exploring the project structure, identifying datasets, and locating existing
training scripts.

● Explore(Analyze project structure comprehensively)
⎿ Done (45 tool uses · 57.9k tokens · 5m 40s)

● Read(test_training.py)
⎿ Read 104 lines

● Search(pattern: "README*")
⎿ Found 3 files (ctrl+o to expand)

● Search(pattern: "requirements.txt")
⎿ Found 0 files

● Search(pattern: "*.yml")
⎿ Found 1 file (ctrl+o to expand)

● Search(pattern: "*.yaml")
⎿ Found 0 files
⎿ API Error: 422 {"error":{"message":"Failed to deserialize the JSON body into the target type: messages[2]: data did not match any variant of untagged enum MessageContent
at line 1 column 37352","type":"json_rejection","code":422}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions