-
Notifications
You must be signed in to change notification settings - Fork 100
docs(tutorial): add content about Reasoning, MCP, and Long-Term Memory #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hongxicheng
wants to merge
8
commits into
agentscope-ai:main
Choose a base branch
from
hongxicheng:Docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e1079a8
Add descriptions of some new features
hongxicheng b1c6033
optimize code
hongxicheng 163dca6
write docs
hongxicheng 0a9a7f1
write docs
hongxicheng 6ce0bdd
docs: add English translations for Reasoning, MCP, and Long-Term Memory
hongxicheng 97133b8
write docs
hongxicheng f8fe3c7
write docs
hongxicheng 0bbf197
write docs
hongxicheng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Long-Term Memory | ||
|
|
||
| Friday supports storing memories in a local database to enable long-term memory. | ||
|
|
||
| ## How to Set Up Long-Term Memory | ||
|
|
||
| In the settings interface, click to enable long-term memory, and fill in the Embedding model and vector database related settings | ||
|  | ||
|
|
||
| ## Database Selection | ||
|
|
||
| - The system has default configuration for Qdrant. Simply choose whether to save to disk, fill in the memory storage address, and you can use long-term memory. | ||
| - If you need to use other vector databases to store memories, please select the corresponding database provider and fill in the required parameters. Friday implements long-term memory based on the mem0 library. You can find the corresponding file in the configs/vector_stores folder of the mem0 library to view the specific parameters required for each database. | ||
|  | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # MCP Server Management | ||
|
|
||
| Friday supports dynamic management of MCP servers: | ||
|
|
||
| - Add and remove MCP servers | ||
| - Enable and disable specific MCP servers at any time | ||
| - Support both remote and local MCP server types | ||
|
|
||
| ## Adding MCP Servers | ||
|
|
||
| 1. Click the MCP button on the right side of the Friday chat interface to open the MCP server management interface | ||
|  | ||
hongxicheng marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 2. Write the MCP server configuration and click Save | ||
|  | ||
|
|
||
| ## Enabling and Disabling MCP Servers | ||
|
|
||
| During usage, you can enable or disable specific MCP servers through this switch | ||
|  | ||
hongxicheng marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Reasoning Mode | ||
|
|
||
| Friday supports enabling model reasoning mode and displaying the model's reasoning process. | ||
|
|
||
|  | ||
|
|
||
| ## How to Enable Reasoning Mode | ||
|
|
||
| If the model supports reasoning mode, Friday enables it by passing parameters when calling the model API. The parameters supported by different model providers are as follows: | ||
|
|
||
| | Model Provider | Parameter Name | Available Values | Description | | ||
| | ------------------------------- | ------------------ | --------------------------------------------------- | --------------------------------------------------- | | ||
| | **OpenAI** (o1/o3) | `reasoning_effort` | `low` / `medium` / `high` | Controls thinking depth, default is medium | | ||
| | **Anthropic** (Claude 3.7+) | `thinking` | `{"type": "enabled", "budget_tokens": 1024-128000}` | Extended thinking mode, requires token budget | | ||
| | **Gemini** (3.0+) | `thinking_config` | `{"thinking_level": "low/medium/high"}` | Controls reasoning level, high activates Deep Think | | ||
| | **Ollama** (DeepSeek R1/Qwen 3) | `think` | `true` / `false` | Enable/disable reasoning mode | | ||
| | **DashScope** (Qwen) | `enable_thinking` | `true` / `false` | Only supports streaming output | | ||
|
|
||
| ## Configuration Examples | ||
|
|
||
| All reasoning mode parameters are passed through **`generate_kwargs`**: | ||
|
|
||
| ### DashScope (Alibaba Cloud) | ||
|
|
||
|  | ||
|
|
||
| > **Note**: For non-streaming calls, you must set `enable_thinking=False`, otherwise an error will occur | ||
|
|
||
| ### OpenAI | ||
|
|
||
|  | ||
|
|
||
| ### Anthropic (Claude) | ||
|
|
||
|  | ||
|
|
||
| ### Google Gemini | ||
|
|
||
|  | ||
|
|
||
| > **Note**: Gemini 2.5 uses `thinking_budget` parameter (integer value), while Gemini 3+ uses `thinking_level` | ||
|
|
||
| ### Ollama | ||
|
|
||
|  | ||
|
|
||
| ## Parameter Selection Recommendations | ||
|
|
||
| | Task Type | Recommended Level | Description | | ||
| | ------------------------------------------------------------------------------ | ----------------- | ----------------------------------- | | ||
| | Simple Tasks (translation, classification, data extraction) | `low` | Fast response, low cost | | ||
| | Daily Development (code generation, content writing, debugging) | `medium` | Balance performance and cost | | ||
| | Complex Reasoning (mathematical proofs, scientific analysis, algorithm design) | `high` | Deep reasoning, high-quality output | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # 长期记忆 | ||
|
|
||
| Friday支持将记忆存储于本地数据库以实现长期记忆。 | ||
|
|
||
| ## 如何设置长期记忆 | ||
|
|
||
| 在设置界面点击启用长期记忆,填写Embedding模型以及向量数据库相关设置 | ||
|  | ||
|
|
||
| ## 数据库选择 | ||
|
|
||
| - 系统对Qdrant进行了默认配置,选择是否保存磁盘,填写记忆存储地址即可使用长期记忆。 | ||
| - 如需使用其他向量数据库存储记忆,请选择对应的数据库提供者,并填写相应参数进行使用。Friday基于mem0库实现长期记忆,可以于mem0库中的configs/vector_stores文件夹找到对应文件查看具体数据库所需参数。 | ||
|  |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # MCP 服务器管理 | ||
|
|
||
| Friday支持用户动态管理 MCP 服务器 | ||
|
|
||
| - 可以添加及删除 MCP 服务器 | ||
| - 可以随时开启和关闭指定 MCP 服务器 | ||
| - 支持远程和本地两种类型 MCP 服务器 | ||
|
|
||
| ## 添加 MCP 服务器 | ||
|
|
||
| 1.在Friday对话界面有边框点击MCP按钮打开MCP服务器管理界面 | ||
|  | ||
hongxicheng marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 2.写 MCP 服务器配置,点击保存即可 | ||
|  | ||
|
|
||
| ## 开启及关闭 MCP 服务器 | ||
|
|
||
| 在使用过程中,可以通过此开关开启及关闭指定 MCP 服务器 | ||
|  | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # 思考模式 | ||
|
|
||
| Friday 支持开启模型思考模式,并将模型思考内容进行展示。 | ||
|
|
||
|  | ||
|
|
||
| ## 如何开启思考模式 | ||
|
|
||
| 如果模型支持思考模式,Friday 通过在调用模型 API 时传入参数以开启模型思考模式。不同模型提供者所支持的参数如下: | ||
|
|
||
| | 模型提供者 | 参数名 | 可选值 | 说明 | | ||
| | ------------------------------- | ------------------ | --------------------------------------------------- | ---------------------------------- | | ||
| | **OpenAI** (o1/o3) | `reasoning_effort` | `low` / `medium` / `high` | 控制思考深度,默认 medium | | ||
| | **Anthropic** (Claude 3.7+) | `thinking` | `{"type": "enabled", "budget_tokens": 1024-128000}` | 扩展思考模式,需指定 token 预算 | | ||
| | **Gemini** (3.0+) | `thinking_config` | `{"thinking_level": "low/medium/high"}` | 控制思考级别,high 激活 Deep Think | | ||
| | **Ollama** (DeepSeek R1/Qwen 3) | `think` | `true` / `false` | 开启/关闭思考模式 | | ||
| | **DashScope** (通义千问) | `enable_thinking` | `true` / `false` | 仅支持流式输出 | | ||
|
|
||
| ## 配置示例 | ||
|
|
||
| 所有思考模式相关参数都通过 **`generate_kwargs`** 传递: | ||
|
|
||
| ### DashScope (阿里云) | ||
|
|
||
|  | ||
|
|
||
| > **注意**: 非流式调用时必须设置 `enable_thinking=False`,否则会报错 | ||
|
|
||
| ### OpenAI | ||
|
|
||
|  | ||
|
|
||
| ### Anthropic (Claude) | ||
|
|
||
|  | ||
|
|
||
| ### Google Gemini | ||
|
|
||
|  | ||
|
|
||
| > **注意**: Gemini 2.5 版本使用 `thinking_budget` 参数(整数值),Gemini 3+ 版本使用 `thinking_level` | ||
|
|
||
| ### Ollama | ||
|
|
||
|  | ||
|
|
||
| ## 参数选择建议 | ||
|
|
||
| | 任务类型 | 推荐等级 | 说明 | | ||
| | ---------------------------------------- | -------- | -------------------- | | ||
| | 简单任务(翻译、分类、数据提取) | `low` | 快速响应,低成本 | | ||
| | 日常开发(代码生成、内容写作、调试) | `medium` | 平衡性能与成本 | | ||
| | 复杂推理(数学证明、科学分析、算法设计) | `high` | 深度推理,高质量输出 | |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.