Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional exception attribute to ErrorArtifact #747

Conversation

michal-repo
Copy link
Contributor

@michal-repo michal-repo commented Apr 16, 2024

As discussed on discord channel back in March (handling content management policy error), adding optional exception attribute to ErrorArtifact.
This will allow to check Exception instance against eg. OpenAI exceptions to handle it properly in your application.

Copy link
Member

@collindutter collindutter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic, thank you for the PR! Could you also please add here?

@michal-repo
Copy link
Contributor Author

Sure thing, added.

@collindutter
Copy link
Member

Ah could you also add a section in CHANGELOG.md Added section?

Something like:

- Optional `exception` field to `ErrorArtifact`.

collindutter
collindutter previously approved these changes Apr 17, 2024
Copy link
Member

@collindutter collindutter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you just need to merge the latest base branch changes into your branch. Then we're good!

CHANGELOG.md Outdated
@@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `output_task_input` and `output_task_output` fields to `FinishStructureRunEvent`.
- `AmazonS3FileManagerDriver` for managing files on Amazon S3.
- `MediaArtifact` as a base class for `ImageArtifact` and future media Artifacts.
- Added optional `exception` field to `ErrorArtifact`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hyper nit: Added is not needed here. The other bullet points read with an implicit Added through the section header.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@collindutter collindutter merged commit e16f729 into griptape-ai:dev Apr 17, 2024
7 checks passed
@michal-repo michal-repo deleted the add-exception-attribute-to-ErrorArtifact branch April 17, 2024 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants