Skip to content

Conversation

@sufubao
Copy link
Collaborator

@sufubao sufubao commented Dec 30, 2025

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @sufubao, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances LightLLM's documentation by introducing dedicated guides for its Function Calling and Reasoning Parser capabilities. These new resources aim to provide users with clear, detailed instructions and examples for leveraging these advanced AI features, improving the overall transparency and usability of the system. The documentation covers a wide array of supported models and practical implementation scenarios.

Highlights

  • New Documentation Added: Comprehensive documentation for 'Function Calling' and 'Reasoning Parser' features has been added in both Chinese and English.
  • Function Calling Tutorial: The new Function Calling tutorial details supported models (e.g., Qwen, Llama, Mistral, DeepSeek, Kimi), basic and advanced usage, streaming, multi-turn conversations, and common issues.
  • Reasoning Parser Tutorial: The new Reasoning Parser tutorial explains how to parse model thinking processes, covering various models (e.g., DeepSeek-R1, Qwen3, GLM-4.5, GPT-OSS), usage, response formats, performance considerations, and integration with tool calls.
  • Navigation Updates: The main index.rst files for both Chinese and English documentation have been updated to include direct links to these new tutorials.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds comprehensive documentation for the 'Function Calling' and 'Reasoning Parser' features in both English and Chinese. The new documentation is well-structured, covering supported models, usage examples, advanced features, and technical details. My review focuses on improving the maintainability and correctness of the documentation. I've suggested removing hardcoded line numbers to prevent them from becoming outdated and correcting an invalid JSON example. Overall, this is a great addition to the project's documentation.

--------

**核心文件**:
- ``lightllm/server/function_call_parser.py`` - 解析器实现(1267行)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Hardcoding the line number (1267行) in the documentation can become a maintenance burden as the code file changes. It's better to remove the specific line count to prevent the documentation from becoming outdated.

Suggested change
- ``lightllm/server/function_call_parser.py`` - 解析器实现(1267行)
- ``lightllm/server/function_call_parser.py`` - 解析器实现

Comment on lines +195 to +199
// 推理块
{"choices": [{"delta": {"reasoning_content": "推理片段"}}]}

// 答案块
{"choices": [{"delta": {"content": "答案片段"}}]}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This JSON code block contains // style comments (e.g., // 推理块), which is not valid JSON syntax. This could be misleading for users. I recommend removing the comments to ensure the example is valid JSON.

Suggested change
// 推理块
{"choices": [{"delta": {"reasoning_content": "推理片段"}}]}
// 答案块
{"choices": [{"delta": {"content": "答案片段"}}]}
{"choices": [{"delta": {"reasoning_content": "推理片段"}}]}
{"choices": [{"delta": {"content": "答案片段"}}]}

Comment on lines +330 to +332
- ``lightllm/server/reasoning_parser.py`` - 解析器实现(910行)
- ``lightllm/server/api_openai.py`` - API 集成
- ``test/test_api/test_openai_api.py`` - 测试示例(752-794行)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Hardcoding line numbers like (910行) and line ranges like (752-794行) in documentation can become a maintenance burden as the code files change. It's better to remove these specific line numbers to prevent the documentation from becoming outdated.

Suggested change
- ``lightllm/server/reasoning_parser.py`` - 解析器实现(910行)
- ``lightllm/server/api_openai.py`` - API 集成
- ``test/test_api/test_openai_api.py`` - 测试示例(752-794行)
- ``lightllm/server/reasoning_parser.py`` - 解析器实现
- ``lightllm/server/api_openai.py`` - API 集成
- ``test/test_api/test_openai_api.py`` - 测试示例

-----------------

**Core Files**:
- ``lightllm/server/function_call_parser.py`` - Parser implementation (1267 lines)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Hardcoding line numbers (1267 lines) in documentation can become a maintenance burden as the code files change. It's better to remove the specific line count to prevent the documentation from becoming outdated.

Suggested change
- ``lightllm/server/function_call_parser.py`` - Parser implementation (1267 lines)
- ``lightllm/server/function_call_parser.py`` - Parser implementation

Comment on lines +195 to +199
// Reasoning chunk
{"choices": [{"delta": {"reasoning_content": "Reasoning fragment"}}]}

// Answer chunk
{"choices": [{"delta": {"content": "Answer fragment"}}]}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This JSON code block contains // style comments, which is not valid JSON syntax. This could be misleading for users. I recommend removing the comments to ensure the example is valid JSON.

Suggested change
// Reasoning chunk
{"choices": [{"delta": {"reasoning_content": "Reasoning fragment"}}]}
// Answer chunk
{"choices": [{"delta": {"content": "Answer fragment"}}]}
{"choices": [{"delta": {"reasoning_content": "Reasoning fragment"}}]}
{"choices": [{"delta": {"content": "Answer fragment"}}]}

Comment on lines +330 to +332
- ``lightllm/server/reasoning_parser.py`` - Parser implementation (910 lines)
- ``lightllm/server/api_openai.py`` - API integration
- ``test/test_api/test_openai_api.py`` - Test examples (lines 752-794)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Hardcoding line numbers (910 lines) and line ranges (lines 752-794) in documentation can become a maintenance burden as the code files change. It's better to remove the specific line numbers to prevent the documentation from becoming outdated.

Suggested change
- ``lightllm/server/reasoning_parser.py`` - Parser implementation (910 lines)
- ``lightllm/server/api_openai.py`` - API integration
- ``test/test_api/test_openai_api.py`` - Test examples (lines 752-794)
- ``lightllm/server/reasoning_parser.py`` - Parser implementation
- ``lightllm/server/api_openai.py`` - API integration
- ``test/test_api/test_openai_api.py`` - Test examples

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.

2 participants