mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
docs add moderation
This commit is contained in:
parent
744316cdbd
commit
122a457533
3 changed files with 20 additions and 13 deletions
10
docs/my-website/docs/embedding/moderation.md
Normal file
10
docs/my-website/docs/embedding/moderation.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# Moderation
|
||||||
|
LiteLLM supports the moderation endpoint for OpenAI
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
```python
|
||||||
|
import os
|
||||||
|
from litellm import moderation
|
||||||
|
os.environ['OPENAI_API_KEY'] = ""
|
||||||
|
response = moderation(input="i'm ishaan cto of litellm")
|
||||||
|
```
|
|
@ -1,5 +1,13 @@
|
||||||
# Embedding Models
|
# Embedding Models
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
```python
|
||||||
|
from litellm import embedding
|
||||||
|
import os
|
||||||
|
os.environ['OPENAI_API_KEY'] = ""
|
||||||
|
response = embedding('text-embedding-ada-002', input=["good morning from litellm"])
|
||||||
|
```
|
||||||
|
|
||||||
## OpenAI Embedding Models
|
## OpenAI Embedding Models
|
||||||
|
|
||||||
| Model Name | Function Call | Required OS Variables |
|
| Model Name | Function Call | Required OS Variables |
|
||||||
|
@ -10,15 +18,4 @@
|
||||||
|
|
||||||
| Model Name | Function Call | Required OS Variables |
|
| Model Name | Function Call | Required OS Variables |
|
||||||
|----------------------|---------------------------------------------|--------------------------------------|
|
|----------------------|---------------------------------------------|--------------------------------------|
|
||||||
| text-embedding-ada-002 | `embedding('embedding-model-deployment', input=input, custom_llm_provider="azure")` | `os.environ['AZURE_API_KEY']`,`os.environ['AZURE_API_BASE']`,`os.environ['AZURE_API_VERSION']` |
|
| text-embedding-ada-002 | `embedding('embedding-model-deployment', input=input, custom_llm_provider="azure")` | `os.environ['AZURE_API_KEY']`,`os.environ['AZURE_API_BASE']`,`os.environ['AZURE_API_VERSION']` |
|
||||||
|
|
||||||
# Moderation
|
|
||||||
LiteLLM supports the moderation endpoint for OpenAI
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
```python
|
|
||||||
import os
|
|
||||||
from litellm import moderation
|
|
||||||
os.environ['OPENAI_API_KEY'] = ""
|
|
||||||
response = moderation(input="i'm ishaan cto of litellm")
|
|
||||||
```
|
|
|
@ -42,7 +42,7 @@ const sidebars = {
|
||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
label: "Embedding() & Moderation()",
|
label: "Embedding() & Moderation()",
|
||||||
items: ["embedding/supported_embedding"],
|
items: ["embedding/supported_embedding", "embedding/moderation"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue