forked from phoenix/litellm-mirror
docs: update the docs (#6923)
This commit is contained in:
parent
21156ff5d0
commit
8af5b11f54
1 changed files with 44 additions and 5 deletions
|
@ -4,24 +4,63 @@ import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
# Argilla
|
# Argilla
|
||||||
|
|
||||||
Argilla is a tool for annotating datasets.
|
Argilla is a collaborative annotation tool for AI engineers and domain experts who need to build high-quality datasets for their projects.
|
||||||
|
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
## Usage
|
To log the data to Argilla, first you need to deploy the Argilla server. If you have not deployed the Argilla server, please follow the instructions [here](https://docs.argilla.io/latest/getting_started/quickstart/).
|
||||||
|
|
||||||
|
Next, you will need to configure and create the Argilla dataset.
|
||||||
|
|
||||||
|
```python
|
||||||
|
import argilla as rg
|
||||||
|
|
||||||
|
client = rg.Argilla(api_url="<api_url>", api_key="<api_key>")
|
||||||
|
|
||||||
|
settings = rg.Settings(
|
||||||
|
guidelines="These are some guidelines.",
|
||||||
|
fields=[
|
||||||
|
rg.ChatField(
|
||||||
|
name="user_input",
|
||||||
|
),
|
||||||
|
rg.TextField(
|
||||||
|
name="llm_output",
|
||||||
|
),
|
||||||
|
],
|
||||||
|
questions=[
|
||||||
|
rg.RatingQuestion(
|
||||||
|
name="rating",
|
||||||
|
values=[1, 2, 3, 4, 5, 6, 7],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
dataset = rg.Dataset(
|
||||||
|
name="my_first_dataset",
|
||||||
|
settings=settings,
|
||||||
|
)
|
||||||
|
|
||||||
|
dataset.create()
|
||||||
|
```
|
||||||
|
|
||||||
|
For further configuration, please refer to the [Argilla documentation](https://docs.argilla.io/latest/how_to_guides/dataset/).
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
<Tabs>
|
<Tabs>
|
||||||
<Tab value="sdk" label="SDK">
|
<Tab value="sdk" label="SDK">
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from litellm import completion
|
import os
|
||||||
import litellm
|
import litellm
|
||||||
import os
|
from litellm import completion
|
||||||
|
|
||||||
# add env vars
|
# add env vars
|
||||||
os.environ["ARGILLA_API_KEY"]="argilla.apikey"
|
os.environ["ARGILLA_API_KEY"]="argilla.apikey"
|
||||||
os.environ["ARGILLA_BASE_URL"]="http://localhost:6900"
|
os.environ["ARGILLA_BASE_URL"]="http://localhost:6900"
|
||||||
os.environ["ARGILLA_DATASET_NAME"]="my_second_dataset"
|
os.environ["ARGILLA_DATASET_NAME"]="my_first_dataset"
|
||||||
os.environ["OPENAI_API_KEY"]="sk-proj-..."
|
os.environ["OPENAI_API_KEY"]="sk-proj-..."
|
||||||
|
|
||||||
litellm.callbacks = ["argilla"]
|
litellm.callbacks = ["argilla"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue