Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Commit 123b78e

Browse files
Fix minor docs mistake (#35)
* Fix minor docs mistake * Add telemetry to docs
1 parent 48e091c commit 123b78e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

docs/python-sdk.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ refuel_client = refuel.init(**options)
164164

165165
items = refuel_client.get_items(
166166
dataset='<DATASET NAME>',
167-
max_items=100,
167+
max_items=20,
168168
offset=0
169169
)
170170
```
@@ -174,7 +174,7 @@ This function will return a pandas dataframe. Some details about the function pa
174174
| Option | Is Required | Default Value | Comments |
175175
| :------------ | :-----------| :-------------| :------- |
176176
| `dataset` | Yes | - | Name of the dataset you want to query and retrieve items (rows) from |
177-
| `max_items` | No | 100 | Max number of rows you want to fetch |
177+
| `max_items` | No | 20 | Max number of rows you want to fetch |
178178
| `offset` | No | 0 | If this is set to a positive number, say N, then the first N rows will be skipped and the API will return “max_items” number of rows after skipping the first N rows. |
179179

180180
#### Querying items, along with labels from a labeling task
@@ -523,6 +523,12 @@ If you would only like to get an explanation for certain fields, you can optiona
523523
response = refuel_client.label(application='my_sentiment_classifier', inputs=inputs, explain=True, explain_fields=['sentiment'])
524524
```
525525

526+
You can also set the optional `telemetry` parameter to `True` to get additional info such as the model, provider, and number of tokens used (prompt, output, and total) in the request. The telemetry data will be returned in the `usage` field in the response.
527+
528+
```python
529+
response = refuel_client.label(application='my_sentiment_classifier', inputs=inputs, telemetry=True)
530+
```
531+
526532

527533
### Share feedback for application outputs
528534

0 commit comments

Comments
 (0)