fix: telegram multiformat#89
Merged
Eugene Yurtsev (eyurtsev) merged 5 commits intolangchain-ai:mainfrom Jun 9, 2025
Merged
Conversation
Contributor
|
hi jerryyf could you add tests and relevant doc-strings to the implementation |
Contributor
Author
|
Eugene Yurtsev (@eyurtsev) added a couple tests for bold text and email formats - they are passing. Testing deleted accounts functionality will need a separate file under |
Eugene Yurtsev (eyurtsev)
approved these changes
Jun 5, 2025
fbcc859 to
16d36f2
Compare
Contributor
Author
|
sorry, forgot linting after last commit. CI should pass now Eugene Yurtsev (@eyurtsev) |
Johann-Peter Hartmann (johannhartmann)
pushed a commit
to mayflower/langchain-community
that referenced
this pull request
Jun 12, 2025
This PR adds: - support for messages that contain special objects such as links, phone, email, formatting. `message.content` can be in the form of a list which raises the error when checking for type string - support for chats with deleted accounts by adding the value "Deleted Account" if `from` field is empty. This is an issue when trying to call `map_ai_messages()` as it won't be able to determine the sender resulting in no `AIMessage` Reproducing the bug: 1. export a Telegram chat that contains links or other special formatting like bold text in JSON format 2. import and run the function `TelegramChatLoader()` - it will throw the error `Chat Loaders only support messages with content type string, got ...`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds:
message.contentcan be in the form of a list which raises the error when checking for type stringfromfield is empty. This is an issue when trying to callmap_ai_messages()as it won't be able to determine the sender resulting in noAIMessageReproducing the bug:
TelegramChatLoader()- it will throw the errorChat Loaders only support messages with content type string, got ...