-
Notifications
You must be signed in to change notification settings - Fork 14.1k
fix: Update prompt message content types to use Literal and add union type for content #17136
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 prompt message content types to use Literal and add union type for content #17136
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
api/core/model_runtime/entities/message_entities.py:63
- [nitpick] The base class 'PromptMessageContent' is now empty after removing the original type field. Consider adding a brief comment explaining that this is intentional to support polymorphic behavior via the 'type' field defined in the subclasses.
pass
api/core/model_runtime/entities/message_entities.py:115
- [nitpick] Consider renaming 'PromptMessageContentUnionTypes' to 'PromptMessageContentUnion' for brevity and improved clarity.
PromptMessageContentUnionTypes = Annotated[
7123413
to
a23b9cf
Compare
Hello, I rebased the code to the latest branch, could you fix the errors in the CI? |
565f2ec
to
92a7d43
Compare
@crazywoola done for this |
0d57515
to
81b8878
Compare
Hello still have the same errors. |
try again |
Summary
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Tip
Close issue syntax:
Fixes #<issue number>
orResolves #<issue number>
, see documentation for more details.Fixes #15858
Screenshots
Checklist
Important
Please review the checklist below before submitting your pull request.
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint gods