Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vedpatwardhan committed Sep 4, 2024
1 parent 9f99faa commit 3cd4a15
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 24 deletions.
17 changes: 5 additions & 12 deletions python/dataset.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ class Dataset()
### \_\_init\_\_

```python
def __init__(queries: List[Union[str, ChatCompletion]] = None,
extra_fields: Dict[str, List[Any]] = None,
data: List[Dict[str, Union[ChatCompletion, Any]]] = None,
def __init__(data: Union[str, List[str, Query, DatasetEntry]],
*,
name: str = None,
auto_sync: bool = False,
api_key: Optional[str] = None)
Expand All @@ -29,15 +28,9 @@ Initialize a local dataset of LLM queries.

**Arguments**:

- `queries` - List of LLM queries to initialize the dataset with.

- `extra_fields` - Dictionary of lists for arbitrary extra fields contained
within the dataset.

- `data` - If neither `queries` nor `extra_fields` are specified, then this can
be specified instead, which is simply a list of dicts with each first key as
"query" and all other keys otherwise coming from the `extra_fields`. This is
the internal representation used by the class.
- `data` - The data for populating the dataset. This can either can a string
specifying an upstream dataset, a list of user prompts, a list of full
queries, or a list of dicts of queries alongside any extra fields.

- `name` - The name of the dataset.

Expand Down
2 changes: 1 addition & 1 deletion python/evaluation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -265,4 +265,4 @@ from the other subtracted dataset.

- `other` - The other dataset being added to this one.

<a id="__init__"></a>
<a id="evaluator"></a>
2 changes: 1 addition & 1 deletion python/exceptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ class InternalServerError(UnifyError)

Exception raised for HTTP 500 Internal Server Error errors.

<a id="evaluator"></a>
<a id="_caching"></a>
1 change: 1 addition & 0 deletions python/queries/chat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,4 @@ Starts the chat interaction loop.
- `show_credits` - Whether to show credit consumption. Defaults to False.
- `show_provider` - Whether to show the provider used. Defaults to False.

<a id="queries.multi_llm"></a>
2 changes: 1 addition & 1 deletion python/queries/clients.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1250,4 +1250,4 @@ class AsyncUnify(Client)
Class for interacting with the Unify chat completions endpoint in a synchronous
manner.

<a id="queries.multi_llm"></a>
<a id="queries.chat"></a>
1 change: 0 additions & 1 deletion python/queries/multi_llm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,3 @@ Generate content using the Unify API.

- `UnifyError` - If an error occurs during content generation.

<a id="queries.chat"></a>
2 changes: 1 addition & 1 deletion python/utils/credits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Returns the credits remaining in the user account, in USD.

- `ValueError` - If there was an HTTP error.

<a id="utils.efficiency_benchmarks"></a>
<a id="utils.router_training"></a>
2 changes: 1 addition & 1 deletion python/utils/custom_api_keys.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ Get a list of custom API keys associated with the user's account.
A list of dictionaries containing custom API key information.
Each dictionary has 'name' and 'value' keys.

<a id="utils.evaluators"></a>
<a id="utils.helpers"></a>
2 changes: 1 addition & 1 deletion python/utils/custom_endpoints.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ Get a list of custom endpoints for the authenticated user.

- `requests.exceptions.RequestException` - If the API request fails.

<a id="utils.supported_endpoints"></a>
<a id="utils.evaluators"></a>
2 changes: 1 addition & 1 deletion python/utils/datasets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,4 @@ Fetches a list of all uploaded datasets.

- `ValueError` - If there was an HTTP error.

<a id="utils.logging"></a>
<a id="utils.supported_endpoints"></a>
2 changes: 1 addition & 1 deletion python/utils/evaluations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,4 @@ Get the evaluation status for a specific dataset, endpoint, and evaluator.

A dictionary containing the evaluation status information.

<a id="utils.helpers"></a>
<a id="utils.custom_api_keys"></a>
2 changes: 1 addition & 1 deletion python/utils/evaluators.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,4 @@ Get a list of available evaluators.

A list of available evaluator names if successful, otherwise an empty list.

<a id="utils.router_training"></a>
<a id="queries"></a>
2 changes: 1 addition & 1 deletion python/utils/logging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ Get query metrics for specified parameters.

A dictionary containing the query metrics.

<a id="utils.custom_api_keys"></a>
<a id="utils.router_deployment"></a>
2 changes: 1 addition & 1 deletion python/utils/supported_endpoints.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ provider.
- `BadRequestError` - If there was an HTTP error.
- `ValueError` - If there was an error parsing the JSON response.

<a id="utils.router_deployment"></a>
<a id="utils.efficiency_benchmarks"></a>

0 comments on commit 3cd4a15

Please sign in to comment.