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: Update Title Message Role for Ollama if None Provided #3663

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

danny-avila
Copy link
Owner

@danny-avila danny-avila commented Aug 16, 2024

Summary

Closes #3510

Addresses issue with llama3.1 not generating titles due to system message role

  • Modified the OpenAIClient.js file to update the role property in the instructionsPayload.
  • Implemented a conditional check to set the role to 'user' if isOllama is true and titleMessageRole is not explicitly passed.
  • Maintained the default 'system' role for non-Ollama models to ensure backward compatibility.
  • This fix resolves the issue where llama3.1 was not generating titles due to not being able to handle system messages as the only message in the payload

Testing

To test this change:

  1. Set up an Ollama endpoint in LibreChat.
  2. Initiate a conversation using the llama3.1 model.
  3. Verify that the conversation title is generated correctly.

Additionally, ensure that title generation still works as expected for non-Ollama models.

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • My changes do not introduce new warnings
  • I have tested my changes to ensure they resolve the issue with llama3.1 title generation
  • Local unit tests pass with my changes

…leMessageRole` is not passed, resolves llama3.1 not generating title
@danny-avila danny-avila merged commit f8a5dad into main Aug 16, 2024
2 checks passed
@danny-avila danny-avila deleted the fix/ollama-title-llama3.1 branch August 16, 2024 08:54
kenshinsamue pushed a commit to intelequia/LibreChat that referenced this pull request Sep 17, 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.

[Bug]: Title Generation does not work with llama3.1
1 participant