Skip to content

Commit

Permalink
Merge pull request #883 from yi-ge/dev-main
Browse files Browse the repository at this point in the history
docs: 更新README.md,添加长回复使用方法
  • Loading branch information
yi-ge authored Mar 25, 2023
2 parents fb8ad37 + 639152f commit 365a7df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,10 @@ Q: Why doesn't the frontend have a typewriter effect?

A: One possible reason is that after Nginx reverse proxying, buffering is turned on, and Nginx will try to buffer a certain amount of data from the backend before sending it to the browser. Please try adding `proxy_buffering off;` after the reverse proxy parameter and then reloading Nginx. Other web server configurations are similar.

Q: The content returned is incomplete?

A: There is a length limit for the content returned by the API each time. You can modify the `VITE_GLOB_OPEN_LONG_REPLY` field in the `.env` file under the root directory, set it to `true`, and rebuild the front-end to enable the long reply feature, which can return the full content. It should be noted that using this feature may bring more API usage fees.

## Contributing

Please read the [Contributing Guidelines](./CONTRIBUTING.en.md) before contributing.
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,10 @@ Q: 前端没有打字机效果?

A: 一种可能原因是经过 Nginx 反向代理,开启了 buffer,则 Nginx 会尝试从后端缓冲一定大小的数据再发送给浏览器。请尝试在反代参数后添加 `proxy_buffering off;`,然后重载 Nginx。其他 web server 配置同理。

Q: 内容返回不完整?

A: 接口每次返回的内容是有长度限制的,可以修改根目录下`.env`文件中的`VITE_GLOB_OPEN_LONG_REPLY`字段,将其设置为`true`,重新编译前端即可开启长回复功能,即可返回全部的内容。需要注意的是,使用此功能可能带来较多的API使用费用。

## 参与贡献

贡献之前请先阅读 [贡献指南](./CONTRIBUTING.md)
Expand Down

0 comments on commit 365a7df

Please sign in to comment.