Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vedpatwardhan committed Sep 18, 2024
1 parent 1c51f92 commit 99ac6d2
Show file tree
Hide file tree
Showing 14 changed files with 99 additions and 13 deletions.
2 changes: 1 addition & 1 deletion python/casting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ Cast the input to the specified type.

The input after casting to the new type.

<a id="utils"></a>
<a id="dataset"></a>
1 change: 0 additions & 1 deletion python/chat/chatbot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,3 @@ Starts the chat interaction loop.
- `show_credits` - Whether to show credit consumption. Defaults to False.
- `show_endpoint` - Whether to show the endpoint used. Defaults to False.

<a id="chat.clients.uni_llm"></a>
4 changes: 3 additions & 1 deletion python/chat/clients/base.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,8 @@ def generate(user_message: Optional[str] = None,
**kwargs)
```

Generate content using the Unify API.
Generate a ChatCompletion response for the specified endpoint,
from the provided query parameters.

**Arguments**:

Expand Down Expand Up @@ -1253,3 +1254,4 @@ Get the remaining credits left on your account.
- `BadRequestError` - If there was an HTTP error.
- `ValueError` - If there was an error parsing the JSON response.

<a id="chat.clients.multi_llm"></a>
85 changes: 85 additions & 0 deletions python/chat/clients/multi_llm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,56 @@ title: 'clients.multi_llm'
class _MultiLLMClient(_Client, abc.ABC)
```

<a id="chat.clients.multi_llm._MultiLLMClient.add_endpoints"></a>

---

### add\_endpoints

```python
def add_endpoints(endpoints: Union[List[str], str],
ignore_duplicates: bool = True) -> Self
```

Add extra endpoints to be queried for each call to generate.

**Arguments**:

- `endpoints` - The extra endpoints to add.

- `ignore_duplicates` - Whether or not to ignore duplicate endpoints passed.


**Returns**:

This client, useful for chaining inplace calls.

<a id="chat.clients.multi_llm._MultiLLMClient.remove_endpoints"></a>

---

### remove\_endpoints

```python
def remove_endpoints(endpoints: Union[List[str], str],
ignore_missing: bool = True) -> Self
```

Remove endpoints from the current list, which are queried for each call to
generate.

**Arguments**:

- `endpoints` - The extra endpoints to add.

- `ignore_missing` - Whether or not to ignore endpoints passed which are not
currently present in the client endpoint list.


**Returns**:

This client, useful for chaining inplace calls.

<a id="chat.clients.multi_llm._MultiLLMClient.get_credit_balance"></a>

---
Expand All @@ -31,4 +81,39 @@ Get the remaining credits left on your account.
- `BadRequestError` - If there was an HTTP error.
- `ValueError` - If there was an error parsing the JSON response.

<a id="chat.clients.multi_llm._MultiLLMClient.endpoints"></a>

---

### endpoints

```python
@property
def endpoints() -> Tuple[str, ...]
```

Get the current tuple of endpoints.

**Returns**:

The tuple of endpoints.

<a id="chat.clients.multi_llm._MultiLLMClient.clients"></a>

---

### clients

```python
@property
def clients() -> Dict[str, _UniLLMClient]
```

Get the current dictionary of clients, with endpoint names as keys and
Unify or AsyncUnify instances as values.

**Returns**:

The dictionary of clients.

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

<a id="chat.clients.multi_llm"></a>
<a id="chat.chatbot"></a>
2 changes: 1 addition & 1 deletion python/evaluator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ Evaluate the given response for this input prompt, with optional extra data.
An Evaluation instance, containing the prompt, response, agent, score and
optional extra data used during the evaluation.

<a id="casting"></a>
<a id="evaluation"></a>
2 changes: 1 addition & 1 deletion python/logging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ Wrap a local model callable with logging of the queries.

- `requests.HTTPError` - If the API request fails.

<a id="evaluation"></a>
<a id="casting"></a>
2 changes: 1 addition & 1 deletion python/types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ Create Score instance.

The pydantic Score instance, with associated value and class description

<a id="evaluator"></a>
<a id="__init__"></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.datasets"></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.default_prompts"></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.helpers"></a>
2 changes: 1 addition & 1 deletion python/utils/evaluations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ Delete evaluations for a specific dataset, optionally filtered by endpoint and e

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

<a id="utils.helpers"></a>
<a id="utils.custom_api_keys"></a>
2 changes: 1 addition & 1 deletion python/utils/logging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,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.custom_endpoints"></a>

0 comments on commit 99ac6d2

Please sign in to comment.