AbanteAI / spice

accelerant
Apache License 2.0
4 stars 2 forks source link

Refactor get_response to use RetryStrategy #88

Closed mentatai[bot] closed 4 months ago

mentatai[bot] commented 4 months ago

Replaced the existing validators and converters with a new retry_strategy argument in the get_response method. Introduced an abstract class RetryStrategy with a decide method to handle retry logic. Added a DefaultRetryStrategy to maintain backward compatibility with the current behavior. Updated tests to use the new retry_strategy argument. This change allows for more complex retry behaviors such as increasing temperature on failure, switching models, and self-correction.

Closes #87