Skip to content

Commit

Permalink
Update migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
collindutter committed Aug 26, 2024
1 parent 6cfaeea commit 2397ba8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
5 changes: 1 addition & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `BaseConversationMemory.prompt_driver` for use with autopruning.
- Parameter `meta: dict` on `BaseEvent`.

### Changed
- **BREAKING**: Drivers, Loaders, and Engines will now raises exceptions rather than returning `ErrorArtifact`s.

### Fixed
- Parsing streaming response with some OpenAi compatible services.

**Note**: This release includes breaking changes. Please refer to the [Migration Guide](MIGRATION.md#0.31.0) for details.
**Note**: This release includes breaking changes. Please refer to the [Migration Guide](./MIGRATION.md#030x-to-031x) for details.

## [0.30.1] - 2024-08-21

Expand Down
21 changes: 20 additions & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,23 @@

This document provides instructions for migrating your codebase to accommodate breaking changes introduced in new versions of Griptape.

## 0.30.X -> 0.31.X
## 0.30.X to 0.31.X

### Exceptions Over `ErrorArtifact`s

Drivers, Loaders, and Engines will now raises exceptions rather than returning `ErrorArtifact`s.
Update any logic that expects `ErrorArtifact` to handle exceptions instead.

```python
# Before
artifacts = WebLoader().load("https://www.griptape.ai")

if isinstance(artifacts, ErrorArtifact):
raise Exception(artifacts.value)

# After
try:
artifacts = WebLoader().load("https://www.griptape.ai")
except Exception as e:
raise e
```

0 comments on commit 2397ba8

Please sign in to comment.