forked from phoenix/litellm-mirror
docs(argilla.md): add doc on argilla logging
This commit is contained in:
parent
87f256bec1
commit
4f5ff65882
3 changed files with 60 additions and 0 deletions
59
docs/my-website/docs/observability/argilla.md
Normal file
59
docs/my-website/docs/observability/argilla.md
Normal file
|
@ -0,0 +1,59 @@
|
|||
import Image from '@theme/IdealImage';
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Argilla
|
||||
|
||||
Argilla is a tool for annotating datasets.
|
||||
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
<Tabs>
|
||||
<Tab value="sdk" label="SDK">
|
||||
|
||||
```python
|
||||
from litellm import completion
|
||||
import litellm
|
||||
import os
|
||||
|
||||
# add env vars
|
||||
os.environ["ARGILLA_API_KEY"]="argilla.apikey"
|
||||
os.environ["ARGILLA_BASE_URL"]="http://localhost:6900"
|
||||
os.environ["ARGILLA_DATASET_NAME"]="my_second_dataset"
|
||||
os.environ["OPENAI_API_KEY"]="sk-proj-..."
|
||||
|
||||
litellm.callbacks = ["argilla"]
|
||||
|
||||
# add argilla transformation object
|
||||
litellm.argilla_transformation_object = {
|
||||
"user_input": "messages", # 👈 key= argilla field, value = either message (argilla.ChatField) | response (argilla.TextField)
|
||||
"llm_output": "response"
|
||||
}
|
||||
|
||||
## LLM CALL ##
|
||||
response = completion(
|
||||
model="gpt-3.5-turbo",
|
||||
messages=[{"role": "user", "content": "Hello, how are you?"}],
|
||||
)
|
||||
```
|
||||
|
||||
</Tab>
|
||||
|
||||
<Tab value="proxy" label="PROXY">
|
||||
|
||||
```yaml
|
||||
litellm_settings:
|
||||
callbacks: ["argilla"]
|
||||
argilla_transformation_object:
|
||||
user_input: "messages" # 👈 key= argilla field, value = either message (argilla.ChatField) | response (argilla.TextField)
|
||||
llm_output: "response"
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Example Output
|
||||
|
||||
<Image img={require('../../img/argilla.png')} />
|
BIN
docs/my-website/img/argilla.png
Normal file
BIN
docs/my-website/img/argilla.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 377 KiB |
|
@ -277,6 +277,7 @@ const sidebars = {
|
|||
"observability/literalai_integration",
|
||||
"observability/opentelemetry_integration",
|
||||
"observability/logfire_integration",
|
||||
"observability/argilla",
|
||||
"observability/arize_integration",
|
||||
"debugging/local_debugging",
|
||||
"observability/raw_request_response",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue