{
  "config": {
    "step": {
      "provider": {
        "title": "选择AI提供者",
        "description": "选择要用于此实例的AI服务提供者。",
        "data": {
          "api_provider": "API提供者",
          "context_messages": "保留的上下文消息数量（1-20）",
          "max_history_size": "最大对话历史大小（1-100）"
        }
      },
      "provider": {
        "title": "提供者设置",
        "description": "提供所选AI提供者的连接详细信息。",
        "data": {
          "name": "实例名称（例如，'GPT助手'，'Claude助手'）",
          "api_key": "用于身份验证的API密钥",
          "model": "要使用的AI模型",
          "api_endpoint": "自定义API端点URL（可选）",
          "temperature": "响应创造力（0-2，越低越专注）",
          "max_tokens": "最大响应长度（1-100000个标记）",
          "request_interval": "请求之间的最小时间（0.1-60秒）",
          "context_messages": "保留的上下文消息数量（1-20）",
          "max_history_size": "最大对话历史大小（1-100）"
        }
      },
      "user": {
        "title": "配置HA文本AI实例",
        "description": "使用所选提供者设置新的AI助手实例。",
        "data": {
          "name": "实例名称（例如，'GPT助手'，'Claude助手'）",
          "api_key": "用于身份验证的API密钥",
          "model": "要使用的AI模型",
          "temperature": "响应创造力（0-2，越低越专注）",
          "max_tokens": "最大响应长度（1-100000个标记）",
          "api_endpoint": "自定义API端点URL（可选）",
          "api_provider": "API提供者",
          "request_interval": "请求之间的最小时间（0.1-60秒）",
          "context_messages": "保留的上下文消息数量（1-20）",
          "max_history_size": "最大对话历史大小（1-100）"
        }
      }
    },
    "error": {
      "history_storage_error": "无法初始化历史存储。检查权限。",
      "history_rotation_error": "历史文件轮换时出错。",
      "history_file_access_error": "无法访问历史存储目录。",
      "name_exists": "具有此名称的实例已存在",
      "invalid_name": "无效的实例名称",
      "invalid_auth": "身份验证失败 - 检查您的API密钥",
      "invalid_api_key": "无效的API密钥 - 请验证您的凭据",
      "cannot_connect": "无法连接到API服务",
      "invalid_model": "所选模型不可用",
      "rate_limit": "超出速率限制",
      "context_length": "上下文长度超出限制",
      "rate_limit_exceeded": "API速率限制超出",
      "maintenance": "服务正在维护中",
      "invalid_response": "收到无效的API响应",
      "api_error": "发生API服务错误",
      "timeout": "请求超时",
      "invalid_instance": "指定的实例无效",
      "unknown": "发生意外错误",
      "empty": "名称不能为空",
      "invalid_characters": "名称只能包含字母、数字、空格、下划线和连字符",
      "name_too_long": "名称必须少于50个字符"
    },
    "abort": {
      "already_configured": "实例已配置"
    }
  },
  "options": {
    "step": {
      "init": {
        "title": "更新实例设置",
        "description": "修改此AI助手实例的设置。",
        "data": {
          "model": "AI模型",
          "temperature": "响应创造力（0-2）",
          "max_tokens": "最大响应长度（1-100000）",
          "request_interval": "最小请求间隔（0.1-60秒）",
          "context_messages": "要包含在上下文中的先前消息数量（1-20）",
          "max_history_size": "最大对话历史大小（1-100）"
        }
      }
    }
  },
  "selector": {
    "api_provider": {
      "options": {
        "openai": "OpenAI（兼容）",
        "anthropic": "Anthropic（兼容）",
        "deepseek": "DeepSeek",
        "gemini": "Google Gemini"
      }
    }
  },
  "services": {
    "ask_question": {
      "name": "提问 (HA Text AI)",
      "description": "向AI模型发送问题并接收详细响应。响应将存储在对话历史中，可以稍后检索。",
      "fields": {
        "instance": {
          "name": "实例",
          "description": "要使用的HA文本AI实例名称"
        },
        "question": {
          "name": "问题",
          "description": "您对AI助手的问题或提示"
        },
        "context_messages": {
          "name": "上下文消息",
          "description": "要包含在上下文中的先前消息数量（1-20）"
        },
        "system_prompt": {
          "name": "系统提示",
          "description": "可选的系统提示，用于为此特定问题设置上下文"
        },
        "model": {
          "name": "模型",
          "description": "选择要使用的AI模型（可选，覆盖默认设置）"
        },
        "temperature": {
          "name": "温度",
          "description": "控制响应创造力（0.0-2.0）"
        },
        "max_tokens": {
          "name": "最大标记数",
          "description": "响应的最大长度（1-100000个标记）"
        }
      }
    },
    "clear_history": {
      "name": "清除历史",
      "description": "删除对话历史中存储的所有问题和响应",
      "fields": {
        "instance": {
          "name": "实例",
          "description": "要清除历史的HA文本AI实例名称"
        }
      }
    },
    "get_history": {
      "name": "获取历史",
      "description": "检索对话历史，可选的过滤和排序",
      "fields": {
        "instance": {
          "name": "实例",
          "description": "要获取历史的HA文本AI实例名称"
        },
        "limit": {
          "name": "限制",
          "description": "要返回的对话数量（1-100）"
        },
        "filter_model": {
          "name": "过滤模型",
          "description": "按特定AI模型过滤对话"
        },
        "start_date": {
          "name": "开始日期",
          "description": "过滤从此日期/时间开始的对话"
        },
        "include_metadata": {
          "name": "包含元数据",
          "description": "包括额外信息，如使用的标记、响应时间等。"
        },
        "sort_order": {
          "name": "排序顺序",
          "description": "结果的排序顺序（最新或最旧优先）"
        }
      }
    },
    "set_system_prompt": {
      "name": "设置系统提示",
      "description": "为所有未来的对话设置默认的系统行为指令",
      "fields": {
        "instance": {
          "name": "实例",
          "description": "要设置系统提示的HA文本AI实例名称"
        },
        "prompt": {
          "name": "系统提示",
          "description": "定义AI应如何行为和响应的指令"
        }
      }
    }
  },
  "entity": {
    "sensor": {
      "ha_text_ai": {
        "name": "{name}",
        "state": {
          "ready": "准备就绪",
          "processing": "处理中",
          "error": "错误",
          "disconnected": "已断开连接",
          "rate_limited": "速率限制",
          "maintenance": "维护中",
          "initializing": "初始化中",
          "retrying": "重试中",
          "queued": "排队中"
        },
        "state_attributes": {
          "question": {
            "name": "最后问题"
          },
          "response": {
            "name": "最后响应"
          },
          "model": {
            "name": "当前模型"
          },
          "temperature": {
            "name": "温度"
          },
          "max_tokens": {
            "name": "最大标记数"
          },
          "system_prompt": {
            "name": "系统提示"
          },
          "response_time": {
            "name": "最后响应时间"
          },
          "total_responses": {
            "name": "总响应数"
          },
          "error_count": {
            "name": "错误计数"
          },
          "last_error": {
            "name": "最后错误"
          },
          "api_status": {
            "name": "API状态"
          },
          "tokens_used": {
            "name": "总使用标记数"
          },
          "average_response_time": {
            "name": "平均响应时间"
          },
          "last_request_time": {
            "name": "最后请求时间"
          },
          "is_processing": {
            "name": "处理状态"
          },
          "is_rate_limited": {
            "name": "速率限制状态"
          },
          "is_maintenance": {
            "name": "维护状态"
          },
          "api_version": {
            "name": "API版本"
          },
          "endpoint_status": {
            "name": "端点状态"
          },
          "performance_metrics": {
            "name": "性能指标"
          },
          "history_size": {
            "name": "历史大小"
          },
          "uptime": {
            "name": "正常运行时间"
          },
          "total_tokens": {
            "name": "总标记数"
          },
          "prompt_tokens": {
            "name": "提示标记数"
          },
          "completion_tokens": {
            "name": "完成标记数"
          },
          "successful_requests": {
            "name": "成功请求数"
          },
          "failed_requests": {
            "name": "失败请求数"
          },
          "average_latency": {
            "name": "平均延迟"
          },
          "max_latency": {
            "name": "最大延迟"
          },
          "min_latency": {
            "name": "最小延迟"
          }
        }
      }
    }
  }
}
