Skip to content

Conversation

P1nk-L0rD
Copy link

The Replicate API sometimes returns a "status": "aborted" value for predictions that were interrupted before completion. The current pydantic model does not include this status, which causes a ValidationError:

pydantic.v1.error_wrappers.ValidationError:
unexpected value; permitted: 'starting', 'processing', 'succeeded', 'failed', 'canceled' (type=value_error.const; given=aborted; permitted=('starting', 'processing', 'succeeded', 'failed', 'canceled'))

This commit updates the Prediction.status Literal to include "aborted" to match the current API behavior.

The Replicate API sometimes returns a "status": "aborted" value for predictions
that were interrupted before completion. The current pydantic model does not
include this status, which causes a ValidationError:

    pydantic.v1.error_wrappers.ValidationError:
    unexpected value; permitted: 'starting', 'processing', 'succeeded', 'failed', 'canceled'

This commit updates the `Prediction.status` Literal to include "aborted"
to match the current API behavior.
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.

1 participant