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

[Ellipsis] fix: handle file size limits and encoding in _content_files_list #189

Conversation

ellipsis-dev[bot]
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot commented Oct 9, 2024

This change addresses review comments left by @ErikBjare on PR #188: fix: limit image size, fixes exception when viewing large images (#185)

⚠️ We couldn't build/test your project to verify our changes. Add a Dockerfile to significantly improve code quality.

Summary:

Enhances _content_files_list in message.py to handle file size limits and improve base64 encoding efficiency for OpenAI and Anthropic providers.

Key points:

  • Behavior:
    • Raises ValueError in _content_files_list if neither openai nor anthropic is true.
    • Checks file size in _content_files_list, appending a warning message if file exceeds 5MB.
    • Uses data variable for base64 encoding in _content_files_list to avoid redundant encoding.
  • Misc:
    • Minor refactoring in _content_files_list to improve readability and efficiency.

You can configure Ellipsis to address comments with a direct commit or a side PR, see docs.


Something look wrong? If this Pull Request doesn't address the comments left on the above pull request, create a new PR review with more details. For more information, check the documentation.

Generated with ❤️ by ellipsis.dev

…ixes exception when viewing large images (#185));
@ellipsis-dev ellipsis-dev bot requested a review from ErikBjare October 9, 2024 19:54
@ErikBjare ErikBjare closed this Oct 10, 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.

1 participant