📖 Docs: Update documentation
Browse files- README.md +6 -0
- README_CN.md +6 -0
- main.py +1 -1
README.md
CHANGED
@@ -332,6 +332,12 @@ If you would like to support our project, you can sponsor us in the following wa
|
|
332 |
|
333 |
Thank you for your support!
|
334 |
|
|
|
|
|
|
|
|
|
|
|
|
|
335 |
## ⭐ Star History
|
336 |
|
337 |
<a href="https://github.com/yym68686/uni-api/stargazers">
|
|
|
332 |
|
333 |
Thank you for your support!
|
334 |
|
335 |
+
## FAQ
|
336 |
+
|
337 |
+
- Why does the error `Error processing request or performing moral check: 404: No matching model found` always appear?
|
338 |
+
|
339 |
+
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.
|
340 |
+
|
341 |
## ⭐ Star History
|
342 |
|
343 |
<a href="https://github.com/yym68686/uni-api/stargazers">
|
README_CN.md
CHANGED
@@ -332,6 +332,12 @@ curl -X POST http://127.0.0.1:8000/v1/chat/completions \
|
|
332 |
|
333 |
感谢您的支持!
|
334 |
|
|
|
|
|
|
|
|
|
|
|
|
|
335 |
## ⭐ Star 历史
|
336 |
|
337 |
<a href="https://github.com/yym68686/uni-api/stargazers">
|
|
|
332 |
|
333 |
感谢您的支持!
|
334 |
|
335 |
+
## 常见问题
|
336 |
+
|
337 |
+
- 为什么总是出现 `Error processing request or performing moral check: 404: No matching model found` 错误?
|
338 |
+
|
339 |
+
将 ENABLE_MODERATION 设置为 false 将修复这个问题。当 ENABLE_MODERATION 为 true 时,API 必须能够使用 text-moderation-latest 模型,如果你没有在提供商模型设置里面提供 text-moderation-latest,将会报错找不到模型。
|
340 |
+
|
341 |
## ⭐ Star 历史
|
342 |
|
343 |
<a href="https://github.com/yym68686/uni-api/stargazers">
|
main.py
CHANGED
@@ -477,7 +477,7 @@ class StatsMiddleware(BaseHTTPMiddleware):
|
|
477 |
import traceback
|
478 |
traceback.print_exc()
|
479 |
|
480 |
-
logger.error(f"
|
481 |
|
482 |
try:
|
483 |
response = await call_next(request)
|
|
|
477 |
import traceback
|
478 |
traceback.print_exc()
|
479 |
|
480 |
+
logger.error(f"Error processing request or performing moral check: {str(e)}")
|
481 |
|
482 |
try:
|
483 |
response = await call_next(request)
|