Files
chatgpt-on-wechat/docs/tools/read.mdx
2026-02-27 16:03:47 +08:00

27 lines
629 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: read - 文件读取
description: 读取文件内容
---
# read
读取文件内容。支持文本文件、PDF 文件、图片(返回元数据)等格式。
## 依赖
无额外依赖,默认可用。
## 参数
| 参数 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| `path` | string | 是 | 文件路径,相对路径基于工作空间目录 |
| `offset` | integer | 否 | 起始行号1-indexed负值表示从末尾读取 |
| `limit` | integer | 否 | 读取行数 |
## 使用场景
- 查看配置文件、日志文件
- 读取代码文件进行分析
- 检查图片/视频的文件信息