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

fix cat.llm for wide-range compatibility #1022

Merged
merged 2 commits into from
Jan 27, 2025

Conversation

lucagobbi
Copy link
Collaborator

Description

Recently different providers like Ollama, Anthropic, Google Gemini released some models that are not working correctly with cat.llm() method. The problem is caused by the direct usage of SystemMessage without a HumanMessage. The quick fix is to use HumanMessage instead of the SystemMessage, even if it could bring some problems due to different tokenizers as discussed in the latest dev meeting 2025/01/27.

Please try this with different models and providers
I tried with:

  • Ollama llama3.2:3b
  • Gemini gemini-2.0-flash-exp
  • Anthropic claude-3-5-haiku-20241022
  • OpenAI gpt-4o-mini

Related to issue #999 #1006 #1011

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@pieroit pieroit merged commit 796c3e7 into cheshire-cat-ai:develop Jan 27, 2025
2 checks passed
@pieroit
Copy link
Member

pieroit commented Jan 27, 2025

Thanks @lucagobbi
It's a temp solution but the best one

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