Skip to content

Commit

Permalink
Removes foreign methods from readme, updates it + toml for release
Browse files Browse the repository at this point in the history
  • Loading branch information
norman-codes committed Sep 30, 2024
1 parent 2572405 commit 02ed0df
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
<br>
</div>

## Migration Guide for Version 0.7.0

We've released version `0.7.0` of the SDK with significant architectural changes. This update introduces `AsyncHumeClient` and `HumeClient`, improves type safety and async support, and provides more granular configuration options. To help you transition, we've prepared a comprehensive migration guide:

**[View the Migration Guide](https://github.com/HumeAI/hume-python-sdk/wiki/Python-SDK-Migration-Guide)**

Please review this guide before updating, as it covers breaking changes and provides examples for updating your code. Legacy functionality is preserved for backward compatibility. If you have any questions, please open an issue or contact our support team.

## Documentation

API reference documentation is available [here](https://dev.hume.ai/reference/).
Expand Down Expand Up @@ -112,10 +120,10 @@ client.emapthic_voice. # APIs specific to Empathic Voice
All errors thrown by the SDK will be subclasses of [`ApiError`](./src/hume/core/api_error.py).

```python
import hume
import hume.client

try:
client.text_gen.create_chat_completion(...)
client.expression_measurement.batch.get_job_predictions(...)
except hume.core.ApiError as e: # Handle all errors
print(e.status_code)
print(e.body)
Expand Down Expand Up @@ -192,13 +200,14 @@ Use the `max_retries` request option to configure this behavior.

```python
from hume.client import HumeClient
from hume.core import RequestOptions

client = HumeClient(...)

# Override retries for a specific method
client.text_gen.create_chat_completion(..., {
max_retries=5
})
client.expression_measurement.batch.get_job_predictions(...,
request_options=RequestOptions(max_retries=5)
)
```

#### Timeouts
Expand All @@ -208,16 +217,17 @@ timeout option at the client or request level.

```python
from hume.client import HumeClient
from hume.core import RequestOptions

client = HumeClient(
# All timeouts are 20 seconds
timeout=20.0,
)

# Override timeout for a specific method
client.text_gen.create_chat_completion(..., {
timeout_in_seconds=20.0
})
client.expression_measurement.batch.get_job_predictions(...,
request_options=RequestOptions(timeout_in_seconds=20)
)
```

#### Custom HTTP client
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "hume"
version = "0.6.1"
version = "0.7.0"
description = "A Python SDK for Hume AI"
readme = "README.md"
authors = []
Expand Down

0 comments on commit 02ed0df

Please sign in to comment.