Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversToolsAgents and toolkitsMemoryCallbacksChat loadersDiscordFacebook MessengerGMailiMessageFine-Tuning on LangSmith Chat DatasetsFine-Tuning on LangSmith LLM RunsSlacktelegramTwitter (via Apify)WeChatWhatsAppComponentsChat loaderstelegramOn this pagetelegramTelegramThis notebook shows how to use the Telegram chat loader. This class helps map exported Telegram conversations to LangChain chat messages.The process has three steps:Export  the chat .txt file by copying chats from the Discord app and pasting them in a file on your local computerCreate the TelegramChatLoader with the file path pointed to the json file or directory of JSON filesCall loader.load() (or loader.lazy_load()) to perform the conversion. Optionally use merge_chat_runs to combine message from the same sender in sequence, and/or map_ai_messages to convert messages from the specified sender to the "AIMessage" class.1. Create message dump‚ÄãCurrently (2023/08/23) this loader best supports json files in the format generated by exporting your chat history from the Telegram Desktop App.Important: There are 'lite' versions of telegram such as "Telegram for MacOS" that lack the export functionality. Please make sure you use the correct app to export the file.To make the export:Download and open telegram desktopSelect a conversationNavigate to the conversation settings (currently the three dots in the top right corner)Click "Export Chat History"Unselect photos and other media. Select "Machine-readable JSON" format to export.An example is below: telegram_conversation.json{ "name": "Jiminy", "type": "personal_chat", "id": 5965280513, "messages": [  {   "id": 1,   "type": "message",   "date": "2023-08-23T13:11:23",   "date_unixtime":
Telegram
Telegram ->: Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversToolsAgents and toolkitsMemoryCallbacksChat loadersDiscordFacebook MessengerGMailiMessageFine-Tuning on LangSmith Chat DatasetsFine-Tuning on LangSmith LLM RunsSlacktelegramTwitter (via Apify)WeChatWhatsAppComponentsChat loaderstelegramOn this pagetelegramTelegramThis notebook shows how to use the Telegram chat loader. This class helps map exported Telegram conversations to LangChain chat messages.The process has three steps:Export  the chat .txt file by copying chats from the Discord app and pasting them in a file on your local computerCreate the TelegramChatLoader with the file path pointed to the json file or directory of JSON filesCall loader.load() (or loader.lazy_load()) to perform the conversion. Optionally use merge_chat_runs to combine message from the same sender in sequence, and/or map_ai_messages to convert messages from the specified sender to the "AIMessage" class.1. Create message dump‚ÄãCurrently (2023/08/23) this loader best supports json files in the format generated by exporting your chat history from the Telegram Desktop App.Important: There are 'lite' versions of telegram such as "Telegram for MacOS" that lack the export functionality. Please make sure you use the correct app to export the file.To make the export:Download and open telegram desktopSelect a conversationNavigate to the conversation settings (currently the three dots in the top right corner)Click "Export Chat History"Unselect photos and other media. Select "Machine-readable JSON" format to export.An example is below: telegram_conversation.json{ "name": "Jiminy", "type": "personal_chat", "id": 5965280513, "messages": [  {   "id": 1,   "type": "message",   "date": "2023-08-23T13:11:23",   "date_unixtime":