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

Introduce strategic_token_limit to fix Anthropic bug #1032

Merged
merged 2 commits into from
Dec 21, 2024

Conversation

winsonluk
Copy link
Contributor

Fix for #1022

New config variable smart_token_limit defaults to 4000 to fix ValidationError thrown by ChatAnthropic when max_tokens=none, replacing it with max_tokens=4000.

@winsonluk winsonluk changed the title Strategic limit Introduce strategic_token_limit to fix Anthropic bug Dec 20, 2024
@winsonluk
Copy link
Contributor Author

@assafelovic here's the follow-up PR to #1022

INFO:     [07:18:11] 🤔 Planning the research strategy and subtasks (this may take a minute)...
Error with strategic LLM: 1 validation error for ChatAnthropic
max_tokens
  Input should be a valid integer [type=int_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.9/v/int_type. Retrying with max_tokens=4000.
See https://github.com/assafelovic/gpt-researcher/issues/1022
Retrying with max_tokens=4000 successful.

@assafelovic assafelovic merged commit d37418a into assafelovic:master Dec 21, 2024
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.

2 participants