return q;
      return q.substring(0, 10) + len + q.substring(len - 10, len);
    },

    sleep(time) {
      return new Promise((resolve) => setTimeout(resolve, time));
    },

    /**
     * 保存API配置
     */
    saveKeys() {
      // 获取 AppKey和 AppSecret 或 OpenAI API 密钥的表单内容
      if (this.selectedApi === 'openai') {
        const apiKey = this.openai.apiKey;
        const model = this.openai.model;

        if (!apiKey) {
          this.saveMessage = '请填写 OpenAI API 密