Skip to content

Conversation

@369pro
Copy link

@369pro 369pro commented Dec 26, 2025

Description

Summary: (summary)

Fix: #(issue)

Docs Issue/PR: (docs-issue-or-pr-link)

Reviewer: @(reviewer)

Checklist:

  • I have performed a self-review of my own code | 我已自行检查了自己的代码
  • I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释
  • I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常
  • I have created related documentation issue/PR in MemOS-Docs (if applicable) | 我已在 MemOS-Docs 中创建了相关的文档 issue/PR(如果适用)
  • I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用)
  • I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人

Copilot AI review requested due to automatic review settings December 26, 2025 07:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces API documentation generation and Time-To-First-Token (TTFT) performance tracking for LLM streaming operations. The changes enable detailed performance metrics collection during model inference.

Key Changes:

  • Enhanced TTFT calculation in OpenAI streaming client with model information logging
  • Added performance tracking decorator that computes content metrics including speed and length
  • Modified OpenAPI export to generate documentation directly from router definitions

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/memos/utils.py Added performance metrics logging with content length/speed calculations for LLM responses
src/memos/llms/openai.py Implemented TTFT measurement for streaming responses with model version tracking
src/memos/cli.py Refactored OpenAPI export to generate schema from router instead of full app
docs/openapi.json Updated OpenAPI documentation reflecting new API structure and endpoints
Comments suppressed due to low confidence (1)

src/memos/utils.py:1

  • Corrected spelling of 'monitering' to 'monitoring'.
import functools

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}
],
"title": "Task Id",
"description": "Task ID for monitering async tasks"
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'monitering' to 'monitoring'.

Suggested change
"description": "Task ID for monitering async tasks"
"description": "Task ID for monitoring async tasks"

Copilot uses AI. Check for mistakes.
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