Skip to content

Commit

Permalink
refactor(core): update image-only message handling
Browse files Browse the repository at this point in the history
- Change the content of image-only messages from 'what is this?' to '[image]'
- This provides a more informative and consistent user experience
  • Loading branch information
dingyi222666 committed Nov 26, 2024
1 parent 7e7d612 commit a29e495
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/middlewares/read_chat_message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function apply(ctx: Context, config: Config, chain: ChatChain) {
message.additional_kwargs.images = images

if (message.content?.length < 1) {
message.content = 'what is this?'
message.content = '[image]'
}
}
)
Expand Down

0 comments on commit a29e495

Please sign in to comment.