- 统计 JSON(发给模型的数据)
+ 提交给模型 {{ llmChars }} 字符(无缩进列数组;框内换行只为方便看,上方卡片仍是完整对象)
@@ -171,7 +194,8 @@ export default {
logsLoading: false,
logDialogVisible: false,
logDialogMeta: '',
- logDialogReport: ''
+ logDialogReport: '',
+ llmJson: ''
}
},
computed: {
@@ -199,6 +223,13 @@ export default {
return this.stats && this.stats.compare ? this.stats.compare : {}
},
statsJson() {
+ if (this.llmJson) {
+ try {
+ return JSON.stringify(JSON.parse(this.llmJson), null, 2)
+ } catch (e) {
+ return this.llmJson
+ }
+ }
if (!this.stats) return ''
try {
return JSON.stringify(this.stats, null, 2)
@@ -206,6 +237,11 @@ export default {
return ''
}
},
+ llmChars() {
+ if (this.llmJson) return this.llmJson.length
+ const n = this.stats && this.stats.llmJsonChars
+ return n || 0
+ },
summaryItems() {
if (!this.current) return []
return [
@@ -265,9 +301,11 @@ export default {
if (!data) {
this.stats = null
this.report = ''
+ this.llmJson = ''
return
}
this.stats = data.stats || data
+ this.llmJson = data.llmJson || (this.stats && this.stats.llmJson) || ''
this.periodLabel = data.periodLabel || (this.stats && this.stats.periodLabel) || ''
this.report = data.report || ''
this.aiError = data.aiError || ''