forked from phoenix/litellm-mirror
(docs) add moderations endpoint to docs
This commit is contained in:
parent
f1dc656491
commit
573515ec3d
1 changed files with 11 additions and 0 deletions
|
@ -2814,6 +2814,17 @@ async def moderations(
|
||||||
request: Request,
|
request: Request,
|
||||||
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
|
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
|
||||||
):
|
):
|
||||||
|
"""
|
||||||
|
The moderations endpoint is a tool you can use to check whether content complies with an LLM Providers policies.
|
||||||
|
|
||||||
|
Quick Start
|
||||||
|
```
|
||||||
|
curl --location 'http://0.0.0.0:4000/moderations' \
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
--header 'Authorization: Bearer sk-1234' \
|
||||||
|
--data '{"input": "Sample text goes here", "model": "text-moderation-stable"}'
|
||||||
|
```
|
||||||
|
"""
|
||||||
global proxy_logging_obj
|
global proxy_logging_obj
|
||||||
try:
|
try:
|
||||||
# Use orjson to parse JSON data, orjson speeds up requests significantly
|
# Use orjson to parse JSON data, orjson speeds up requests significantly
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue