Twitter (via Apify) | ü¶úÔ∏èüîó Langchain






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 loadersTwitter (via Apify)Twitter (via Apify)This notebook shows how to load chat messages from Twitter to fine-tune on. We do this by utilizing Apify. First, use Apify to export tweets. An exampleimport jsonfrom langchain.schema import AIMessagefrom langchain.adapters.openai import convert_message_to_dictwith open('example_data/dataset_twitter-scraper_2023-08-23_22-13-19-740.json') as f:    data = json.load(f)# Filter out tweets that reference other tweets, because it's a bit weirdtweets = [d["full_text"] for d in data if "t.co" not in d['full_text']]# Create them as AI messagesmessages = [AIMessage(content=t) for t in tweets]# Add in a system message at the start# TODO: we could try to extract the subject from the tweets, and put that in the system message.system_message = {"role": "system", "content": "write a tweet"}data = [[system_message, convert_message_to_dict(m)] for m in messages]PrevioustelegramNextWeChatCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
This notebook shows how to load chat messages from Twitter to fine-tune on. We do this by utilizing Apify.
This notebook shows how to load chat messages from Twitter to fine-tune on. We do this by utilizing Apify. ->: Twitter (via Apify) | ü¶úÔ∏èüîó Langchain






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 loadersTwitter (via Apify)Twitter (via Apify)This notebook shows how to load chat messages from Twitter to fine-tune on. We do this by utilizing Apify. First, use Apify to export tweets. An exampleimport jsonfrom langchain.schema import AIMessagefrom langchain.adapters.openai import convert_message_to_dictwith open('example_data/dataset_twitter-scraper_2023-08-23_22-13-19-740.json') as f:    data = json.load(f)# Filter out tweets that reference other tweets, because it's a bit weirdtweets = [d["full_text"] for d in data if "t.co" not in d['full_text']]# Create them as AI messagesmessages = [AIMessage(content=t) for t in tweets]# Add in a system message at the start# TODO: we could try to extract the subject from the tweets, and put that in the system message.system_message = {"role": "system", "content": "write a tweet"}data = [[system_message, convert_message_to_dict(m)] for m in messages]PrevioustelegramNextWeChatCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.