Skip to content

Commit 6323d5a

Browse files
committed
feat: 在显示界面中添加 thinking 模式状态展示
1 parent 8fd5213 commit 6323d5a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

cmd/ait/ait.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ func main() {
384384
Concurrency: *concurrency,
385385
Count: *count,
386386
Stream: *stream,
387+
Thinking: *thinking,
387388
PromptText: promptSource.DisplayText,
388389
IsFile: promptSource.IsFile,
389390
Report: *reportFlag,

internal/display/display.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ type Input struct {
3333
Concurrency int
3434
Count int
3535
Stream bool
36+
Thinking bool // 是否开启思考模式
3637
PromptText string // 用于显示的prompt文本
3738
IsFile bool // 是否为文件类型输入
3839
Report bool // 是否生成报告文件
@@ -93,6 +94,7 @@ func (td *Displayer) ShowInput(data *Input) {
9394
table.Append("⚡ 并发数", strconv.Itoa(data.Concurrency), "同时发送的请求数")
9495
table.Append("🕐 超时时间", strconv.Itoa(data.Timeout)+"秒", "每个请求的超时时间")
9596
table.Append("🌊 流式模式", strconv.FormatBool(data.Stream), "是否启用流式响应")
97+
table.Append("🧠 思考模式", strconv.FormatBool(data.Thinking), "是否启用思考模式(仅OpenAI协议支持)")
9698

9799
// 对于文件类型的 prompt,直接显示,不进行截断处理
98100
var promptDisplay string
@@ -264,7 +266,7 @@ func (td *Displayer) ShowMultiReport(data []*types.ReportData) {
264266

265267
table.Header("🤖 模型", "🎯 目标 IP", "📊 请求数", "⚡ 并发", "✅ 成功率",
266268
"🕐 平均总耗时", "⚡ 平均 TTFT", "⏰ 平均 TPOT", "🚀 平均 TPS", "🎲 平均 Token 数",
267-
"🔍 平均 DNS 时间", "🔌 平均 TCP 连接时间", "🔒 平均 TLS 时间")
269+
"🌊 流式模式", "🧠 思考模式", "🔍 平均 DNS 时间", "🔌 平均 TCP 连接时间", "🔒 平均 TLS 时间")
268270

269271
for _, report := range data {
270272
// TTFT 和 TPOT 处理(流式模式才显示)
@@ -286,6 +288,7 @@ func (td *Displayer) ShowMultiReport(data []*types.ReportData) {
286288
tpotStr,
287289
fmt.Sprintf("%.2f", report.ContentMetrics.AvgTPS),
288290
strconv.Itoa(report.ContentMetrics.AvgOutputTokenCount),
291+
strconv.FormatBool(report.IsStream),
289292
report.NetworkMetrics.AvgDNSTime.String(),
290293
report.NetworkMetrics.AvgConnectTime.String(),
291294
report.NetworkMetrics.AvgTLSHandshakeTime.String(),

0 commit comments

Comments
 (0)