Skip to content

Conversation

@zzstoatzz
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings July 17, 2025 19:00
@zzstoatzz zzstoatzz merged commit 577b55d into main Jul 17, 2025
3 checks passed
@zzstoatzz zzstoatzz deleted the retry-example branch July 17, 2025 19:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new example demonstrating how to handle retries for Marvin tasks with Pydantic output models. The example shows how tasks can learn from validation errors and automatically retry with improved responses.

  • Introduces a Pydantic model with custom validation that initially fails to teach retry behavior
  • Demonstrates configuration of retry limits and thread usage for maintaining conversation history
  • Shows practical application of task retry functionality with structured output validation


code: str = Field(description="The special code")

@field_validator("code")
Copy link

Copilot AI Jul 17, 2025

Choose a reason for hiding this comment

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

The field validator is missing a classmethod decorator. It should be @classmethod to properly define a class method that receives cls as the first parameter.

Suggested change
@field_validator("code")
@field_validator("code")
@classmethod

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants