Skip to content

Commit

Permalink
📖 Docs: Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
yym68686 committed Nov 4, 2024
1 parent fc33867 commit ec66323
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,12 @@ If you would like to support our project, you can sponsor us in the following wa

Thank you for your support!

## FAQ

- Why does the error `Error processing request or performing moral check: 404: No matching model found` always appear?

Setting ENABLE_MODERATION to false will fix this issue. When ENABLE_MODERATION is true, the API must be able to use the text-moderation-latest model, and if you have not provided text-moderation-latest in the provider model settings, an error will occur indicating that the model cannot be found.

## ⭐ Star History

<a href="https://github.com/yym68686/uni-api/stargazers">
Expand Down
6 changes: 6 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,12 @@ curl -X POST http://127.0.0.1:8000/v1/chat/completions \

感谢您的支持!

## 常见问题

- 为什么总是出现 `Error processing request or performing moral check: 404: No matching model found` 错误?

将 ENABLE_MODERATION 设置为 false 将修复这个问题。当 ENABLE_MODERATION 为 true 时,API 必须能够使用 text-moderation-latest 模型,如果你没有在提供商模型设置里面提供 text-moderation-latest,将会报错找不到模型。

## ⭐ Star 历史

<a href="https://github.com/yym68686/uni-api/stargazers">
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ async def dispatch(self, request: Request, call_next):
import traceback
traceback.print_exc()

logger.error(f"处理请求或进行道德检查时出错: {str(e)}")
logger.error(f"Error processing request or performing moral check: {str(e)}")

try:
response = await call_next(request)
Expand Down

0 comments on commit ec66323

Please sign in to comment.