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

Retry behavior configuration #80

Closed
ailectra opened this issue Feb 4, 2025 · 1 comment · Fixed by #86
Closed

Retry behavior configuration #80

ailectra opened this issue Feb 4, 2025 · 1 comment · Fixed by #86
Labels
good first issue Good for newcomers

Comments

@ailectra
Copy link

ailectra commented Feb 4, 2025

The BaseAgent class currently doesn't support retry functionality through the max_retries parameter that instructor provides. In the get_response and run_async methods, API calls to instructor don't pass any retry configuration:

# Current implementation in get_response
response = self.client.chat.completions.create(
    messages=messages,
    model=self.model,
    response_model=response_model,
    temperature=self.temperature,
    max_tokens=self.max_tokens,
)

Adding max_retries to the BaseAgentConfig would be a simple yet valuable improvement.

Also, maybe other instructor parameters should be added such as context or validation_context.

@KennyVaneetvelde KennyVaneetvelde added the good first issue Good for newcomers label Feb 8, 2025
@KennyVaneetvelde
Copy link
Member

This and #75 are related (in that the fix for both would be the same)

A good solution here would be to allow for extra kwargs to be passed

mbcrawfo pushed a commit to mbcrawfo/atomic-agents that referenced this issue Feb 10, 2025
mbcrawfo pushed a commit to mbcrawfo/atomic-agents that referenced this issue Feb 10, 2025
mbcrawfo pushed a commit to mbcrawfo/atomic-agents that referenced this issue Feb 10, 2025
mbcrawfo pushed a commit to mbcrawfo/atomic-agents that referenced this issue Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants