Skip to content

Conversation

@ZIC143
Copy link

@ZIC143 ZIC143 commented Feb 7, 2026

编辑一半点错了,这标题怎么改不了😂

feat: 增强请求日志和统计中的 token 使用量跟踪

  • 在 RequestLog 和 RequestLogger 类中添加了 total_tokens、input_tokens、output_tokens、reasoning_tokens 和 cached_tokens 字段。
  • 更新 RequestStats 以跟踪和汇总每小时及每日 token 使用量指标。
  • 修改数据库 schema,在 request_logs 表中新增 token 使用量相关列。
  • 实现了适用于聊天和图像提示的 token 使用量估算工具。
  • 增强 OpenAI 路由,在请求处理过程中记录详细的 token 使用信息。
  • 更新 TypeScript 工具,支持图像生成和编辑的 token 估算与使用量跟踪。
  • feat(数据中心):在 UI 中添加令牌指标显示
  • feat(chat):增强流式处理和日志中的 token 使用量跟踪
  • feat(logs): 更新请求日志结构以包含 token 指标

- Added total_tokens, input_tokens, output_tokens, reasoning_tokens, and cached_tokens fields to RequestLog and RequestLogger classes.
- Updated RequestStats to track and aggregate token usage metrics for hourly and daily statistics.
- Modified database schema to include new token usage columns in request_logs table.
- Implemented token usage estimation utilities for both chat and image prompts.
- Enhanced OpenAI routes to log detailed token usage information during request processing.
- Updated TypeScript utilities to support token estimation and usage tracking for image generation and editing.
feat: 增强请求日志和统计中的 token 使用量跟踪

- 在 RequestLog 和 RequestLogger 类中添加了 total_tokens、input_tokens、output_tokens、reasoning_tokens 和 cached_tokens 字段。
- 更新 RequestStats 以跟踪和汇总每小时及每日 token 使用量指标。
- 修改数据库 schema,在 request_logs 表中新增 token 使用量相关列。
- 实现了适用于聊天和图像提示的 token 使用量估算工具。
- 增强 OpenAI 路由,在请求处理过程中记录详细的 token 使用信息。
- 更新 TypeScript 工具,支持图像生成和编辑的 token 估算与使用量跟踪。
feat(数据中心):在 UI 中添加令牌指标显示
…ging

feat(chat):增强流式处理和日志中的 token 使用量跟踪
feat(logs): 更新请求日志结构以包含 token 指标
…Log function

fix(logs): 修正 addRequestLog 函数中 SQL 插入语句的参数数量处理错误
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant