diff --git a/365085a8-a90a-43f9-a779-f8769ec7eca1.html b/365085a8-a90a-43f9-a779-f8769ec7eca1.html index 39cfcc1a16..0ea7a96e28 100644 --- a/365085a8-a90a-43f9-a779-f8769ec7eca1.html +++ b/365085a8-a90a-43f9-a779-f8769ec7eca1.html @@ -10,7 +10,7 @@ - + diff --git a/404.html b/404.html index 8faa2977b7..f6446f1d7b 100644 --- a/404.html +++ b/404.html @@ -10,7 +10,7 @@ - + diff --git a/Components/components-memories.html b/Components/components-memories.html index 23c97e1e2f..b771097eea 100644 --- a/Components/components-memories.html +++ b/Components/components-memories.html @@ -10,7 +10,7 @@ - + diff --git a/Components/components-tools.html b/Components/components-tools.html index 5b621521ea..78e21a2a5e 100644 --- a/Components/components-tools.html +++ b/Components/components-tools.html @@ -10,7 +10,7 @@ - + diff --git a/Starter-Projects/starter-projects-complex-agent.html b/Starter-Projects/starter-projects-complex-agent.html index 4c0eff83e0..21fdb26a5a 100644 --- a/Starter-Projects/starter-projects-complex-agent.html +++ b/Starter-Projects/starter-projects-complex-agent.html @@ -10,7 +10,7 @@ - + diff --git a/Starter-Projects/starter-projects-hierarchical-crew.html b/Starter-Projects/starter-projects-hierarchical-crew.html index 7d5bb3c4d6..a75af0d6d6 100644 --- a/Starter-Projects/starter-projects-hierarchical-crew.html +++ b/Starter-Projects/starter-projects-hierarchical-crew.html @@ -10,7 +10,7 @@ - + diff --git a/Starter-Projects/starter-projects-sequential-crew.html b/Starter-Projects/starter-projects-sequential-crew.html index f87988893a..0590546e9c 100644 --- a/Starter-Projects/starter-projects-sequential-crew.html +++ b/Starter-Projects/starter-projects-sequential-crew.html @@ -10,7 +10,7 @@ - + diff --git a/assets/files/AssemblyAI_Flow-22ac78676a24fcafe6cbef24c124b018.json b/assets/files/AssemblyAI_Flow-22ac78676a24fcafe6cbef24c124b018.json deleted file mode 100644 index a25d286c6b..0000000000 --- a/assets/files/AssemblyAI_Flow-22ac78676a24fcafe6cbef24c124b018.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"AssemblyAI Transcription and Speech AI Flow","icon":null,"is_component":false,"endpoint_name":null,"data":{"nodes":[{"id":"Prompt-IO8Cq","type":"genericNode","position":{"x":-1376.3296370680628,"y":928.8860970980681},"data":{"type":"Prompt","node":{"template":{"_type":"Component","code":{"type":"code","required":true,"placeholder":"","list":false,"show":true,"multiline":true,"value":"from langflow.base.prompts.api_utils import process_prompt_template\nfrom langflow.custom import Component\nfrom langflow.inputs.inputs import DefaultPromptField\nfrom langflow.io import Output, PromptInput\nfrom langflow.schema.message import Message\nfrom langflow.template.utils import update_template_values\n\n\nclass PromptComponent(Component):\n display_name: str = \"Prompt\"\n description: str = \"Create a prompt template with dynamic variables.\"\n icon = \"prompts\"\n trace_type = \"prompt\"\n name = \"Prompt\"\n\n inputs = [\n PromptInput(name=\"template\", display_name=\"Template\"),\n ]\n\n outputs = [\n Output(display_name=\"Prompt Message\", name=\"prompt\", method=\"build_prompt\"),\n ]\n\n async def build_prompt(\n self,\n ) -> Message:\n prompt = await Message.from_template_and_variables(**self._attributes)\n self.status = prompt.text\n return prompt\n\n def _update_template(self, frontend_node: dict):\n prompt_template = frontend_node[\"template\"][\"template\"][\"value\"]\n custom_fields = frontend_node[\"custom_fields\"]\n frontend_node_template = frontend_node[\"template\"]\n _ = process_prompt_template(\n template=prompt_template,\n name=\"template\",\n custom_fields=custom_fields,\n frontend_node_template=frontend_node_template,\n )\n return frontend_node\n\n def post_code_processing(self, new_frontend_node: dict, current_frontend_node: dict):\n \"\"\"\n This function is called after the code validation is done.\n \"\"\"\n frontend_node = super().post_code_processing(new_frontend_node, current_frontend_node)\n template = frontend_node[\"template\"][\"template\"][\"value\"]\n # Kept it duplicated for backwards compatibility\n _ = process_prompt_template(\n template=template,\n name=\"template\",\n custom_fields=frontend_node[\"custom_fields\"],\n frontend_node_template=frontend_node[\"template\"],\n )\n # Now that template is updated, we need to grab any values that were set in the current_frontend_node\n # and update the frontend_node with those values\n update_template_values(new_template=frontend_node, previous_template=current_frontend_node[\"template\"])\n return frontend_node\n\n def _get_fallback_input(self, **kwargs):\n return DefaultPromptField(**kwargs)\n","fileTypes":[],"file_path":"","password":false,"name":"code","advanced":true,"dynamic":true,"info":"","load_from_db":false,"title_case":false},"template":{"trace_as_input":true,"list":false,"required":false,"placeholder":"","show":true,"name":"template","value":"Provide a brief summary of the transcript.","display_name":"Template","advanced":false,"dynamic":false,"info":"","title_case":false,"type":"prompt","_input_type":"PromptInput"}},"description":"Create a prompt template with dynamic variables.","icon":"prompts","is_input":null,"is_output":null,"is_composition":null,"base_classes":["Message"],"name":"","display_name":"Prompt","documentation":"","custom_fields":{"template":[]},"output_types":[],"full_path":null,"pinned":false,"conditional_paths":[],"frozen":false,"outputs":[{"types":["Message"],"selected":"Message","name":"prompt","hidden":null,"display_name":"Prompt Message","method":"build_prompt","value":"__UNDEFINED__","cache":true}],"field_order":["template"],"beta":false,"error":null,"edited":false,"lf_version":"1.0.18"},"id":"Prompt-IO8Cq"},"selected":false,"width":384,"height":324,"positionAbsolute":{"x":-1376.3296370680628,"y":928.8860970980681},"dragging":false},{"id":"AssemblyAITranscriptionJobCreator-Idt7P","type":"genericNode","position":{"x":-1957.7132501771657,"y":470.79685053457587},"data":{"type":"AssemblyAITranscriptionJobCreator","node":{"template":{"_type":"Component","audio_file":{"trace_as_metadata":true,"file_path":"fa69381c-d1c4-4535-bc23-bc2fb4956e1e/2024-09-26_16-47-01_sports_injuries.mp3","fileTypes":["3ga","8svx","aac","ac3","aif","aiff","alac","amr","ape","au","dss","flac","flv","m4a","m4b","m4p","m4r","mp3","mpga","ogg","oga","mogg","opus","qcp","tta","voc","wav","wma","wv","webm","mts","m2ts","ts","mov","mp2","mp4","m4p","m4v","mxf"],"list":false,"required":false,"placeholder":"","show":true,"name":"audio_file","value":"sports_injuries.mp3","display_name":"Audio File","advanced":false,"dynamic":false,"info":"The audio file to transcribe","title_case":false,"type":"file","_input_type":"FileInput","load_from_db":false},"api_key":{"load_from_db":false,"required":false,"placeholder":"","show":true,"name":"api_key","value":null,"display_name":"Assembly API Key","advanced":false,"input_types":["Message"],"dynamic":false,"info":"Your AssemblyAI API key. You can get one from https://www.assemblyai.com/","title_case":false,"password":true,"type":"str","_input_type":"SecretStrInput"},"audio_file_url":{"trace_as_input":true,"trace_as_metadata":true,"load_from_db":false,"list":false,"required":false,"placeholder":"","show":true,"name":"audio_file_url","value":"","display_name":"Audio File URL","advanced":true,"input_types":["Message"],"dynamic":false,"info":"The URL of the audio file to transcribe (Can be used instead of a File)","title_case":false,"type":"str","_input_type":"MessageTextInput"},"code":{"type":"code","required":true,"placeholder":"","list":false,"show":true,"multiline":true,"value":"import os\n\nimport assemblyai as aai\nfrom loguru import logger\n\nfrom langflow.custom import Component\nfrom langflow.io import BoolInput, DropdownInput, FileInput, MessageTextInput, Output, SecretStrInput\nfrom langflow.schema import Data\n\n\nclass AssemblyAITranscriptionJobCreator(Component):\n display_name = \"AssemblyAI Start Transcript\"\n description = \"Create a transcription job for an audio file using AssemblyAI with advanced options\"\n documentation = \"https://www.assemblyai.com/docs\"\n icon = \"AssemblyAI\"\n\n inputs = [\n SecretStrInput(\n name=\"api_key\",\n display_name=\"Assembly API Key\",\n info=\"Your AssemblyAI API key. You can get one from https://www.assemblyai.com/\",\n ),\n FileInput(\n name=\"audio_file\",\n display_name=\"Audio File\",\n file_types=[\n \"3ga\",\n \"8svx\",\n \"aac\",\n \"ac3\",\n \"aif\",\n \"aiff\",\n \"alac\",\n \"amr\",\n \"ape\",\n \"au\",\n \"dss\",\n \"flac\",\n \"flv\",\n \"m4a\",\n \"m4b\",\n \"m4p\",\n \"m4r\",\n \"mp3\",\n \"mpga\",\n \"ogg\",\n \"oga\",\n \"mogg\",\n \"opus\",\n \"qcp\",\n \"tta\",\n \"voc\",\n \"wav\",\n \"wma\",\n \"wv\",\n \"webm\",\n \"mts\",\n \"m2ts\",\n \"ts\",\n \"mov\",\n \"mp2\",\n \"mp4\",\n \"m4p\",\n \"m4v\",\n \"mxf\",\n ],\n info=\"The audio file to transcribe\",\n ),\n MessageTextInput(\n name=\"audio_file_url\",\n display_name=\"Audio File URL\",\n info=\"The URL of the audio file to transcribe (Can be used instead of a File)\",\n advanced=True,\n ),\n DropdownInput(\n name=\"speech_model\",\n display_name=\"Speech Model\",\n options=[\n \"best\",\n \"nano\",\n ],\n value=\"best\",\n info=\"The speech model to use for the transcription\",\n advanced=True,\n ),\n BoolInput(\n name=\"language_detection\",\n display_name=\"Automatic Language Detection\",\n info=\"Enable automatic language detection\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"language_code\",\n display_name=\"Language\",\n info=\"\"\"\n The language of the audio file. Can be set manually if automatic language detection is disabled. \n See https://www.assemblyai.com/docs/getting-started/supported-languages for a list of supported language codes.\n \"\"\",\n advanced=True,\n ),\n BoolInput(\n name=\"speaker_labels\",\n display_name=\"Enable Speaker Labels\",\n info=\"Enable speaker diarization\",\n ),\n MessageTextInput(\n name=\"speakers_expected\",\n display_name=\"Expected Number of Speakers\",\n info=\"Set the expected number of speakers (optional, enter a number)\",\n advanced=True,\n ),\n BoolInput(\n name=\"punctuate\",\n display_name=\"Punctuate\",\n info=\"Enable automatic punctuation\",\n advanced=True,\n value=True,\n ),\n BoolInput(\n name=\"format_text\",\n display_name=\"Format Text\",\n info=\"Enable text formatting\",\n advanced=True,\n value=True,\n ),\n ]\n\n outputs = [\n Output(display_name=\"Transcript ID\", name=\"transcript_id\", method=\"create_transcription_job\"),\n ]\n\n def create_transcription_job(self) -> Data:\n aai.settings.api_key = self.api_key\n\n # Convert speakers_expected to int if it's not empty\n speakers_expected = None\n if self.speakers_expected and self.speakers_expected.strip():\n try:\n speakers_expected = int(self.speakers_expected)\n except ValueError:\n self.status = \"Error: Expected Number of Speakers must be a valid integer\"\n return Data(data={\"error\": \"Error: Expected Number of Speakers must be a valid integer\"})\n\n language_code = self.language_code if self.language_code else None\n\n config = aai.TranscriptionConfig(\n speech_model=self.speech_model,\n language_detection=self.language_detection,\n language_code=language_code,\n speaker_labels=self.speaker_labels,\n speakers_expected=speakers_expected,\n punctuate=self.punctuate,\n format_text=self.format_text,\n )\n\n audio = None\n if self.audio_file:\n if self.audio_file_url:\n logger.warning(\"Both an audio file an audio URL were specified. The audio URL was ignored.\")\n\n # Check if the file exists\n if not os.path.exists(self.audio_file):\n self.status = \"Error: Audio file not found\"\n return Data(data={\"error\": \"Error: Audio file not found\"})\n audio = self.audio_file\n elif self.audio_file_url:\n audio = self.audio_file_url\n else:\n self.status = \"Error: Either an audio file or an audio URL must be specified\"\n return Data(data={\"error\": \"Error: Either an audio file or an audio URL must be specified\"})\n\n try:\n transcript = aai.Transcriber().submit(audio, config=config)\n\n if transcript.error:\n self.status = transcript.error\n return Data(data={\"error\": transcript.error})\n else:\n result = Data(data={\"transcript_id\": transcript.id})\n self.status = result\n return result\n except Exception as e:\n self.status = f\"An error occurred: {str(e)}\"\n return Data(data={\"error\": f\"An error occurred: {str(e)}\"})\n","fileTypes":[],"file_path":"","password":false,"name":"code","advanced":true,"dynamic":true,"info":"","load_from_db":false,"title_case":false},"format_text":{"trace_as_metadata":true,"list":false,"required":false,"placeholder":"","show":true,"name":"format_text","value":true,"display_name":"Format Text","advanced":true,"dynamic":false,"info":"Enable text formatting","title_case":false,"type":"bool","_input_type":"BoolInput"},"language_code":{"trace_as_input":true,"trace_as_metadata":true,"load_from_db":false,"list":false,"required":false,"placeholder":"","show":true,"name":"language_code","value":"","display_name":"Language","advanced":true,"input_types":["Message"],"dynamic":false,"info":"\n The language of the audio file. Can be set manually if automatic language detection is disabled. \n See https://www.assemblyai.com/docs/getting-started/supported-languages for a list of supported language codes.\n ","title_case":false,"type":"str","_input_type":"MessageTextInput"},"language_detection":{"trace_as_metadata":true,"list":false,"required":false,"placeholder":"","show":true,"name":"language_detection","value":false,"display_name":"Automatic Language Detection","advanced":true,"dynamic":false,"info":"Enable automatic language detection","title_case":false,"type":"bool","_input_type":"BoolInput"},"punctuate":{"trace_as_metadata":true,"list":false,"required":false,"placeholder":"","show":true,"name":"punctuate","value":true,"display_name":"Punctuate","advanced":true,"dynamic":false,"info":"Enable automatic punctuation","title_case":false,"type":"bool","_input_type":"BoolInput"},"speaker_labels":{"trace_as_metadata":true,"list":false,"required":false,"placeholder":"","show":true,"name":"speaker_labels","value":true,"display_name":"Enable Speaker Labels","advanced":false,"dynamic":false,"info":"Enable speaker diarization","title_case":false,"type":"bool","_input_type":"BoolInput","load_from_db":false},"speakers_expected":{"trace_as_input":true,"trace_as_metadata":true,"load_from_db":false,"list":false,"required":false,"placeholder":"","show":true,"name":"speakers_expected","value":"","display_name":"Expected Number of Speakers","advanced":true,"input_types":["Message"],"dynamic":false,"info":"Set the expected number of speakers (optional, enter a number)","title_case":false,"type":"str","_input_type":"MessageTextInput"},"speech_model":{"trace_as_metadata":true,"options":["best","nano"],"combobox":false,"required":false,"placeholder":"","show":true,"name":"speech_model","value":"best","display_name":"Speech Model","advanced":true,"dynamic":false,"info":"The speech model to use for the transcription","title_case":false,"type":"str","_input_type":"DropdownInput"}},"description":"Create a transcription job for an audio file using AssemblyAI with advanced options","icon":"AssemblyAI","base_classes":["Data"],"display_name":"AssemblyAI Start Transcript","documentation":"https://www.assemblyai.com/docs","custom_fields":{},"output_types":[],"pinned":false,"conditional_paths":[],"frozen":true,"outputs":[{"types":["Data"],"selected":"Data","name":"transcript_id","display_name":"Transcript ID","method":"create_transcription_job","value":"__UNDEFINED__","cache":true}],"field_order":["api_key","audio_file","audio_file_url","speech_model","language_detection","language_code","speaker_labels","speakers_expected","punctuate","format_text"],"beta":false,"edited":false,"lf_version":"1.0.18"},"id":"AssemblyAITranscriptionJobCreator-Idt7P","description":"Create a transcription job for an audio file using AssemblyAI with advanced options","display_name":"AssemblyAI Start Transcript"},"selected":false,"width":384,"height":482,"positionAbsolute":{"x":-1957.7132501771657,"y":470.79685053457587},"dragging":false},{"id":"AssemblyAITranscriptionJobPoller-F46nf","type":"genericNode","position":{"x":-1408.0967182254753,"y":461.5039554434261},"data":{"type":"AssemblyAITranscriptionJobPoller","node":{"template":{"_type":"Component","transcript_id":{"trace_as_metadata":true,"list":false,"trace_as_input":true,"required":false,"placeholder":"","show":true,"name":"transcript_id","value":"","display_name":"Transcript ID","advanced":false,"input_types":["Data"],"dynamic":false,"info":"The ID of the transcription job to poll","title_case":false,"type":"other","_input_type":"DataInput"},"api_key":{"load_from_db":false,"required":false,"placeholder":"","show":true,"name":"api_key","value":null,"display_name":"Assembly API Key","advanced":false,"input_types":["Message"],"dynamic":false,"info":"Your AssemblyAI API key. You can get one from https://www.assemblyai.com/","title_case":false,"password":true,"type":"str","_input_type":"SecretStrInput"},"code":{"type":"code","required":true,"placeholder":"","list":false,"show":true,"multiline":true,"value":"import assemblyai as aai\n\nfrom langflow.custom import Component\nfrom langflow.io import DataInput, FloatInput, Output, SecretStrInput\nfrom langflow.schema import Data\n\n\nclass AssemblyAITranscriptionJobPoller(Component):\n display_name = \"AssemblyAI Poll Transcript\"\n description = \"Poll for the status of a transcription job using AssemblyAI\"\n documentation = \"https://www.assemblyai.com/docs\"\n icon = \"AssemblyAI\"\n\n inputs = [\n SecretStrInput(\n name=\"api_key\",\n display_name=\"Assembly API Key\",\n info=\"Your AssemblyAI API key. You can get one from https://www.assemblyai.com/\",\n ),\n DataInput(\n name=\"transcript_id\",\n display_name=\"Transcript ID\",\n info=\"The ID of the transcription job to poll\",\n ),\n FloatInput(\n name=\"polling_interval\",\n display_name=\"Polling Interval\",\n value=3.0,\n info=\"The polling interval in seconds\",\n advanced=True,\n ),\n ]\n\n outputs = [\n Output(display_name=\"Transcription Result\", name=\"transcription_result\", method=\"poll_transcription_job\"),\n ]\n\n def poll_transcription_job(self) -> Data:\n \"\"\"Polls the transcription status until completion and returns the Data.\"\"\"\n aai.settings.api_key = self.api_key\n aai.settings.polling_interval = self.polling_interval\n\n # check if it's an error message from the previous step\n if self.transcript_id.data.get(\"error\"):\n self.status = self.transcript_id.data[\"error\"]\n return self.transcript_id\n\n try:\n transcript = aai.Transcript.get_by_id(self.transcript_id.data[\"transcript_id\"])\n except Exception as e:\n error = f\"Getting transcription failed: {str(e)}\"\n self.status = error\n return Data(data={\"error\": error})\n\n if transcript.status == aai.TranscriptStatus.completed:\n json_response = transcript.json_response\n text = json_response.pop(\"text\", None)\n utterances = json_response.pop(\"utterances\", None)\n transcript_id = json_response.pop(\"id\", None)\n sorted_data = { \"text\": text, \"utterances\": utterances, \"id\": transcript_id}\n sorted_data.update(json_response)\n data = Data(data=sorted_data)\n self.status = data\n return data\n else:\n self.status = transcript.error\n return Data(data={\"error\": transcript.error})\n","fileTypes":[],"file_path":"","password":false,"name":"code","advanced":true,"dynamic":true,"info":"","load_from_db":false,"title_case":false},"polling_interval":{"trace_as_metadata":true,"list":false,"required":false,"placeholder":"","show":true,"name":"polling_interval","value":3,"display_name":"Polling Interval","advanced":true,"dynamic":false,"info":"The polling interval in seconds","title_case":false,"type":"float","_input_type":"FloatInput"}},"description":"Poll for the status of a transcription job using AssemblyAI","icon":"AssemblyAI","base_classes":["Data"],"display_name":"AssemblyAI Poll Transcript","documentation":"https://www.assemblyai.com/docs","custom_fields":{},"output_types":[],"pinned":false,"conditional_paths":[],"frozen":false,"outputs":[{"types":["Data"],"selected":"Data","name":"transcription_result","display_name":"Transcription Result","method":"poll_transcription_job","value":"__UNDEFINED__","cache":true}],"field_order":["api_key","transcript_id","polling_interval"],"beta":false,"edited":false,"lf_version":"1.0.18"},"id":"AssemblyAITranscriptionJobPoller-F46nf","description":"Poll for the status of a transcription job using AssemblyAI","display_name":"AssemblyAI Poll Transcript"},"selected":false,"width":384,"height":368,"positionAbsolute":{"x":-1408.0967182254753,"y":461.5039554434261},"dragging":false},{"id":"AssemblyAIGetSubtitles-3sjU6","type":"genericNode","position":{"x":-867.5862690424032,"y":368.91683022842676},"data":{"type":"AssemblyAIGetSubtitles","node":{"template":{"_type":"Component","transcription_result":{"trace_as_metadata":true,"list":false,"trace_as_input":true,"required":false,"placeholder":"","show":true,"name":"transcription_result","value":"","display_name":"Transcription Result","advanced":false,"input_types":["Data"],"dynamic":false,"info":"The transcription result from AssemblyAI","title_case":false,"type":"other","_input_type":"DataInput"},"api_key":{"load_from_db":false,"required":false,"placeholder":"","show":true,"name":"api_key","value":null,"display_name":"Assembly API Key","advanced":false,"input_types":["Message"],"dynamic":false,"info":"Your AssemblyAI API key. You can get one from https://www.assemblyai.com/","title_case":false,"password":true,"type":"str","_input_type":"SecretStrInput"},"chars_per_caption":{"trace_as_metadata":true,"list":false,"required":false,"placeholder":"","show":true,"name":"chars_per_caption","value":0,"display_name":"Characters per Caption","advanced":true,"dynamic":false,"info":"The maximum number of characters per caption (0 for no limit)","title_case":false,"type":"int","_input_type":"IntInput"},"code":{"type":"code","required":true,"placeholder":"","list":false,"show":true,"multiline":true,"value":"import assemblyai as aai\n\nfrom langflow.custom import Component\nfrom langflow.io import DataInput, DropdownInput, IntInput, Output, SecretStrInput\nfrom langflow.schema import Data\n\n\nclass AssemblyAIGetSubtitles(Component):\n display_name = \"AssemblyAI Get Subtitles\"\n description = \"Export your transcript in SRT or VTT format for subtitles and closed captions\"\n documentation = \"https://www.assemblyai.com/docs\"\n icon = \"AssemblyAI\"\n\n inputs = [\n SecretStrInput(\n name=\"api_key\",\n display_name=\"Assembly API Key\",\n info=\"Your AssemblyAI API key. You can get one from https://www.assemblyai.com/\",\n ),\n DataInput(\n name=\"transcription_result\",\n display_name=\"Transcription Result\",\n info=\"The transcription result from AssemblyAI\",\n ),\n DropdownInput(\n name=\"subtitle_format\",\n display_name=\"Subtitle Format\",\n options=[\"srt\", \"vtt\"],\n value=\"srt\",\n info=\"The format of the captions (SRT or VTT)\",\n ),\n IntInput(\n name=\"chars_per_caption\",\n display_name=\"Characters per Caption\",\n info=\"The maximum number of characters per caption (0 for no limit)\",\n value=0,\n advanced=True,\n ),\n ]\n\n outputs = [\n Output(display_name=\"Subtitles\", name=\"subtitles\", method=\"get_subtitles\"),\n ]\n\n def get_subtitles(self) -> Data:\n aai.settings.api_key = self.api_key\n\n # check if it's an error message from the previous step\n if self.transcription_result.data.get(\"error\"):\n self.status = self.transcription_result.data[\"error\"]\n return self.transcription_result\n\n try:\n transcript_id = self.transcription_result.data[\"id\"]\n transcript = aai.Transcript.get_by_id(transcript_id)\n except Exception as e:\n error = f\"Getting transcription failed: {str(e)}\"\n self.status = error\n return Data(data={\"error\": error})\n\n if transcript.status == aai.TranscriptStatus.completed:\n subtitles = None\n chars_per_caption = self.chars_per_caption if self.chars_per_caption > 0 else None\n if self.subtitle_format == \"srt\":\n subtitles = transcript.export_subtitles_srt(chars_per_caption)\n else:\n subtitles = transcript.export_subtitles_vtt(chars_per_caption)\n\n result = Data(\n subtitles=subtitles,\n format=self.subtitle_format,\n transcript_id=transcript_id,\n chars_per_caption=chars_per_caption,\n )\n\n self.status = result\n return result\n else:\n self.status = transcript.error\n return Data(data={\"error\": transcript.error})\n","fileTypes":[],"file_path":"","password":false,"name":"code","advanced":true,"dynamic":true,"info":"","load_from_db":false,"title_case":false},"subtitle_format":{"trace_as_metadata":true,"options":["srt","vtt"],"combobox":false,"required":false,"placeholder":"","show":true,"name":"subtitle_format","value":"srt","display_name":"Subtitle Format","advanced":false,"dynamic":false,"info":"The format of the captions (SRT or VTT)","title_case":false,"type":"str","_input_type":"DropdownInput"}},"description":"Export your transcript in SRT or VTT format for subtitles and closed captions","icon":"AssemblyAI","base_classes":["Data"],"display_name":"AssemblyAI Get Subtitles","documentation":"https://www.assemblyai.com/docs","custom_fields":{},"output_types":[],"pinned":false,"conditional_paths":[],"frozen":false,"outputs":[{"types":["Data"],"selected":"Data","name":"subtitles","display_name":"Subtitles","method":"get_subtitles","value":"__UNDEFINED__","cache":true}],"field_order":["api_key","transcription_result","subtitle_format","chars_per_caption"],"beta":false,"edited":false,"lf_version":"1.0.18"},"id":"AssemblyAIGetSubtitles-3sjU6","description":"Export your transcript in SRT or VTT format for subtitles and closed captions","display_name":"AssemblyAI Get Subtitles"},"selected":false,"width":384,"height":454,"positionAbsolute":{"x":-867.5862690424032,"y":368.91683022842676},"dragging":false},{"id":"AssemblyAIListTranscripts-3prc4","type":"genericNode","position":{"x":-380.99808133361984,"y":401.2674645310267},"data":{"type":"AssemblyAIListTranscripts","node":{"template":{"_type":"Component","api_key":{"load_from_db":false,"required":false,"placeholder":"","show":true,"name":"api_key","value":null,"display_name":"Assembly API Key","advanced":false,"input_types":["Message"],"dynamic":false,"info":"Your AssemblyAI API key. You can get one from https://www.assemblyai.com/","title_case":false,"password":true,"type":"str","_input_type":"SecretStrInput"},"code":{"type":"code","required":true,"placeholder":"","list":false,"show":true,"multiline":true,"value":"import assemblyai as aai\n\nfrom langflow.custom import Component\nfrom langflow.io import BoolInput, DropdownInput, IntInput, MessageTextInput, Output, SecretStrInput\nfrom langflow.schema import Data\n\n\nclass AssemblyAIListTranscripts(Component):\n display_name = \"AssemblyAI List Transcripts\"\n description = \"Retrieve a list of transcripts from AssemblyAI with filtering options\"\n documentation = \"https://www.assemblyai.com/docs\"\n icon = \"AssemblyAI\"\n\n inputs = [\n SecretStrInput(\n name=\"api_key\",\n display_name=\"Assembly API Key\",\n info=\"Your AssemblyAI API key. You can get one from https://www.assemblyai.com/\",\n ),\n IntInput(\n name=\"limit\",\n display_name=\"Limit\",\n info=\"Maximum number of transcripts to retrieve (default: 20, use 0 for all)\",\n value=20,\n ),\n DropdownInput(\n name=\"status_filter\",\n display_name=\"Status Filter\",\n options=[\"all\", \"queued\", \"processing\", \"completed\", \"error\"],\n value=\"all\",\n info=\"Filter by transcript status\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"created_on\",\n display_name=\"Created On\",\n info=\"Only get transcripts created on this date (YYYY-MM-DD)\",\n advanced=True,\n ),\n BoolInput(\n name=\"throttled_only\",\n display_name=\"Throttled Only\",\n info=\"Only get throttled transcripts, overrides the status filter\",\n advanced=True,\n ),\n ]\n\n outputs = [\n Output(display_name=\"Transcript List\", name=\"transcript_list\", method=\"list_transcripts\"),\n ]\n\n def list_transcripts(self) -> list[Data]:\n aai.settings.api_key = self.api_key\n\n params = aai.ListTranscriptParameters()\n if self.limit:\n params.limit = self.limit\n if self.status_filter != \"all\":\n params.status = self.status_filter\n if self.created_on and self.created_on.text:\n params.created_on = self.created_on.text\n if self.throttled_only:\n params.throttled_only = True\n\n try:\n transcriber = aai.Transcriber()\n\n def convert_page_to_data_list(page):\n return [Data(**t.dict()) for t in page.transcripts]\n\n if self.limit == 0:\n # paginate over all pages\n params.limit = 100\n page = transcriber.list_transcripts(params)\n transcripts = convert_page_to_data_list(page)\n\n while page.page_details.before_id_of_prev_url is not None:\n params.before_id = page.page_details.before_id_of_prev_url\n page = transcriber.list_transcripts(params)\n transcripts.extend(convert_page_to_data_list(page))\n else:\n # just one page\n page = transcriber.list_transcripts(params)\n transcripts = convert_page_to_data_list(page)\n\n self.status = transcripts\n return transcripts\n except Exception as e:\n error_data = Data(data={\"error\": f\"An error occurred: {str(e)}\"})\n self.status = [error_data]\n return [error_data]\n","fileTypes":[],"file_path":"","password":false,"name":"code","advanced":true,"dynamic":true,"info":"","load_from_db":false,"title_case":false},"created_on":{"trace_as_input":true,"trace_as_metadata":true,"load_from_db":false,"list":false,"required":false,"placeholder":"","show":true,"name":"created_on","value":"","display_name":"Created On","advanced":true,"input_types":["Message"],"dynamic":false,"info":"Only get transcripts created on this date (YYYY-MM-DD)","title_case":false,"type":"str","_input_type":"MessageTextInput"},"limit":{"trace_as_metadata":true,"list":false,"required":false,"placeholder":"","show":true,"name":"limit","value":20,"display_name":"Limit","advanced":false,"dynamic":false,"info":"Maximum number of transcripts to retrieve (default: 20, use 0 for all)","title_case":false,"type":"int","_input_type":"IntInput"},"status_filter":{"trace_as_metadata":true,"options":["all","queued","processing","completed","error"],"combobox":false,"required":false,"placeholder":"","show":true,"name":"status_filter","value":"all","display_name":"Status Filter","advanced":true,"dynamic":false,"info":"Filter by transcript status","title_case":false,"type":"str","_input_type":"DropdownInput"},"throttled_only":{"trace_as_metadata":true,"list":false,"required":false,"placeholder":"","show":true,"name":"throttled_only","value":false,"display_name":"Throttled Only","advanced":true,"dynamic":false,"info":"Only get throttled transcripts, overrides the status filter","title_case":false,"type":"bool","_input_type":"BoolInput"}},"description":"Retrieve a list of transcripts from AssemblyAI with filtering options","icon":"AssemblyAI","base_classes":["Data"],"display_name":"AssemblyAI List Transcripts","documentation":"https://www.assemblyai.com/docs","custom_fields":{},"output_types":[],"pinned":false,"conditional_paths":[],"frozen":false,"outputs":[{"types":["Data"],"selected":"Data","name":"transcript_list","display_name":"Transcript List","method":"list_transcripts","value":"__UNDEFINED__","cache":true}],"field_order":["api_key","limit","status_filter","created_on","throttled_only"],"beta":false,"edited":false,"lf_version":"1.0.18"},"id":"AssemblyAIListTranscripts-3prc4","description":"Retrieve a list of transcripts from AssemblyAI with filtering options","display_name":"AssemblyAI List Transcripts"},"selected":false,"width":384,"height":410,"positionAbsolute":{"x":-380.99808133361984,"y":401.2674645310267},"dragging":false},{"id":"AssemblyAILeMUR-jzwHZ","type":"genericNode","position":{"x":-875.6482330011189,"y":887.1705799007382},"data":{"type":"AssemblyAILeMUR","node":{"template":{"_type":"Component","transcription_result":{"trace_as_metadata":true,"list":false,"trace_as_input":true,"required":false,"placeholder":"","show":true,"name":"transcription_result","value":"","display_name":"Transcription Result","advanced":false,"input_types":["Data"],"dynamic":false,"info":"The transcription result from AssemblyAI","title_case":false,"type":"other","_input_type":"DataInput"},"api_key":{"load_from_db":false,"required":false,"placeholder":"","show":true,"name":"api_key","value":null,"display_name":"Assembly API Key","advanced":false,"input_types":["Message"],"dynamic":false,"info":"Your AssemblyAI API key. You can get one from https://www.assemblyai.com/","title_case":false,"password":true,"type":"str","_input_type":"SecretStrInput"},"code":{"type":"code","required":true,"placeholder":"","list":false,"show":true,"multiline":true,"value":"import assemblyai as aai\n\nfrom langflow.custom import Component\nfrom langflow.io import DataInput, DropdownInput, FloatInput, IntInput, MultilineInput, Output, SecretStrInput\nfrom langflow.schema import Data\n\n\nclass AssemblyAILeMUR(Component):\n display_name = \"AssemblyAI LeMUR\"\n description = \"Apply Large Language Models to spoken data using the AssemblyAI LeMUR framework\"\n documentation = \"https://www.assemblyai.com/docs/lemur\"\n icon = \"AssemblyAI\"\n\n inputs = [\n SecretStrInput(\n name=\"api_key\",\n display_name=\"Assembly API Key\",\n info=\"Your AssemblyAI API key. You can get one from https://www.assemblyai.com/\",\n advanced=False,\n ),\n DataInput(\n name=\"transcription_result\",\n display_name=\"Transcription Result\",\n info=\"The transcription result from AssemblyAI\",\n ),\n MultilineInput(\n name=\"prompt\",\n display_name=\"Input Prompt\",\n info=\"The text to prompt the model\",\n ),\n DropdownInput(\n name=\"final_model\",\n display_name=\"Final Model\",\n options=[\"claude3_5_sonnet\", \"claude3_opus\", \"claude3_haiku\", \"claude3_sonnet\"],\n value=\"claude3_5_sonnet\",\n info=\"The model that is used for the final prompt after compression is performed\",\n advanced=True,\n ),\n FloatInput(\n name=\"temperature\",\n display_name=\"Temperature\",\n advanced=True,\n value=0.0,\n info=\"The temperature to use for the model\",\n ),\n IntInput(\n name=\"max_output_size\",\n display_name=\" Max Output Size\",\n advanced=True,\n value=2000,\n info=\"Max output size in tokens, up to 4000\",\n ),\n DropdownInput(\n name=\"endpoint\",\n display_name=\"Endpoint\",\n options=[\"task\", \"summary\", \"question-answer\"],\n value=\"task\",\n info=\"The LeMUR endpoint to use. For 'summary' and 'question-answer', no prompt input is needed. See https://www.assemblyai.com/docs/api-reference/lemur/ for more info.\",\n advanced=True,\n ),\n MultilineInput(\n name=\"questions\",\n display_name=\"Questions\",\n info=\"Comma-separated list of your questions. Only used if Endpoint is 'question-answer'\",\n advanced=True,\n ),\n MultilineInput(\n name=\"transcript_ids\",\n display_name=\"Transcript IDs\",\n info=\"Comma-separated list of transcript IDs. LeMUR can perform actions over multiple transcripts. If provided, the Transcription Result is ignored.\",\n advanced=True,\n ),\n ]\n\n outputs = [\n Output(display_name=\"LeMUR Response\", name=\"lemur_response\", method=\"run_lemur\"),\n ]\n\n def run_lemur(self) -> Data:\n \"\"\"Use the LeMUR task endpoint to input the LLM prompt.\"\"\"\n aai.settings.api_key = self.api_key\n\n if not self.transcription_result and not self.transcript_ids:\n error = \"Either a Transcription Result or Transcript IDs must be provided\"\n self.status = error\n return Data(data={\"error\": error})\n elif self.transcription_result and self.transcription_result.data.get(\"error\"):\n # error message from the previous step\n self.status = self.transcription_result.data[\"error\"]\n return self.transcription_result\n elif self.endpoint == \"task\" and not self.prompt:\n self.status = \"No prompt specified for the task endpoint\"\n return Data(data={\"error\": \"No prompt specified\"})\n elif self.endpoint == \"question-answer\" and not self.questions:\n error = \"No Questions were provided for the question-answer endpoint\"\n self.status = error\n return Data(data={\"error\": error})\n\n # Check for valid transcripts\n transcript_ids = None\n if self.transcription_result and \"id\" in self.transcription_result.data:\n transcript_ids = [self.transcription_result.data[\"id\"]]\n elif self.transcript_ids:\n transcript_ids = self.transcript_ids.split(\",\")\n transcript_ids = [t.strip() for t in transcript_ids]\n \n if not transcript_ids:\n error = \"Either a valid Transcription Result or valid Transcript IDs must be provided\"\n self.status = error\n return Data(data={\"error\": error})\n\n # Get TranscriptGroup and check if there is any error\n transcript_group = aai.TranscriptGroup(transcript_ids=transcript_ids)\n transcript_group, failures = transcript_group.wait_for_completion(return_failures=True)\n if failures:\n error = f\"Getting transcriptions failed: {failures[0]}\"\n self.status = error\n return Data(data={\"error\": error})\n \n for t in transcript_group.transcripts:\n if t.status == aai.TranscriptStatus.error:\n self.status = t.error\n return Data(data={\"error\": t.error})\n\n # Perform LeMUR action\n try:\n response = self.perform_lemur_action(transcript_group, self.endpoint)\n result = Data(data=response)\n self.status = result\n return result\n except Exception as e:\n error = f\"An Error happened: {str(e)}\"\n self.status = error\n return Data(data={\"error\": error})\n\n def perform_lemur_action(self, transcript_group: aai.TranscriptGroup, endpoint: str) -> dict:\n print(\"Endpoint:\", endpoint, type(endpoint))\n if endpoint == \"task\":\n result = transcript_group.lemur.task(\n prompt=self.prompt,\n final_model=self.get_final_model(self.final_model),\n temperature=self.temperature,\n max_output_size=self.max_output_size,\n )\n elif endpoint == \"summary\":\n result = transcript_group.lemur.summarize(\n final_model=self.get_final_model(self.final_model),\n temperature=self.temperature,\n max_output_size=self.max_output_size,\n )\n elif endpoint == \"question-answer\":\n questions = self.questions.split(\",\")\n questions = [aai.LemurQuestion(question=q) for q in questions]\n result = transcript_group.lemur.question(\n questions=questions,\n final_model=self.get_final_model(self.final_model),\n temperature=self.temperature,\n max_output_size=self.max_output_size,\n )\n else:\n raise ValueError(f\"Endpoint not supported: {endpoint}\")\n\n return result.dict()\n \n def get_final_model(self, model_name: str) -> aai.LemurModel:\n if model_name == \"claude3_5_sonnet\":\n return aai.LemurModel.claude3_5_sonnet\n elif model_name == \"claude3_opus\":\n return aai.LemurModel.claude3_opus\n elif model_name == \"claude3_haiku\":\n return aai.LemurModel.claude3_haiku\n elif model_name == \"claude3_sonnet\":\n return aai.LemurModel.claude3_sonnet\n else:\n raise ValueError(f\"Model name not supported: {model_name}\")\n","fileTypes":[],"file_path":"","password":false,"name":"code","advanced":true,"dynamic":true,"info":"","load_from_db":false,"title_case":false},"endpoint":{"trace_as_metadata":true,"options":["task","summary","question-answer"],"combobox":false,"required":false,"placeholder":"","show":true,"name":"endpoint","value":"task","display_name":"Endpoint","advanced":true,"dynamic":false,"info":"The LeMUR endpoint to use. For 'summary' and 'question-answer', no prompt input is needed. See https://www.assemblyai.com/docs/api-reference/lemur/ for more info.","title_case":false,"type":"str","_input_type":"DropdownInput"},"final_model":{"trace_as_metadata":true,"options":["claude3_5_sonnet","claude3_opus","claude3_haiku","claude3_sonnet"],"combobox":false,"required":false,"placeholder":"","show":true,"name":"final_model","value":"claude3_5_sonnet","display_name":"Final Model","advanced":true,"dynamic":false,"info":"The model that is used for the final prompt after compression is performed","title_case":false,"type":"str","_input_type":"DropdownInput"},"max_output_size":{"trace_as_metadata":true,"list":false,"required":false,"placeholder":"","show":true,"name":"max_output_size","value":2000,"display_name":" Max Output Size","advanced":true,"dynamic":false,"info":"Max output size in tokens, up to 4000","title_case":false,"type":"int","_input_type":"IntInput"},"prompt":{"trace_as_input":true,"multiline":true,"trace_as_metadata":true,"load_from_db":false,"list":false,"required":false,"placeholder":"","show":true,"name":"prompt","value":"","display_name":"Input Prompt","advanced":false,"input_types":["Message"],"dynamic":false,"info":"The text to prompt the model","title_case":false,"type":"str","_input_type":"MultilineInput"},"questions":{"trace_as_input":true,"multiline":true,"trace_as_metadata":true,"load_from_db":false,"list":false,"required":false,"placeholder":"","show":true,"name":"questions","value":"","display_name":"Questions","advanced":true,"input_types":["Message"],"dynamic":false,"info":"Comma-separated list of your questions. Only used if Endpoint is 'question-answer'","title_case":false,"type":"str","_input_type":"MultilineInput"},"temperature":{"trace_as_metadata":true,"list":false,"required":false,"placeholder":"","show":true,"name":"temperature","value":0,"display_name":"Temperature","advanced":true,"dynamic":false,"info":"The temperature to use for the model","title_case":false,"type":"float","_input_type":"FloatInput"},"transcript_ids":{"trace_as_input":true,"multiline":true,"trace_as_metadata":true,"load_from_db":false,"list":false,"required":false,"placeholder":"","show":true,"name":"transcript_ids","value":"","display_name":"Transcript IDs","advanced":true,"input_types":["Message"],"dynamic":false,"info":"Comma-separated list of transcript IDs. LeMUR can perform actions over multiple transcripts. If provided, the Transcription Result is ignored.","title_case":false,"type":"str","_input_type":"MultilineInput"}},"description":"Apply Large Language Models to spoken data using the AssemblyAI LeMUR framework","icon":"AssemblyAI","base_classes":["Data"],"display_name":"AssemblyAI LeMUR","documentation":"https://www.assemblyai.com/docs/lemur","custom_fields":{},"output_types":[],"pinned":false,"conditional_paths":[],"frozen":false,"outputs":[{"types":["Data"],"selected":"Data","name":"lemur_response","display_name":"LeMUR Response","method":"run_lemur","value":"__UNDEFINED__","cache":true}],"field_order":["api_key","transcription_result","prompt","final_model","temperature","max_output_size","endpoint","questions","transcript_ids"],"beta":false,"edited":false,"lf_version":"1.0.18"},"id":"AssemblyAILeMUR-jzwHZ","description":"Apply Large Language Models to spoken data using the AssemblyAI LeMUR framework","display_name":"AssemblyAI LeMUR"},"selected":false,"width":384,"height":454,"positionAbsolute":{"x":-875.6482330011189,"y":887.1705799007382},"dragging":false},{"id":"ParseData-th7JM","type":"genericNode","position":{"x":-862.5843195492909,"y":-56.71774780191424},"data":{"type":"ParseData","node":{"template":{"_type":"Component","data":{"trace_as_metadata":true,"list":false,"trace_as_input":true,"required":false,"placeholder":"","show":true,"name":"data","value":"","display_name":"Data","advanced":false,"input_types":["Data"],"dynamic":false,"info":"The data to convert to text.","title_case":false,"type":"other","_input_type":"DataInput"},"code":{"type":"code","required":true,"placeholder":"","list":false,"show":true,"multiline":true,"value":"from langflow.custom import Component\nfrom langflow.helpers.data import data_to_text\nfrom langflow.io import DataInput, MultilineInput, Output, StrInput\nfrom langflow.schema.message import Message\n\n\nclass ParseDataComponent(Component):\n display_name = \"Parse Data\"\n description = \"Convert Data into plain text following a specified template.\"\n icon = \"braces\"\n name = \"ParseData\"\n\n inputs = [\n DataInput(name=\"data\", display_name=\"Data\", info=\"The data to convert to text.\"),\n MultilineInput(\n name=\"template\",\n display_name=\"Template\",\n info=\"The template to use for formatting the data. It can contain the keys {text}, {data} or any other key in the Data.\",\n value=\"{text}\",\n ),\n StrInput(name=\"sep\", display_name=\"Separator\", advanced=True, value=\"\\n\"),\n ]\n\n outputs = [\n Output(display_name=\"Text\", name=\"text\", method=\"parse_data\"),\n ]\n\n def parse_data(self) -> Message:\n data = self.data if isinstance(self.data, list) else [self.data]\n template = self.template\n\n result_string = data_to_text(template, data, sep=self.sep)\n self.status = result_string\n return Message(text=result_string)\n","fileTypes":[],"file_path":"","password":false,"name":"code","advanced":true,"dynamic":true,"info":"","load_from_db":false,"title_case":false},"sep":{"trace_as_metadata":true,"load_from_db":false,"list":false,"required":false,"placeholder":"","show":true,"name":"sep","value":"\n","display_name":"Separator","advanced":true,"dynamic":false,"info":"","title_case":false,"type":"str","_input_type":"StrInput"},"template":{"trace_as_input":true,"multiline":true,"trace_as_metadata":true,"load_from_db":false,"list":false,"required":false,"placeholder":"","show":true,"name":"template","value":"{text}","display_name":"Template","advanced":false,"input_types":["Message"],"dynamic":false,"info":"The template to use for formatting the data. It can contain the keys {text}, {data} or any other key in the Data.","title_case":false,"type":"str","_input_type":"MultilineInput"}},"description":"Convert Data into plain text following a specified template.","icon":"braces","base_classes":["Message"],"display_name":"Parse Data","documentation":"","custom_fields":{},"output_types":[],"pinned":false,"conditional_paths":[],"frozen":false,"outputs":[{"types":["Message"],"selected":"Message","name":"text","display_name":"Text","method":"parse_data","value":"__UNDEFINED__","cache":true}],"field_order":["data","template","sep"],"beta":false,"edited":false,"lf_version":"1.0.18"},"id":"ParseData-th7JM"},"selected":false,"width":384,"height":368,"positionAbsolute":{"x":-862.5843195492909,"y":-56.71774780191424},"dragging":false}],"edges":[{"source":"AssemblyAITranscriptionJobCreator-Idt7P","sourceHandle":"{œdataTypeœ:œAssemblyAITranscriptionJobCreatorœ,œidœ:œAssemblyAITranscriptionJobCreator-Idt7Pœ,œnameœ:œtranscript_idœ,œoutput_typesœ:[œDataœ]}","target":"AssemblyAITranscriptionJobPoller-F46nf","targetHandle":"{œfieldNameœ:œtranscript_idœ,œidœ:œAssemblyAITranscriptionJobPoller-F46nfœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}","data":{"targetHandle":{"fieldName":"transcript_id","id":"AssemblyAITranscriptionJobPoller-F46nf","inputTypes":["Data"],"type":"other"},"sourceHandle":{"dataType":"AssemblyAITranscriptionJobCreator","id":"AssemblyAITranscriptionJobCreator-Idt7P","name":"transcript_id","output_types":["Data"]}},"id":"reactflow__edge-AssemblyAITranscriptionJobCreator-Idt7P{œdataTypeœ:œAssemblyAITranscriptionJobCreatorœ,œidœ:œAssemblyAITranscriptionJobCreator-Idt7Pœ,œnameœ:œtranscript_idœ,œoutput_typesœ:[œDataœ]}-AssemblyAITranscriptionJobPoller-F46nf{œfieldNameœ:œtranscript_idœ,œidœ:œAssemblyAITranscriptionJobPoller-F46nfœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}","animated":false,"className":"","selected":false},{"source":"AssemblyAITranscriptionJobPoller-F46nf","sourceHandle":"{œdataTypeœ:œAssemblyAITranscriptionJobPollerœ,œidœ:œAssemblyAITranscriptionJobPoller-F46nfœ,œnameœ:œtranscription_resultœ,œoutput_typesœ:[œDataœ]}","target":"AssemblyAIGetSubtitles-3sjU6","targetHandle":"{œfieldNameœ:œtranscription_resultœ,œidœ:œAssemblyAIGetSubtitles-3sjU6œ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}","data":{"targetHandle":{"fieldName":"transcription_result","id":"AssemblyAIGetSubtitles-3sjU6","inputTypes":["Data"],"type":"other"},"sourceHandle":{"dataType":"AssemblyAITranscriptionJobPoller","id":"AssemblyAITranscriptionJobPoller-F46nf","name":"transcription_result","output_types":["Data"]}},"id":"reactflow__edge-AssemblyAITranscriptionJobPoller-F46nf{œdataTypeœ:œAssemblyAITranscriptionJobPollerœ,œidœ:œAssemblyAITranscriptionJobPoller-F46nfœ,œnameœ:œtranscription_resultœ,œoutput_typesœ:[œDataœ]}-AssemblyAIGetSubtitles-3sjU6{œfieldNameœ:œtranscription_resultœ,œidœ:œAssemblyAIGetSubtitles-3sjU6œ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}","animated":false,"className":""},{"source":"AssemblyAITranscriptionJobPoller-F46nf","sourceHandle":"{œdataTypeœ:œAssemblyAITranscriptionJobPollerœ,œidœ:œAssemblyAITranscriptionJobPoller-F46nfœ,œnameœ:œtranscription_resultœ,œoutput_typesœ:[œDataœ]}","target":"ParseData-th7JM","targetHandle":"{œfieldNameœ:œdataœ,œidœ:œParseData-th7JMœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}","data":{"targetHandle":{"fieldName":"data","id":"ParseData-th7JM","inputTypes":["Data"],"type":"other"},"sourceHandle":{"dataType":"AssemblyAITranscriptionJobPoller","id":"AssemblyAITranscriptionJobPoller-F46nf","name":"transcription_result","output_types":["Data"]}},"id":"reactflow__edge-AssemblyAITranscriptionJobPoller-F46nf{œdataTypeœ:œAssemblyAITranscriptionJobPollerœ,œidœ:œAssemblyAITranscriptionJobPoller-F46nfœ,œnameœ:œtranscription_resultœ,œoutput_typesœ:[œDataœ]}-ParseData-th7JM{œfieldNameœ:œdataœ,œidœ:œParseData-th7JMœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}","animated":false,"className":""},{"source":"Prompt-IO8Cq","sourceHandle":"{œdataTypeœ:œPromptœ,œidœ:œPrompt-IO8Cqœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}","target":"AssemblyAILeMUR-jzwHZ","targetHandle":"{œfieldNameœ:œpromptœ,œidœ:œAssemblyAILeMUR-jzwHZœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}","data":{"targetHandle":{"fieldName":"prompt","id":"AssemblyAILeMUR-jzwHZ","inputTypes":["Message"],"type":"str"},"sourceHandle":{"dataType":"Prompt","id":"Prompt-IO8Cq","name":"prompt","output_types":["Message"]}},"id":"reactflow__edge-Prompt-IO8Cq{œdataTypeœ:œPromptœ,œidœ:œPrompt-IO8Cqœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-AssemblyAILeMUR-jzwHZ{œfieldNameœ:œpromptœ,œidœ:œAssemblyAILeMUR-jzwHZœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}","animated":false,"className":""},{"source":"AssemblyAITranscriptionJobPoller-F46nf","sourceHandle":"{œdataTypeœ:œAssemblyAITranscriptionJobPollerœ,œidœ:œAssemblyAITranscriptionJobPoller-F46nfœ,œnameœ:œtranscription_resultœ,œoutput_typesœ:[œDataœ]}","target":"AssemblyAILeMUR-jzwHZ","targetHandle":"{œfieldNameœ:œtranscription_resultœ,œidœ:œAssemblyAILeMUR-jzwHZœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}","data":{"targetHandle":{"fieldName":"transcription_result","id":"AssemblyAILeMUR-jzwHZ","inputTypes":["Data"],"type":"other"},"sourceHandle":{"dataType":"AssemblyAITranscriptionJobPoller","id":"AssemblyAITranscriptionJobPoller-F46nf","name":"transcription_result","output_types":["Data"]}},"id":"reactflow__edge-AssemblyAITranscriptionJobPoller-F46nf{œdataTypeœ:œAssemblyAITranscriptionJobPollerœ,œidœ:œAssemblyAITranscriptionJobPoller-F46nfœ,œnameœ:œtranscription_resultœ,œoutput_typesœ:[œDataœ]}-AssemblyAILeMUR-jzwHZ{œfieldNameœ:œtranscription_resultœ,œidœ:œAssemblyAILeMUR-jzwHZœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}","animated":false,"className":""}],"viewport":{"x":733.3920447354355,"y":-42.8262727047815,"zoom":0.2612816498236053}},"user_id":"9c01eee4-17dd-460e-8c52-bba36d635a9d","folder_id":"54fc9211-d42d-4c3f-a932-ee4987f61988","description":"Transcribe and analyze audio with AssemblyAI","icon_bg_color":null,"updated_at":"2024-09-26T14:55:47+00:00","webhook":false,"id":"fa69381c-d1c4-4535-bc23-bc2fb4956e1e"} \ No newline at end of file diff --git a/assets/files/AssemblyAI_Flow-9d763ba2772e4d12c09be021ad223167.json b/assets/files/AssemblyAI_Flow-9d763ba2772e4d12c09be021ad223167.json new file mode 100644 index 0000000000..d5348004f9 --- /dev/null +++ b/assets/files/AssemblyAI_Flow-9d763ba2772e4d12c09be021ad223167.json @@ -0,0 +1,1431 @@ +{ + "name": "AssemblyAI Transcription and Speech AI Flow", + "icon": null, + "is_component": false, + "endpoint_name": null, + "data": { + "nodes": [ + { + "id": "Prompt-IO8Cq", + "type": "genericNode", + "position": { + "x": -1376.3296370680628, + "y": 928.8860970980681 + }, + "data": { + "type": "Prompt", + "node": { + "template": { + "_type": "Component", + "code": { + "type": "code", + "required": true, + "placeholder": "", + "list": false, + "show": true, + "multiline": true, + "value": "from langflow.base.prompts.api_utils import process_prompt_template\nfrom langflow.custom import Component\nfrom langflow.inputs.inputs import DefaultPromptField\nfrom langflow.io import Output, PromptInput\nfrom langflow.schema.message import Message\nfrom langflow.template.utils import update_template_values\n\n\nclass PromptComponent(Component):\n display_name: str = \"Prompt\"\n description: str = \"Create a prompt template with dynamic variables.\"\n icon = \"prompts\"\n trace_type = \"prompt\"\n name = \"Prompt\"\n\n inputs = [\n PromptInput(name=\"template\", display_name=\"Template\"),\n ]\n\n outputs = [\n Output(display_name=\"Prompt Message\", name=\"prompt\", method=\"build_prompt\"),\n ]\n\n async def build_prompt(\n self,\n ) -> Message:\n prompt = await Message.from_template_and_variables(**self._attributes)\n self.status = prompt.text\n return prompt\n\n def _update_template(self, frontend_node: dict):\n prompt_template = frontend_node[\"template\"][\"template\"][\"value\"]\n custom_fields = frontend_node[\"custom_fields\"]\n frontend_node_template = frontend_node[\"template\"]\n _ = process_prompt_template(\n template=prompt_template,\n name=\"template\",\n custom_fields=custom_fields,\n frontend_node_template=frontend_node_template,\n )\n return frontend_node\n\n def post_code_processing(self, new_frontend_node: dict, current_frontend_node: dict):\n \"\"\"\n This function is called after the code validation is done.\n \"\"\"\n frontend_node = super().post_code_processing(new_frontend_node, current_frontend_node)\n template = frontend_node[\"template\"][\"template\"][\"value\"]\n # Kept it duplicated for backwards compatibility\n _ = process_prompt_template(\n template=template,\n name=\"template\",\n custom_fields=frontend_node[\"custom_fields\"],\n frontend_node_template=frontend_node[\"template\"],\n )\n # Now that template is updated, we need to grab any values that were set in the current_frontend_node\n # and update the frontend_node with those values\n update_template_values(new_template=frontend_node, previous_template=current_frontend_node[\"template\"])\n return frontend_node\n\n def _get_fallback_input(self, **kwargs):\n return DefaultPromptField(**kwargs)\n", + "fileTypes": [], + "file_path": "", + "password": false, + "name": "code", + "advanced": true, + "dynamic": true, + "info": "", + "load_from_db": false, + "title_case": false + }, + "template": { + "trace_as_input": true, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "template", + "value": "Provide a brief summary of the transcript.", + "display_name": "Template", + "advanced": false, + "dynamic": false, + "info": "", + "title_case": false, + "type": "prompt", + "_input_type": "PromptInput" + } + }, + "description": "Create a prompt template with dynamic variables.", + "icon": "prompts", + "is_input": null, + "is_output": null, + "is_composition": null, + "base_classes": [ + "Message" + ], + "name": "", + "display_name": "Prompt", + "documentation": "", + "custom_fields": { + "template": [] + }, + "output_types": [], + "full_path": null, + "pinned": false, + "conditional_paths": [], + "frozen": false, + "outputs": [ + { + "types": [ + "Message" + ], + "selected": "Message", + "name": "prompt", + "hidden": null, + "display_name": "Prompt Message", + "method": "build_prompt", + "value": "__UNDEFINED__", + "cache": true + } + ], + "field_order": [ + "template" + ], + "beta": false, + "error": null, + "edited": false, + "lf_version": "1.0.18" + }, + "id": "Prompt-IO8Cq" + }, + "selected": false, + "width": 384, + "height": 324, + "positionAbsolute": { + "x": -1376.3296370680628, + "y": 928.8860970980681 + }, + "dragging": false + }, + { + "id": "AssemblyAITranscriptionJobCreator-Idt7P", + "type": "genericNode", + "position": { + "x": -1957.7132501771657, + "y": 470.79685053457587 + }, + "data": { + "type": "AssemblyAITranscriptionJobCreator", + "node": { + "template": { + "_type": "Component", + "audio_file": { + "trace_as_metadata": true, + "file_path": "fa69381c-d1c4-4535-bc23-bc2fb4956e1e/2024-09-26_16-47-01_sports_injuries.mp3", + "fileTypes": [ + "3ga", + "8svx", + "aac", + "ac3", + "aif", + "aiff", + "alac", + "amr", + "ape", + "au", + "dss", + "flac", + "flv", + "m4a", + "m4b", + "m4p", + "m4r", + "mp3", + "mpga", + "ogg", + "oga", + "mogg", + "opus", + "qcp", + "tta", + "voc", + "wav", + "wma", + "wv", + "webm", + "mts", + "m2ts", + "ts", + "mov", + "mp2", + "mp4", + "m4p", + "m4v", + "mxf" + ], + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "audio_file", + "value": "sports_injuries.mp3", + "display_name": "Audio File", + "advanced": false, + "dynamic": false, + "info": "The audio file to transcribe", + "title_case": false, + "type": "file", + "_input_type": "FileInput", + "load_from_db": false + }, + "api_key": { + "load_from_db": false, + "required": false, + "placeholder": "", + "show": true, + "name": "api_key", + "value": null, + "display_name": "Assembly API Key", + "advanced": false, + "input_types": [ + "Message" + ], + "dynamic": false, + "info": "Your AssemblyAI API key. You can get one from https://www.assemblyai.com/", + "title_case": false, + "password": true, + "type": "str", + "_input_type": "SecretStrInput" + }, + "audio_file_url": { + "trace_as_input": true, + "trace_as_metadata": true, + "load_from_db": false, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "audio_file_url", + "value": "", + "display_name": "Audio File URL", + "advanced": true, + "input_types": [ + "Message" + ], + "dynamic": false, + "info": "The URL of the audio file to transcribe (Can be used instead of a File)", + "title_case": false, + "type": "str", + "_input_type": "MessageTextInput" + }, + "code": { + "type": "code", + "required": true, + "placeholder": "", + "list": false, + "show": true, + "multiline": true, + "value": "import os\n\nimport assemblyai as aai\nfrom loguru import logger\n\nfrom langflow.custom import Component\nfrom langflow.io import BoolInput, DropdownInput, FileInput, MessageTextInput, Output, SecretStrInput\nfrom langflow.schema import Data\n\n\nclass AssemblyAITranscriptionJobCreator(Component):\n display_name = \"AssemblyAI Start Transcript\"\n description = \"Create a transcription job for an audio file using AssemblyAI with advanced options\"\n documentation = \"https://www.assemblyai.com/docs\"\n icon = \"AssemblyAI\"\n\n inputs = [\n SecretStrInput(\n name=\"api_key\",\n display_name=\"Assembly API Key\",\n info=\"Your AssemblyAI API key. You can get one from https://www.assemblyai.com/\",\n ),\n FileInput(\n name=\"audio_file\",\n display_name=\"Audio File\",\n file_types=[\n \"3ga\",\n \"8svx\",\n \"aac\",\n \"ac3\",\n \"aif\",\n \"aiff\",\n \"alac\",\n \"amr\",\n \"ape\",\n \"au\",\n \"dss\",\n \"flac\",\n \"flv\",\n \"m4a\",\n \"m4b\",\n \"m4p\",\n \"m4r\",\n \"mp3\",\n \"mpga\",\n \"ogg\",\n \"oga\",\n \"mogg\",\n \"opus\",\n \"qcp\",\n \"tta\",\n \"voc\",\n \"wav\",\n \"wma\",\n \"wv\",\n \"webm\",\n \"mts\",\n \"m2ts\",\n \"ts\",\n \"mov\",\n \"mp2\",\n \"mp4\",\n \"m4p\",\n \"m4v\",\n \"mxf\",\n ],\n info=\"The audio file to transcribe\",\n ),\n MessageTextInput(\n name=\"audio_file_url\",\n display_name=\"Audio File URL\",\n info=\"The URL of the audio file to transcribe (Can be used instead of a File)\",\n advanced=True,\n ),\n DropdownInput(\n name=\"speech_model\",\n display_name=\"Speech Model\",\n options=[\n \"best\",\n \"nano\",\n ],\n value=\"best\",\n info=\"The speech model to use for the transcription\",\n advanced=True,\n ),\n BoolInput(\n name=\"language_detection\",\n display_name=\"Automatic Language Detection\",\n info=\"Enable automatic language detection\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"language_code\",\n display_name=\"Language\",\n info=\"\"\"\n The language of the audio file. Can be set manually if automatic language detection is disabled. \n See https://www.assemblyai.com/docs/getting-started/supported-languages for a list of supported language codes.\n \"\"\",\n advanced=True,\n ),\n BoolInput(\n name=\"speaker_labels\",\n display_name=\"Enable Speaker Labels\",\n info=\"Enable speaker diarization\",\n ),\n MessageTextInput(\n name=\"speakers_expected\",\n display_name=\"Expected Number of Speakers\",\n info=\"Set the expected number of speakers (optional, enter a number)\",\n advanced=True,\n ),\n BoolInput(\n name=\"punctuate\",\n display_name=\"Punctuate\",\n info=\"Enable automatic punctuation\",\n advanced=True,\n value=True,\n ),\n BoolInput(\n name=\"format_text\",\n display_name=\"Format Text\",\n info=\"Enable text formatting\",\n advanced=True,\n value=True,\n ),\n ]\n\n outputs = [\n Output(display_name=\"Transcript ID\", name=\"transcript_id\", method=\"create_transcription_job\"),\n ]\n\n def create_transcription_job(self) -> Data:\n aai.settings.api_key = self.api_key\n\n # Convert speakers_expected to int if it's not empty\n speakers_expected = None\n if self.speakers_expected and self.speakers_expected.strip():\n try:\n speakers_expected = int(self.speakers_expected)\n except ValueError:\n self.status = \"Error: Expected Number of Speakers must be a valid integer\"\n return Data(data={\"error\": \"Error: Expected Number of Speakers must be a valid integer\"})\n\n language_code = self.language_code if self.language_code else None\n\n config = aai.TranscriptionConfig(\n speech_model=self.speech_model,\n language_detection=self.language_detection,\n language_code=language_code,\n speaker_labels=self.speaker_labels,\n speakers_expected=speakers_expected,\n punctuate=self.punctuate,\n format_text=self.format_text,\n )\n\n audio = None\n if self.audio_file:\n if self.audio_file_url:\n logger.warning(\"Both an audio file an audio URL were specified. The audio URL was ignored.\")\n\n # Check if the file exists\n if not os.path.exists(self.audio_file):\n self.status = \"Error: Audio file not found\"\n return Data(data={\"error\": \"Error: Audio file not found\"})\n audio = self.audio_file\n elif self.audio_file_url:\n audio = self.audio_file_url\n else:\n self.status = \"Error: Either an audio file or an audio URL must be specified\"\n return Data(data={\"error\": \"Error: Either an audio file or an audio URL must be specified\"})\n\n try:\n transcript = aai.Transcriber().submit(audio, config=config)\n\n if transcript.error:\n self.status = transcript.error\n return Data(data={\"error\": transcript.error})\n else:\n result = Data(data={\"transcript_id\": transcript.id})\n self.status = result\n return result\n except Exception as e:\n self.status = f\"An error occurred: {str(e)}\"\n return Data(data={\"error\": f\"An error occurred: {str(e)}\"})\n", + "fileTypes": [], + "file_path": "", + "password": false, + "name": "code", + "advanced": true, + "dynamic": true, + "info": "", + "load_from_db": false, + "title_case": false + }, + "format_text": { + "trace_as_metadata": true, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "format_text", + "value": true, + "display_name": "Format Text", + "advanced": true, + "dynamic": false, + "info": "Enable text formatting", + "title_case": false, + "type": "bool", + "_input_type": "BoolInput" + }, + "language_code": { + "trace_as_input": true, + "trace_as_metadata": true, + "load_from_db": false, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "language_code", + "value": "", + "display_name": "Language", + "advanced": true, + "input_types": [ + "Message" + ], + "dynamic": false, + "info": "\n The language of the audio file. Can be set manually if automatic language detection is disabled. \n See https://www.assemblyai.com/docs/getting-started/supported-languages for a list of supported language codes.\n ", + "title_case": false, + "type": "str", + "_input_type": "MessageTextInput" + }, + "language_detection": { + "trace_as_metadata": true, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "language_detection", + "value": false, + "display_name": "Automatic Language Detection", + "advanced": true, + "dynamic": false, + "info": "Enable automatic language detection", + "title_case": false, + "type": "bool", + "_input_type": "BoolInput" + }, + "punctuate": { + "trace_as_metadata": true, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "punctuate", + "value": true, + "display_name": "Punctuate", + "advanced": true, + "dynamic": false, + "info": "Enable automatic punctuation", + "title_case": false, + "type": "bool", + "_input_type": "BoolInput" + }, + "speaker_labels": { + "trace_as_metadata": true, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "speaker_labels", + "value": true, + "display_name": "Enable Speaker Labels", + "advanced": false, + "dynamic": false, + "info": "Enable speaker diarization", + "title_case": false, + "type": "bool", + "_input_type": "BoolInput", + "load_from_db": false + }, + "speakers_expected": { + "trace_as_input": true, + "trace_as_metadata": true, + "load_from_db": false, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "speakers_expected", + "value": "", + "display_name": "Expected Number of Speakers", + "advanced": true, + "input_types": [ + "Message" + ], + "dynamic": false, + "info": "Set the expected number of speakers (optional, enter a number)", + "title_case": false, + "type": "str", + "_input_type": "MessageTextInput" + }, + "speech_model": { + "trace_as_metadata": true, + "options": [ + "best", + "nano" + ], + "combobox": false, + "required": false, + "placeholder": "", + "show": true, + "name": "speech_model", + "value": "best", + "display_name": "Speech Model", + "advanced": true, + "dynamic": false, + "info": "The speech model to use for the transcription", + "title_case": false, + "type": "str", + "_input_type": "DropdownInput" + } + }, + "description": "Create a transcription job for an audio file using AssemblyAI with advanced options", + "icon": "AssemblyAI", + "base_classes": [ + "Data" + ], + "display_name": "AssemblyAI Start Transcript", + "documentation": "https://www.assemblyai.com/docs", + "custom_fields": {}, + "output_types": [], + "pinned": false, + "conditional_paths": [], + "frozen": true, + "outputs": [ + { + "types": [ + "Data" + ], + "selected": "Data", + "name": "transcript_id", + "display_name": "Transcript ID", + "method": "create_transcription_job", + "value": "__UNDEFINED__", + "cache": true + } + ], + "field_order": [ + "api_key", + "audio_file", + "audio_file_url", + "speech_model", + "language_detection", + "language_code", + "speaker_labels", + "speakers_expected", + "punctuate", + "format_text" + ], + "beta": false, + "edited": false, + "lf_version": "1.0.18" + }, + "id": "AssemblyAITranscriptionJobCreator-Idt7P", + "description": "Create a transcription job for an audio file using AssemblyAI with advanced options", + "display_name": "AssemblyAI Start Transcript" + }, + "selected": false, + "width": 384, + "height": 482, + "positionAbsolute": { + "x": -1957.7132501771657, + "y": 470.79685053457587 + }, + "dragging": false + }, + { + "id": "AssemblyAITranscriptionJobPoller-F46nf", + "type": "genericNode", + "position": { + "x": -1408.0967182254753, + "y": 461.5039554434261 + }, + "data": { + "type": "AssemblyAITranscriptionJobPoller", + "node": { + "template": { + "_type": "Component", + "transcript_id": { + "trace_as_metadata": true, + "list": false, + "trace_as_input": true, + "required": false, + "placeholder": "", + "show": true, + "name": "transcript_id", + "value": "", + "display_name": "Transcript ID", + "advanced": false, + "input_types": [ + "Data" + ], + "dynamic": false, + "info": "The ID of the transcription job to poll", + "title_case": false, + "type": "other", + "_input_type": "DataInput" + }, + "api_key": { + "load_from_db": false, + "required": false, + "placeholder": "", + "show": true, + "name": "api_key", + "value": null, + "display_name": "Assembly API Key", + "advanced": false, + "input_types": [ + "Message" + ], + "dynamic": false, + "info": "Your AssemblyAI API key. You can get one from https://www.assemblyai.com/", + "title_case": false, + "password": true, + "type": "str", + "_input_type": "SecretStrInput" + }, + "code": { + "type": "code", + "required": true, + "placeholder": "", + "list": false, + "show": true, + "multiline": true, + "value": "import assemblyai as aai\n\nfrom langflow.custom import Component\nfrom langflow.io import DataInput, FloatInput, Output, SecretStrInput\nfrom langflow.schema import Data\n\n\nclass AssemblyAITranscriptionJobPoller(Component):\n display_name = \"AssemblyAI Poll Transcript\"\n description = \"Poll for the status of a transcription job using AssemblyAI\"\n documentation = \"https://www.assemblyai.com/docs\"\n icon = \"AssemblyAI\"\n\n inputs = [\n SecretStrInput(\n name=\"api_key\",\n display_name=\"Assembly API Key\",\n info=\"Your AssemblyAI API key. You can get one from https://www.assemblyai.com/\",\n ),\n DataInput(\n name=\"transcript_id\",\n display_name=\"Transcript ID\",\n info=\"The ID of the transcription job to poll\",\n ),\n FloatInput(\n name=\"polling_interval\",\n display_name=\"Polling Interval\",\n value=3.0,\n info=\"The polling interval in seconds\",\n advanced=True,\n ),\n ]\n\n outputs = [\n Output(display_name=\"Transcription Result\", name=\"transcription_result\", method=\"poll_transcription_job\"),\n ]\n\n def poll_transcription_job(self) -> Data:\n \"\"\"Polls the transcription status until completion and returns the Data.\"\"\"\n aai.settings.api_key = self.api_key\n aai.settings.polling_interval = self.polling_interval\n\n # check if it's an error message from the previous step\n if self.transcript_id.data.get(\"error\"):\n self.status = self.transcript_id.data[\"error\"]\n return self.transcript_id\n\n try:\n transcript = aai.Transcript.get_by_id(self.transcript_id.data[\"transcript_id\"])\n except Exception as e:\n error = f\"Getting transcription failed: {str(e)}\"\n self.status = error\n return Data(data={\"error\": error})\n\n if transcript.status == aai.TranscriptStatus.completed:\n json_response = transcript.json_response\n text = json_response.pop(\"text\", None)\n utterances = json_response.pop(\"utterances\", None)\n transcript_id = json_response.pop(\"id\", None)\n sorted_data = { \"text\": text, \"utterances\": utterances, \"id\": transcript_id}\n sorted_data.update(json_response)\n data = Data(data=sorted_data)\n self.status = data\n return data\n else:\n self.status = transcript.error\n return Data(data={\"error\": transcript.error})\n", + "fileTypes": [], + "file_path": "", + "password": false, + "name": "code", + "advanced": true, + "dynamic": true, + "info": "", + "load_from_db": false, + "title_case": false + }, + "polling_interval": { + "trace_as_metadata": true, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "polling_interval", + "value": 3, + "display_name": "Polling Interval", + "advanced": true, + "dynamic": false, + "info": "The polling interval in seconds", + "title_case": false, + "type": "float", + "_input_type": "FloatInput" + } + }, + "description": "Poll for the status of a transcription job using AssemblyAI", + "icon": "AssemblyAI", + "base_classes": [ + "Data" + ], + "display_name": "AssemblyAI Poll Transcript", + "documentation": "https://www.assemblyai.com/docs", + "custom_fields": {}, + "output_types": [], + "pinned": false, + "conditional_paths": [], + "frozen": false, + "outputs": [ + { + "types": [ + "Data" + ], + "selected": "Data", + "name": "transcription_result", + "display_name": "Transcription Result", + "method": "poll_transcription_job", + "value": "__UNDEFINED__", + "cache": true + } + ], + "field_order": [ + "api_key", + "transcript_id", + "polling_interval" + ], + "beta": false, + "edited": false, + "lf_version": "1.0.18" + }, + "id": "AssemblyAITranscriptionJobPoller-F46nf", + "description": "Poll for the status of a transcription job using AssemblyAI", + "display_name": "AssemblyAI Poll Transcript" + }, + "selected": false, + "width": 384, + "height": 368, + "positionAbsolute": { + "x": -1408.0967182254753, + "y": 461.5039554434261 + }, + "dragging": false + }, + { + "id": "AssemblyAIGetSubtitles-3sjU6", + "type": "genericNode", + "position": { + "x": -867.5862690424032, + "y": 368.91683022842676 + }, + "data": { + "type": "AssemblyAIGetSubtitles", + "node": { + "template": { + "_type": "Component", + "transcription_result": { + "trace_as_metadata": true, + "list": false, + "trace_as_input": true, + "required": false, + "placeholder": "", + "show": true, + "name": "transcription_result", + "value": "", + "display_name": "Transcription Result", + "advanced": false, + "input_types": [ + "Data" + ], + "dynamic": false, + "info": "The transcription result from AssemblyAI", + "title_case": false, + "type": "other", + "_input_type": "DataInput" + }, + "api_key": { + "load_from_db": false, + "required": false, + "placeholder": "", + "show": true, + "name": "api_key", + "value": null, + "display_name": "Assembly API Key", + "advanced": false, + "input_types": [ + "Message" + ], + "dynamic": false, + "info": "Your AssemblyAI API key. You can get one from https://www.assemblyai.com/", + "title_case": false, + "password": true, + "type": "str", + "_input_type": "SecretStrInput" + }, + "chars_per_caption": { + "trace_as_metadata": true, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "chars_per_caption", + "value": 0, + "display_name": "Characters per Caption", + "advanced": true, + "dynamic": false, + "info": "The maximum number of characters per caption (0 for no limit)", + "title_case": false, + "type": "int", + "_input_type": "IntInput" + }, + "code": { + "type": "code", + "required": true, + "placeholder": "", + "list": false, + "show": true, + "multiline": true, + "value": "import assemblyai as aai\n\nfrom langflow.custom import Component\nfrom langflow.io import DataInput, DropdownInput, IntInput, Output, SecretStrInput\nfrom langflow.schema import Data\n\n\nclass AssemblyAIGetSubtitles(Component):\n display_name = \"AssemblyAI Get Subtitles\"\n description = \"Export your transcript in SRT or VTT format for subtitles and closed captions\"\n documentation = \"https://www.assemblyai.com/docs\"\n icon = \"AssemblyAI\"\n\n inputs = [\n SecretStrInput(\n name=\"api_key\",\n display_name=\"Assembly API Key\",\n info=\"Your AssemblyAI API key. You can get one from https://www.assemblyai.com/\",\n ),\n DataInput(\n name=\"transcription_result\",\n display_name=\"Transcription Result\",\n info=\"The transcription result from AssemblyAI\",\n ),\n DropdownInput(\n name=\"subtitle_format\",\n display_name=\"Subtitle Format\",\n options=[\"srt\", \"vtt\"],\n value=\"srt\",\n info=\"The format of the captions (SRT or VTT)\",\n ),\n IntInput(\n name=\"chars_per_caption\",\n display_name=\"Characters per Caption\",\n info=\"The maximum number of characters per caption (0 for no limit)\",\n value=0,\n advanced=True,\n ),\n ]\n\n outputs = [\n Output(display_name=\"Subtitles\", name=\"subtitles\", method=\"get_subtitles\"),\n ]\n\n def get_subtitles(self) -> Data:\n aai.settings.api_key = self.api_key\n\n # check if it's an error message from the previous step\n if self.transcription_result.data.get(\"error\"):\n self.status = self.transcription_result.data[\"error\"]\n return self.transcription_result\n\n try:\n transcript_id = self.transcription_result.data[\"id\"]\n transcript = aai.Transcript.get_by_id(transcript_id)\n except Exception as e:\n error = f\"Getting transcription failed: {str(e)}\"\n self.status = error\n return Data(data={\"error\": error})\n\n if transcript.status == aai.TranscriptStatus.completed:\n subtitles = None\n chars_per_caption = self.chars_per_caption if self.chars_per_caption > 0 else None\n if self.subtitle_format == \"srt\":\n subtitles = transcript.export_subtitles_srt(chars_per_caption)\n else:\n subtitles = transcript.export_subtitles_vtt(chars_per_caption)\n\n result = Data(\n subtitles=subtitles,\n format=self.subtitle_format,\n transcript_id=transcript_id,\n chars_per_caption=chars_per_caption,\n )\n\n self.status = result\n return result\n else:\n self.status = transcript.error\n return Data(data={\"error\": transcript.error})\n", + "fileTypes": [], + "file_path": "", + "password": false, + "name": "code", + "advanced": true, + "dynamic": true, + "info": "", + "load_from_db": false, + "title_case": false + }, + "subtitle_format": { + "trace_as_metadata": true, + "options": [ + "srt", + "vtt" + ], + "combobox": false, + "required": false, + "placeholder": "", + "show": true, + "name": "subtitle_format", + "value": "srt", + "display_name": "Subtitle Format", + "advanced": false, + "dynamic": false, + "info": "The format of the captions (SRT or VTT)", + "title_case": false, + "type": "str", + "_input_type": "DropdownInput" + } + }, + "description": "Export your transcript in SRT or VTT format for subtitles and closed captions", + "icon": "AssemblyAI", + "base_classes": [ + "Data" + ], + "display_name": "AssemblyAI Get Subtitles", + "documentation": "https://www.assemblyai.com/docs", + "custom_fields": {}, + "output_types": [], + "pinned": false, + "conditional_paths": [], + "frozen": false, + "outputs": [ + { + "types": [ + "Data" + ], + "selected": "Data", + "name": "subtitles", + "display_name": "Subtitles", + "method": "get_subtitles", + "value": "__UNDEFINED__", + "cache": true + } + ], + "field_order": [ + "api_key", + "transcription_result", + "subtitle_format", + "chars_per_caption" + ], + "beta": false, + "edited": false, + "lf_version": "1.0.18" + }, + "id": "AssemblyAIGetSubtitles-3sjU6", + "description": "Export your transcript in SRT or VTT format for subtitles and closed captions", + "display_name": "AssemblyAI Get Subtitles" + }, + "selected": false, + "width": 384, + "height": 454, + "positionAbsolute": { + "x": -867.5862690424032, + "y": 368.91683022842676 + }, + "dragging": false + }, + { + "id": "AssemblyAIListTranscripts-3prc4", + "type": "genericNode", + "position": { + "x": -380.99808133361984, + "y": 401.2674645310267 + }, + "data": { + "type": "AssemblyAIListTranscripts", + "node": { + "template": { + "_type": "Component", + "api_key": { + "load_from_db": false, + "required": false, + "placeholder": "", + "show": true, + "name": "api_key", + "value": null, + "display_name": "Assembly API Key", + "advanced": false, + "input_types": [ + "Message" + ], + "dynamic": false, + "info": "Your AssemblyAI API key. You can get one from https://www.assemblyai.com/", + "title_case": false, + "password": true, + "type": "str", + "_input_type": "SecretStrInput" + }, + "code": { + "type": "code", + "required": true, + "placeholder": "", + "list": false, + "show": true, + "multiline": true, + "value": "import assemblyai as aai\n\nfrom langflow.custom import Component\nfrom langflow.io import BoolInput, DropdownInput, IntInput, MessageTextInput, Output, SecretStrInput\nfrom langflow.schema import Data\n\n\nclass AssemblyAIListTranscripts(Component):\n display_name = \"AssemblyAI List Transcripts\"\n description = \"Retrieve a list of transcripts from AssemblyAI with filtering options\"\n documentation = \"https://www.assemblyai.com/docs\"\n icon = \"AssemblyAI\"\n\n inputs = [\n SecretStrInput(\n name=\"api_key\",\n display_name=\"Assembly API Key\",\n info=\"Your AssemblyAI API key. You can get one from https://www.assemblyai.com/\",\n ),\n IntInput(\n name=\"limit\",\n display_name=\"Limit\",\n info=\"Maximum number of transcripts to retrieve (default: 20, use 0 for all)\",\n value=20,\n ),\n DropdownInput(\n name=\"status_filter\",\n display_name=\"Status Filter\",\n options=[\"all\", \"queued\", \"processing\", \"completed\", \"error\"],\n value=\"all\",\n info=\"Filter by transcript status\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"created_on\",\n display_name=\"Created On\",\n info=\"Only get transcripts created on this date (YYYY-MM-DD)\",\n advanced=True,\n ),\n BoolInput(\n name=\"throttled_only\",\n display_name=\"Throttled Only\",\n info=\"Only get throttled transcripts, overrides the status filter\",\n advanced=True,\n ),\n ]\n\n outputs = [\n Output(display_name=\"Transcript List\", name=\"transcript_list\", method=\"list_transcripts\"),\n ]\n\n def list_transcripts(self) -> list[Data]:\n aai.settings.api_key = self.api_key\n\n params = aai.ListTranscriptParameters()\n if self.limit:\n params.limit = self.limit\n if self.status_filter != \"all\":\n params.status = self.status_filter\n if self.created_on and self.created_on.text:\n params.created_on = self.created_on.text\n if self.throttled_only:\n params.throttled_only = True\n\n try:\n transcriber = aai.Transcriber()\n\n def convert_page_to_data_list(page):\n return [Data(**t.dict()) for t in page.transcripts]\n\n if self.limit == 0:\n # paginate over all pages\n params.limit = 100\n page = transcriber.list_transcripts(params)\n transcripts = convert_page_to_data_list(page)\n\n while page.page_details.before_id_of_prev_url is not None:\n params.before_id = page.page_details.before_id_of_prev_url\n page = transcriber.list_transcripts(params)\n transcripts.extend(convert_page_to_data_list(page))\n else:\n # just one page\n page = transcriber.list_transcripts(params)\n transcripts = convert_page_to_data_list(page)\n\n self.status = transcripts\n return transcripts\n except Exception as e:\n error_data = Data(data={\"error\": f\"An error occurred: {str(e)}\"})\n self.status = [error_data]\n return [error_data]\n", + "fileTypes": [], + "file_path": "", + "password": false, + "name": "code", + "advanced": true, + "dynamic": true, + "info": "", + "load_from_db": false, + "title_case": false + }, + "created_on": { + "trace_as_input": true, + "trace_as_metadata": true, + "load_from_db": false, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "created_on", + "value": "", + "display_name": "Created On", + "advanced": true, + "input_types": [ + "Message" + ], + "dynamic": false, + "info": "Only get transcripts created on this date (YYYY-MM-DD)", + "title_case": false, + "type": "str", + "_input_type": "MessageTextInput" + }, + "limit": { + "trace_as_metadata": true, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "limit", + "value": 20, + "display_name": "Limit", + "advanced": false, + "dynamic": false, + "info": "Maximum number of transcripts to retrieve (default: 20, use 0 for all)", + "title_case": false, + "type": "int", + "_input_type": "IntInput" + }, + "status_filter": { + "trace_as_metadata": true, + "options": [ + "all", + "queued", + "processing", + "completed", + "error" + ], + "combobox": false, + "required": false, + "placeholder": "", + "show": true, + "name": "status_filter", + "value": "all", + "display_name": "Status Filter", + "advanced": true, + "dynamic": false, + "info": "Filter by transcript status", + "title_case": false, + "type": "str", + "_input_type": "DropdownInput" + }, + "throttled_only": { + "trace_as_metadata": true, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "throttled_only", + "value": false, + "display_name": "Throttled Only", + "advanced": true, + "dynamic": false, + "info": "Only get throttled transcripts, overrides the status filter", + "title_case": false, + "type": "bool", + "_input_type": "BoolInput" + } + }, + "description": "Retrieve a list of transcripts from AssemblyAI with filtering options", + "icon": "AssemblyAI", + "base_classes": [ + "Data" + ], + "display_name": "AssemblyAI List Transcripts", + "documentation": "https://www.assemblyai.com/docs", + "custom_fields": {}, + "output_types": [], + "pinned": false, + "conditional_paths": [], + "frozen": false, + "outputs": [ + { + "types": [ + "Data" + ], + "selected": "Data", + "name": "transcript_list", + "display_name": "Transcript List", + "method": "list_transcripts", + "value": "__UNDEFINED__", + "cache": true + } + ], + "field_order": [ + "api_key", + "limit", + "status_filter", + "created_on", + "throttled_only" + ], + "beta": false, + "edited": false, + "lf_version": "1.0.18" + }, + "id": "AssemblyAIListTranscripts-3prc4", + "description": "Retrieve a list of transcripts from AssemblyAI with filtering options", + "display_name": "AssemblyAI List Transcripts" + }, + "selected": false, + "width": 384, + "height": 410, + "positionAbsolute": { + "x": -380.99808133361984, + "y": 401.2674645310267 + }, + "dragging": false + }, + { + "id": "AssemblyAILeMUR-jzwHZ", + "type": "genericNode", + "position": { + "x": -875.6482330011189, + "y": 887.1705799007382 + }, + "data": { + "type": "AssemblyAILeMUR", + "node": { + "template": { + "_type": "Component", + "transcription_result": { + "trace_as_metadata": true, + "list": false, + "trace_as_input": true, + "required": false, + "placeholder": "", + "show": true, + "name": "transcription_result", + "value": "", + "display_name": "Transcription Result", + "advanced": false, + "input_types": [ + "Data" + ], + "dynamic": false, + "info": "The transcription result from AssemblyAI", + "title_case": false, + "type": "other", + "_input_type": "DataInput" + }, + "api_key": { + "load_from_db": false, + "required": false, + "placeholder": "", + "show": true, + "name": "api_key", + "value": null, + "display_name": "Assembly API Key", + "advanced": false, + "input_types": [ + "Message" + ], + "dynamic": false, + "info": "Your AssemblyAI API key. You can get one from https://www.assemblyai.com/", + "title_case": false, + "password": true, + "type": "str", + "_input_type": "SecretStrInput" + }, + "code": { + "type": "code", + "required": true, + "placeholder": "", + "list": false, + "show": true, + "multiline": true, + "value": "import assemblyai as aai\n\nfrom langflow.custom import Component\nfrom langflow.io import DataInput, DropdownInput, FloatInput, IntInput, MultilineInput, Output, SecretStrInput\nfrom langflow.schema import Data\n\n\nclass AssemblyAILeMUR(Component):\n display_name = \"AssemblyAI LeMUR\"\n description = \"Apply Large Language Models to spoken data using the AssemblyAI LeMUR framework\"\n documentation = \"https://www.assemblyai.com/docs/lemur\"\n icon = \"AssemblyAI\"\n\n inputs = [\n SecretStrInput(\n name=\"api_key\",\n display_name=\"Assembly API Key\",\n info=\"Your AssemblyAI API key. You can get one from https://www.assemblyai.com/\",\n advanced=False,\n ),\n DataInput(\n name=\"transcription_result\",\n display_name=\"Transcription Result\",\n info=\"The transcription result from AssemblyAI\",\n ),\n MultilineInput(\n name=\"prompt\",\n display_name=\"Input Prompt\",\n info=\"The text to prompt the model\",\n ),\n DropdownInput(\n name=\"final_model\",\n display_name=\"Final Model\",\n options=[\"claude3_5_sonnet\", \"claude3_opus\", \"claude3_haiku\", \"claude3_sonnet\"],\n value=\"claude3_5_sonnet\",\n info=\"The model that is used for the final prompt after compression is performed\",\n advanced=True,\n ),\n FloatInput(\n name=\"temperature\",\n display_name=\"Temperature\",\n advanced=True,\n value=0.0,\n info=\"The temperature to use for the model\",\n ),\n IntInput(\n name=\"max_output_size\",\n display_name=\" Max Output Size\",\n advanced=True,\n value=2000,\n info=\"Max output size in tokens, up to 4000\",\n ),\n DropdownInput(\n name=\"endpoint\",\n display_name=\"Endpoint\",\n options=[\"task\", \"summary\", \"question-answer\"],\n value=\"task\",\n info=\"The LeMUR endpoint to use. For 'summary' and 'question-answer', no prompt input is needed. See https://www.assemblyai.com/docs/api-reference/lemur/ for more info.\",\n advanced=True,\n ),\n MultilineInput(\n name=\"questions\",\n display_name=\"Questions\",\n info=\"Comma-separated list of your questions. Only used if Endpoint is 'question-answer'\",\n advanced=True,\n ),\n MultilineInput(\n name=\"transcript_ids\",\n display_name=\"Transcript IDs\",\n info=\"Comma-separated list of transcript IDs. LeMUR can perform actions over multiple transcripts. If provided, the Transcription Result is ignored.\",\n advanced=True,\n ),\n ]\n\n outputs = [\n Output(display_name=\"LeMUR Response\", name=\"lemur_response\", method=\"run_lemur\"),\n ]\n\n def run_lemur(self) -> Data:\n \"\"\"Use the LeMUR task endpoint to input the LLM prompt.\"\"\"\n aai.settings.api_key = self.api_key\n\n if not self.transcription_result and not self.transcript_ids:\n error = \"Either a Transcription Result or Transcript IDs must be provided\"\n self.status = error\n return Data(data={\"error\": error})\n elif self.transcription_result and self.transcription_result.data.get(\"error\"):\n # error message from the previous step\n self.status = self.transcription_result.data[\"error\"]\n return self.transcription_result\n elif self.endpoint == \"task\" and not self.prompt:\n self.status = \"No prompt specified for the task endpoint\"\n return Data(data={\"error\": \"No prompt specified\"})\n elif self.endpoint == \"question-answer\" and not self.questions:\n error = \"No Questions were provided for the question-answer endpoint\"\n self.status = error\n return Data(data={\"error\": error})\n\n # Check for valid transcripts\n transcript_ids = None\n if self.transcription_result and \"id\" in self.transcription_result.data:\n transcript_ids = [self.transcription_result.data[\"id\"]]\n elif self.transcript_ids:\n transcript_ids = self.transcript_ids.split(\",\")\n transcript_ids = [t.strip() for t in transcript_ids]\n \n if not transcript_ids:\n error = \"Either a valid Transcription Result or valid Transcript IDs must be provided\"\n self.status = error\n return Data(data={\"error\": error})\n\n # Get TranscriptGroup and check if there is any error\n transcript_group = aai.TranscriptGroup(transcript_ids=transcript_ids)\n transcript_group, failures = transcript_group.wait_for_completion(return_failures=True)\n if failures:\n error = f\"Getting transcriptions failed: {failures[0]}\"\n self.status = error\n return Data(data={\"error\": error})\n \n for t in transcript_group.transcripts:\n if t.status == aai.TranscriptStatus.error:\n self.status = t.error\n return Data(data={\"error\": t.error})\n\n # Perform LeMUR action\n try:\n response = self.perform_lemur_action(transcript_group, self.endpoint)\n result = Data(data=response)\n self.status = result\n return result\n except Exception as e:\n error = f\"An Error happened: {str(e)}\"\n self.status = error\n return Data(data={\"error\": error})\n\n def perform_lemur_action(self, transcript_group: aai.TranscriptGroup, endpoint: str) -> dict:\n print(\"Endpoint:\", endpoint, type(endpoint))\n if endpoint == \"task\":\n result = transcript_group.lemur.task(\n prompt=self.prompt,\n final_model=self.get_final_model(self.final_model),\n temperature=self.temperature,\n max_output_size=self.max_output_size,\n )\n elif endpoint == \"summary\":\n result = transcript_group.lemur.summarize(\n final_model=self.get_final_model(self.final_model),\n temperature=self.temperature,\n max_output_size=self.max_output_size,\n )\n elif endpoint == \"question-answer\":\n questions = self.questions.split(\",\")\n questions = [aai.LemurQuestion(question=q) for q in questions]\n result = transcript_group.lemur.question(\n questions=questions,\n final_model=self.get_final_model(self.final_model),\n temperature=self.temperature,\n max_output_size=self.max_output_size,\n )\n else:\n raise ValueError(f\"Endpoint not supported: {endpoint}\")\n\n return result.dict()\n \n def get_final_model(self, model_name: str) -> aai.LemurModel:\n if model_name == \"claude3_5_sonnet\":\n return aai.LemurModel.claude3_5_sonnet\n elif model_name == \"claude3_opus\":\n return aai.LemurModel.claude3_opus\n elif model_name == \"claude3_haiku\":\n return aai.LemurModel.claude3_haiku\n elif model_name == \"claude3_sonnet\":\n return aai.LemurModel.claude3_sonnet\n else:\n raise ValueError(f\"Model name not supported: {model_name}\")\n", + "fileTypes": [], + "file_path": "", + "password": false, + "name": "code", + "advanced": true, + "dynamic": true, + "info": "", + "load_from_db": false, + "title_case": false + }, + "endpoint": { + "trace_as_metadata": true, + "options": [ + "task", + "summary", + "question-answer" + ], + "combobox": false, + "required": false, + "placeholder": "", + "show": true, + "name": "endpoint", + "value": "task", + "display_name": "Endpoint", + "advanced": true, + "dynamic": false, + "info": "The LeMUR endpoint to use. For 'summary' and 'question-answer', no prompt input is needed. See https://www.assemblyai.com/docs/api-reference/lemur/ for more info.", + "title_case": false, + "type": "str", + "_input_type": "DropdownInput" + }, + "final_model": { + "trace_as_metadata": true, + "options": [ + "claude3_5_sonnet", + "claude3_opus", + "claude3_haiku", + "claude3_sonnet" + ], + "combobox": false, + "required": false, + "placeholder": "", + "show": true, + "name": "final_model", + "value": "claude3_5_sonnet", + "display_name": "Final Model", + "advanced": true, + "dynamic": false, + "info": "The model that is used for the final prompt after compression is performed", + "title_case": false, + "type": "str", + "_input_type": "DropdownInput" + }, + "max_output_size": { + "trace_as_metadata": true, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "max_output_size", + "value": 2000, + "display_name": " Max Output Size", + "advanced": true, + "dynamic": false, + "info": "Max output size in tokens, up to 4000", + "title_case": false, + "type": "int", + "_input_type": "IntInput" + }, + "prompt": { + "trace_as_input": true, + "multiline": true, + "trace_as_metadata": true, + "load_from_db": false, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "prompt", + "value": "", + "display_name": "Input Prompt", + "advanced": false, + "input_types": [ + "Message" + ], + "dynamic": false, + "info": "The text to prompt the model", + "title_case": false, + "type": "str", + "_input_type": "MultilineInput" + }, + "questions": { + "trace_as_input": true, + "multiline": true, + "trace_as_metadata": true, + "load_from_db": false, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "questions", + "value": "", + "display_name": "Questions", + "advanced": true, + "input_types": [ + "Message" + ], + "dynamic": false, + "info": "Comma-separated list of your questions. Only used if Endpoint is 'question-answer'", + "title_case": false, + "type": "str", + "_input_type": "MultilineInput" + }, + "temperature": { + "trace_as_metadata": true, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "temperature", + "value": 0, + "display_name": "Temperature", + "advanced": true, + "dynamic": false, + "info": "The temperature to use for the model", + "title_case": false, + "type": "float", + "_input_type": "FloatInput" + }, + "transcript_ids": { + "trace_as_input": true, + "multiline": true, + "trace_as_metadata": true, + "load_from_db": false, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "transcript_ids", + "value": "", + "display_name": "Transcript IDs", + "advanced": true, + "input_types": [ + "Message" + ], + "dynamic": false, + "info": "Comma-separated list of transcript IDs. LeMUR can perform actions over multiple transcripts. If provided, the Transcription Result is ignored.", + "title_case": false, + "type": "str", + "_input_type": "MultilineInput" + } + }, + "description": "Apply Large Language Models to spoken data using the AssemblyAI LeMUR framework", + "icon": "AssemblyAI", + "base_classes": [ + "Data" + ], + "display_name": "AssemblyAI LeMUR", + "documentation": "https://www.assemblyai.com/docs/lemur", + "custom_fields": {}, + "output_types": [], + "pinned": false, + "conditional_paths": [], + "frozen": false, + "outputs": [ + { + "types": [ + "Data" + ], + "selected": "Data", + "name": "lemur_response", + "display_name": "LeMUR Response", + "method": "run_lemur", + "value": "__UNDEFINED__", + "cache": true + } + ], + "field_order": [ + "api_key", + "transcription_result", + "prompt", + "final_model", + "temperature", + "max_output_size", + "endpoint", + "questions", + "transcript_ids" + ], + "beta": false, + "edited": false, + "lf_version": "1.0.18" + }, + "id": "AssemblyAILeMUR-jzwHZ", + "description": "Apply Large Language Models to spoken data using the AssemblyAI LeMUR framework", + "display_name": "AssemblyAI LeMUR" + }, + "selected": false, + "width": 384, + "height": 454, + "positionAbsolute": { + "x": -875.6482330011189, + "y": 887.1705799007382 + }, + "dragging": false + }, + { + "id": "ParseData-th7JM", + "type": "genericNode", + "position": { + "x": -862.5843195492909, + "y": -56.71774780191424 + }, + "data": { + "type": "ParseData", + "node": { + "template": { + "_type": "Component", + "data": { + "trace_as_metadata": true, + "list": false, + "trace_as_input": true, + "required": false, + "placeholder": "", + "show": true, + "name": "data", + "value": "", + "display_name": "Data", + "advanced": false, + "input_types": [ + "Data" + ], + "dynamic": false, + "info": "The data to convert to text.", + "title_case": false, + "type": "other", + "_input_type": "DataInput" + }, + "code": { + "type": "code", + "required": true, + "placeholder": "", + "list": false, + "show": true, + "multiline": true, + "value": "from langflow.custom import Component\nfrom langflow.helpers.data import data_to_text\nfrom langflow.io import DataInput, MultilineInput, Output, StrInput\nfrom langflow.schema.message import Message\n\n\nclass ParseDataComponent(Component):\n display_name = \"Parse Data\"\n description = \"Convert Data into plain text following a specified template.\"\n icon = \"braces\"\n name = \"ParseData\"\n\n inputs = [\n DataInput(name=\"data\", display_name=\"Data\", info=\"The data to convert to text.\"),\n MultilineInput(\n name=\"template\",\n display_name=\"Template\",\n info=\"The template to use for formatting the data. It can contain the keys {text}, {data} or any other key in the Data.\",\n value=\"{text}\",\n ),\n StrInput(name=\"sep\", display_name=\"Separator\", advanced=True, value=\"\\n\"),\n ]\n\n outputs = [\n Output(display_name=\"Text\", name=\"text\", method=\"parse_data\"),\n ]\n\n def parse_data(self) -> Message:\n data = self.data if isinstance(self.data, list) else [self.data]\n template = self.template\n\n result_string = data_to_text(template, data, sep=self.sep)\n self.status = result_string\n return Message(text=result_string)\n", + "fileTypes": [], + "file_path": "", + "password": false, + "name": "code", + "advanced": true, + "dynamic": true, + "info": "", + "load_from_db": false, + "title_case": false + }, + "sep": { + "trace_as_metadata": true, + "load_from_db": false, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "sep", + "value": "\n", + "display_name": "Separator", + "advanced": true, + "dynamic": false, + "info": "", + "title_case": false, + "type": "str", + "_input_type": "StrInput" + }, + "template": { + "trace_as_input": true, + "multiline": true, + "trace_as_metadata": true, + "load_from_db": false, + "list": false, + "required": false, + "placeholder": "", + "show": true, + "name": "template", + "value": "{text}", + "display_name": "Template", + "advanced": false, + "input_types": [ + "Message" + ], + "dynamic": false, + "info": "The template to use for formatting the data. It can contain the keys {text}, {data} or any other key in the Data.", + "title_case": false, + "type": "str", + "_input_type": "MultilineInput" + } + }, + "description": "Convert Data into plain text following a specified template.", + "icon": "braces", + "base_classes": [ + "Message" + ], + "display_name": "Parse Data", + "documentation": "", + "custom_fields": {}, + "output_types": [], + "pinned": false, + "conditional_paths": [], + "frozen": false, + "outputs": [ + { + "types": [ + "Message" + ], + "selected": "Message", + "name": "text", + "display_name": "Text", + "method": "parse_data", + "value": "__UNDEFINED__", + "cache": true + } + ], + "field_order": [ + "data", + "template", + "sep" + ], + "beta": false, + "edited": false, + "lf_version": "1.0.18" + }, + "id": "ParseData-th7JM" + }, + "selected": false, + "width": 384, + "height": 368, + "positionAbsolute": { + "x": -862.5843195492909, + "y": -56.71774780191424 + }, + "dragging": false + } + ], + "edges": [ + { + "source": "AssemblyAITranscriptionJobCreator-Idt7P", + "sourceHandle": "{œdataTypeœ:œAssemblyAITranscriptionJobCreatorœ,œidœ:œAssemblyAITranscriptionJobCreator-Idt7Pœ,œnameœ:œtranscript_idœ,œoutput_typesœ:[œDataœ]}", + "target": "AssemblyAITranscriptionJobPoller-F46nf", + "targetHandle": "{œfieldNameœ:œtranscript_idœ,œidœ:œAssemblyAITranscriptionJobPoller-F46nfœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}", + "data": { + "targetHandle": { + "fieldName": "transcript_id", + "id": "AssemblyAITranscriptionJobPoller-F46nf", + "inputTypes": [ + "Data" + ], + "type": "other" + }, + "sourceHandle": { + "dataType": "AssemblyAITranscriptionJobCreator", + "id": "AssemblyAITranscriptionJobCreator-Idt7P", + "name": "transcript_id", + "output_types": [ + "Data" + ] + } + }, + "id": "reactflow__edge-AssemblyAITranscriptionJobCreator-Idt7P{œdataTypeœ:œAssemblyAITranscriptionJobCreatorœ,œidœ:œAssemblyAITranscriptionJobCreator-Idt7Pœ,œnameœ:œtranscript_idœ,œoutput_typesœ:[œDataœ]}-AssemblyAITranscriptionJobPoller-F46nf{œfieldNameœ:œtranscript_idœ,œidœ:œAssemblyAITranscriptionJobPoller-F46nfœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}", + "animated": false, + "className": "", + "selected": false + }, + { + "source": "AssemblyAITranscriptionJobPoller-F46nf", + "sourceHandle": "{œdataTypeœ:œAssemblyAITranscriptionJobPollerœ,œidœ:œAssemblyAITranscriptionJobPoller-F46nfœ,œnameœ:œtranscription_resultœ,œoutput_typesœ:[œDataœ]}", + "target": "AssemblyAIGetSubtitles-3sjU6", + "targetHandle": "{œfieldNameœ:œtranscription_resultœ,œidœ:œAssemblyAIGetSubtitles-3sjU6œ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}", + "data": { + "targetHandle": { + "fieldName": "transcription_result", + "id": "AssemblyAIGetSubtitles-3sjU6", + "inputTypes": [ + "Data" + ], + "type": "other" + }, + "sourceHandle": { + "dataType": "AssemblyAITranscriptionJobPoller", + "id": "AssemblyAITranscriptionJobPoller-F46nf", + "name": "transcription_result", + "output_types": [ + "Data" + ] + } + }, + "id": "reactflow__edge-AssemblyAITranscriptionJobPoller-F46nf{œdataTypeœ:œAssemblyAITranscriptionJobPollerœ,œidœ:œAssemblyAITranscriptionJobPoller-F46nfœ,œnameœ:œtranscription_resultœ,œoutput_typesœ:[œDataœ]}-AssemblyAIGetSubtitles-3sjU6{œfieldNameœ:œtranscription_resultœ,œidœ:œAssemblyAIGetSubtitles-3sjU6œ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}", + "animated": false, + "className": "" + }, + { + "source": "AssemblyAITranscriptionJobPoller-F46nf", + "sourceHandle": "{œdataTypeœ:œAssemblyAITranscriptionJobPollerœ,œidœ:œAssemblyAITranscriptionJobPoller-F46nfœ,œnameœ:œtranscription_resultœ,œoutput_typesœ:[œDataœ]}", + "target": "ParseData-th7JM", + "targetHandle": "{œfieldNameœ:œdataœ,œidœ:œParseData-th7JMœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}", + "data": { + "targetHandle": { + "fieldName": "data", + "id": "ParseData-th7JM", + "inputTypes": [ + "Data" + ], + "type": "other" + }, + "sourceHandle": { + "dataType": "AssemblyAITranscriptionJobPoller", + "id": "AssemblyAITranscriptionJobPoller-F46nf", + "name": "transcription_result", + "output_types": [ + "Data" + ] + } + }, + "id": "reactflow__edge-AssemblyAITranscriptionJobPoller-F46nf{œdataTypeœ:œAssemblyAITranscriptionJobPollerœ,œidœ:œAssemblyAITranscriptionJobPoller-F46nfœ,œnameœ:œtranscription_resultœ,œoutput_typesœ:[œDataœ]}-ParseData-th7JM{œfieldNameœ:œdataœ,œidœ:œParseData-th7JMœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}", + "animated": false, + "className": "" + }, + { + "source": "Prompt-IO8Cq", + "sourceHandle": "{œdataTypeœ:œPromptœ,œidœ:œPrompt-IO8Cqœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}", + "target": "AssemblyAILeMUR-jzwHZ", + "targetHandle": "{œfieldNameœ:œpromptœ,œidœ:œAssemblyAILeMUR-jzwHZœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "data": { + "targetHandle": { + "fieldName": "prompt", + "id": "AssemblyAILeMUR-jzwHZ", + "inputTypes": [ + "Message" + ], + "type": "str" + }, + "sourceHandle": { + "dataType": "Prompt", + "id": "Prompt-IO8Cq", + "name": "prompt", + "output_types": [ + "Message" + ] + } + }, + "id": "reactflow__edge-Prompt-IO8Cq{œdataTypeœ:œPromptœ,œidœ:œPrompt-IO8Cqœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-AssemblyAILeMUR-jzwHZ{œfieldNameœ:œpromptœ,œidœ:œAssemblyAILeMUR-jzwHZœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "animated": false, + "className": "" + }, + { + "source": "AssemblyAITranscriptionJobPoller-F46nf", + "sourceHandle": "{œdataTypeœ:œAssemblyAITranscriptionJobPollerœ,œidœ:œAssemblyAITranscriptionJobPoller-F46nfœ,œnameœ:œtranscription_resultœ,œoutput_typesœ:[œDataœ]}", + "target": "AssemblyAILeMUR-jzwHZ", + "targetHandle": "{œfieldNameœ:œtranscription_resultœ,œidœ:œAssemblyAILeMUR-jzwHZœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}", + "data": { + "targetHandle": { + "fieldName": "transcription_result", + "id": "AssemblyAILeMUR-jzwHZ", + "inputTypes": [ + "Data" + ], + "type": "other" + }, + "sourceHandle": { + "dataType": "AssemblyAITranscriptionJobPoller", + "id": "AssemblyAITranscriptionJobPoller-F46nf", + "name": "transcription_result", + "output_types": [ + "Data" + ] + } + }, + "id": "reactflow__edge-AssemblyAITranscriptionJobPoller-F46nf{œdataTypeœ:œAssemblyAITranscriptionJobPollerœ,œidœ:œAssemblyAITranscriptionJobPoller-F46nfœ,œnameœ:œtranscription_resultœ,œoutput_typesœ:[œDataœ]}-AssemblyAILeMUR-jzwHZ{œfieldNameœ:œtranscription_resultœ,œidœ:œAssemblyAILeMUR-jzwHZœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}", + "animated": false, + "className": "" + } + ], + "viewport": { + "x": 733.3920447354355, + "y": -42.8262727047815, + "zoom": 0.2612816498236053 + } + }, + "user_id": "9c01eee4-17dd-460e-8c52-bba36d635a9d", + "folder_id": "54fc9211-d42d-4c3f-a932-ee4987f61988", + "description": "Transcribe and analyze audio with AssemblyAI", + "icon_bg_color": null, + "updated_at": "2024-09-26T14:55:47+00:00", + "webhook": false, + "id": "fa69381c-d1c4-4535-bc23-bc2fb4956e1e" +} \ No newline at end of file diff --git a/assets/js/829ff4d2.af19e614.js b/assets/js/829ff4d2.adf532df.js similarity index 99% rename from assets/js/829ff4d2.af19e614.js rename to assets/js/829ff4d2.adf532df.js index ebc8dc90fc..36e2b2f7f4 100644 --- a/assets/js/829ff4d2.af19e614.js +++ b/assets/js/829ff4d2.adf532df.js @@ -1 +1 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[3964],{4745:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>r,default:()=>d,frontMatter:()=>l,metadata:()=>o,toc:()=>c});var t=s(4848),i=s(8453);const l={title:"AssemblyAI",sidebar_position:3,slug:"/integrations-assemblyai"},r="AssemblyAI",o={id:"Integrations/integrations-assemblyai",title:"AssemblyAI",description:"The AssemblyAI components allow you to apply powerful Speech AI models to your app for tasks like:",source:"@site/docs/Integrations/integrations-assemblyai.md",sourceDirName:"Integrations",slug:"/integrations-assemblyai",permalink:"/integrations-assemblyai",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{title:"AssemblyAI",sidebar_position:3,slug:"/integrations-assemblyai"},sidebar:"defaultSidebar",previous:{title:"Notion Conversational Agent",permalink:"/integrations/notion/notion-agent-conversational"},next:{title:"Telemetry",permalink:"/contributing-telemetry"}},a={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Components",id:"components",level:2},{value:"AssemblyAI Start Transcript",id:"assemblyai-start-transcript",level:3},{value:"AssebmlyAI Poll Transcript",id:"assebmlyai-poll-transcript",level:3},{value:"AssebmlyAI Get Subtitles",id:"assebmlyai-get-subtitles",level:3},{value:"AssebmlyAI LeMUR",id:"assebmlyai-lemur",level:3},{value:"AssemblyAI List Transcripts",id:"assemblyai-list-transcripts",level:3},{value:"Flow Process",id:"flow-process",level:2},{value:"Run the Transcription and Speech AI Flow",id:"run-the-transcription-and-speech-ai-flow",level:2},{value:"Customization",id:"customization",level:2},{value:"Troubleshooting",id:"troubleshooting",level:2}];function h(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"assemblyai",children:"AssemblyAI"}),"\n",(0,t.jsx)(n.p,{children:"The AssemblyAI components allow you to apply powerful Speech AI models to your app for tasks like:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Transcribing audio and video files"}),"\n",(0,t.jsx)(n.li,{children:"Formatting transcripts"}),"\n",(0,t.jsx)(n.li,{children:"Generating subtitles"}),"\n",(0,t.jsx)(n.li,{children:"Applying LLMs to audio files"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"More info about AssemblyAI:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/",children:"Website"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/docs",children:"AssemblyAI API Docs"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/dashboard/signup",children:"Get a Free API key"})}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,t.jsxs)(n.p,{children:["You need an ",(0,t.jsx)(n.strong,{children:"AssemblyAI API key"}),". After creating a free account, you'll find the API key in your dashboard. ",(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/dashboard/signup",children:"Get a Free API key here"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["Enter the key in the ",(0,t.jsx)(n.em,{children:"AssemblyAI API Key"})," field in all components that require the key."]}),"\n",(0,t.jsx)(n.p,{children:"(Optional): To use LeMUR, you need to upgrade your AssemblyAI account, since this is not included in the free account."}),"\n",(0,t.jsx)(n.h2,{id:"components",children:"Components"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"AssemblyAI Components",src:s(7835).A+"",width:"1494",height:"1048"})}),"\n",(0,t.jsx)(n.h3,{id:"assemblyai-start-transcript",children:"AssemblyAI Start Transcript"}),"\n",(0,t.jsx)(n.p,{children:"This component allows you to submit an audio or video file for transcription."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Tip"}),": You can freeze the path of this component to only submit the file once."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Input"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,t.jsx)(n.li,{children:"Audio File: The audio or video file to transcribe."}),"\n",(0,t.jsxs)(n.li,{children:["Speech Model (Optional): Select the class of models. Default is ",(0,t.jsx)(n.em,{children:"Best"}),". See ",(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/docs/speech-to-text/speech-recognition#select-the-speech-model-with-best-and-nano",children:"speech models"})," for more info."]}),"\n",(0,t.jsx)(n.li,{children:"Automatic Language Detection (Optional): Enable automatic language detection."}),"\n",(0,t.jsxs)(n.li,{children:["Language (Optional): The language of the audio file. Can be set manually if automatic language detection is disabled.\nSee ",(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/docs/getting-started/supported-languages",children:"supported languages"})," for a list of supported language codes."]}),"\n",(0,t.jsx)(n.li,{children:"Enable Speaker Labels (Optional): Detect speakers in an audio file and what each speaker said."}),"\n",(0,t.jsx)(n.li,{children:"Expected Number of Speakers (Optional): Set the expected number of speakers, if Speaker Labels is enabled."}),"\n",(0,t.jsxs)(n.li,{children:["Audio File URL (Optional): The URL of the audio or video file to transcribe. Can be used instead of ",(0,t.jsx)(n.em,{children:"Audio File"}),"."]}),"\n",(0,t.jsx)(n.li,{children:"Punctuate (Optional): Apply punctuation. Default is true."}),"\n",(0,t.jsx)(n.li,{children:"Format Text (Optional): Apply casing and text formatting. Default is true."}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Transcript ID: The id of the transcript"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"assebmlyai-poll-transcript",children:"AssebmlyAI Poll Transcript"}),"\n",(0,t.jsx)(n.p,{children:"This components allows you to poll the transcripts. It checks the status of the transcript every few seconds until the transcription is completed."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Input"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,t.jsx)(n.li,{children:"Polling Interval (Optional): The polling interval in seconds. Default is 3."}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Transcription Result: The AssemblyAI JSON response of a completed transcript. Contains the text and other info."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"assebmlyai-get-subtitles",children:"AssebmlyAI Get Subtitles"}),"\n",(0,t.jsx)(n.p,{children:"This component allows you to generate subtitles in SRT or VTT format."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Input"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,t.jsxs)(n.li,{children:["Transcription Result: The output of the ",(0,t.jsx)(n.em,{children:"Poll Transcript"})," component."]}),"\n",(0,t.jsx)(n.li,{children:"Subtitle Format: The format of the captions (SRT or VTT)."}),"\n",(0,t.jsx)(n.li,{children:"Character per Caption (Optional): The maximum number of characters per caption (0 for no limit)."}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Subtitles: A JSON response with the ",(0,t.jsx)(n.code,{children:"subtitles"})," field containing the captions in SRT or VTT format."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"assebmlyai-lemur",children:"AssebmlyAI LeMUR"}),"\n",(0,t.jsxs)(n.p,{children:["This component allows you to apply Large Language Models to spoken data using the ",(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/docs/lemur",children:"AssemblyAI LeMUR framework"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"LeMUR automatically ingests the transcript as additional context, making it easy to apply LLMs to audio data. You can use it for tasks like summarizing audio, extracting insights, or asking questions."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Input"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,t.jsxs)(n.li,{children:["Transcription Result: The output of the ",(0,t.jsx)(n.em,{children:"Poll Transcript"})," component."]}),"\n",(0,t.jsxs)(n.li,{children:["Input Prompt: The text to prompt the model. You can type your prompt in this field or connect it to a ",(0,t.jsx)(n.em,{children:"Prompt"})," component."]}),"\n",(0,t.jsx)(n.li,{children:"Final Model: The model that is used for the final prompt after compression is performed. Default is Claude 3.5 Sonnet."}),"\n",(0,t.jsx)(n.li,{children:"Temperature (Optional): The temperature to use for the model. Default is 0.0."}),"\n",(0,t.jsx)(n.li,{children:"Max Output Size (Optional): Max output size in tokens, up to 4000. Default is 2000."}),"\n",(0,t.jsxs)(n.li,{children:['Endpoint (Optional): The LeMUR endpoint to use. Default is "task". For "summary" and "question-answer", no prompt input is needed. See ',(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/docs/api-reference/lemur/",children:"LeMUR API docs"})," for more info."]}),"\n",(0,t.jsxs)(n.li,{children:["Questions (Optional): Comma-separated list of your questions. Only used if ",(0,t.jsx)(n.em,{children:"Endpoint"}),' is "question-answer".']}),"\n",(0,t.jsxs)(n.li,{children:["Transcript IDs (Optional): Comma-separated list of transcript IDs. LeMUR can perform actions over multiple transcripts. If provided, the ",(0,t.jsx)(n.em,{children:"Transcription Result"})," is ignored."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"LeMUR Response: The generated LLM response."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"assemblyai-list-transcripts",children:"AssemblyAI List Transcripts"}),"\n",(0,t.jsx)(n.p,{children:"This component can be used as a standalone component to list all previously generated transcripts."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Input"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,t.jsx)(n.li,{children:"Limit (Optional): Maximum number of transcripts to retrieve. Default is 20, use 0 for all."}),"\n",(0,t.jsx)(n.li,{children:"Filter (Optional): Filter by transcript status."}),"\n",(0,t.jsx)(n.li,{children:"Created On (Optional): Only get transcripts created on this date (YYYY-MM-DD)."}),"\n",(0,t.jsx)(n.li,{children:"Throttled Only (Optional): Only get throttled transcripts, overrides the status filter"}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Transcript List: A list of all transcripts with info such as the transcript ID, the status, and the data."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"flow-process",children:"Flow Process"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"The user inputs an audio or video file."}),"\n",(0,t.jsx)(n.li,{children:"The user can also input an LLM prompt. In this example, we want to generate a summary of the transcript."}),"\n",(0,t.jsx)(n.li,{children:"The flow submits the audio file for transcription."}),"\n",(0,t.jsx)(n.li,{children:"The flow checks the status of the transcript every few seconds until transcription is completed."}),"\n",(0,t.jsx)(n.li,{children:"The flow parses the transcription result and outputs the transcribed text."}),"\n",(0,t.jsx)(n.li,{children:"The flow also generates subtitles."}),"\n",(0,t.jsx)(n.li,{children:"The flow applies the LLM prompt to generate a summary."}),"\n",(0,t.jsx)(n.li,{children:"As a standalone component, all transcripts can be listed."}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"run-the-transcription-and-speech-ai-flow",children:"Run the Transcription and Speech AI Flow"}),"\n",(0,t.jsx)(n.p,{children:"To run the Transcription and Speech AI Flow:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Open Langflow and create a new project."}),"\n",(0,t.jsxs)(n.li,{children:["Add the components listed above to your flow canvas, or download the ",(0,t.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:s(8618).A+"",children:"AssemblyAI Transcription and Speech AI Flow"}),"(Download link) and ",(0,t.jsx)(n.strong,{children:"Import"})," the JSON file into Langflow."]}),"\n",(0,t.jsxs)(n.li,{children:["Connect the components as shown in the flow diagram. ",(0,t.jsx)(n.strong,{children:"Tip"}),": Freeze the path of the ",(0,t.jsx)(n.em,{children:"Start Transcript"})," component to only submit the file once."]}),"\n",(0,t.jsx)(n.li,{children:"Input the AssemblyAI API key in in all components that require the key (Start Transcript, Poll Transcript, Get Subtitles, LeMUR, List Transcripts)."}),"\n",(0,t.jsxs)(n.li,{children:["Select an audio or video file in the ",(0,t.jsx)(n.em,{children:"Start Transcript"})," component."]}),"\n",(0,t.jsxs)(n.li,{children:["Run the flow by clicking ",(0,t.jsx)(n.strong,{children:"Play"})," on the ",(0,t.jsx)(n.em,{children:"Parse Data"})," component. Make sure that the specified template is ",(0,t.jsx)(n.code,{children:"{text}"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["To generate subtitles, click ",(0,t.jsx)(n.strong,{children:"Play"})," on the ",(0,t.jsx)(n.em,{children:"Get Subtitles"})," component."]}),"\n",(0,t.jsxs)(n.li,{children:["To apply an LLM to your audio file, click ",(0,t.jsx)(n.strong,{children:"Play"})," on the ",(0,t.jsx)(n.em,{children:"LeMUR"})," component. Note that you need an upgraded AssemblyAI account to use LeMUR."]}),"\n",(0,t.jsxs)(n.li,{children:["To list all transcripts, click ",(0,t.jsx)(n.strong,{children:"Play"})," on the ",(0,t.jsx)(n.em,{children:"List Transcript"})," component."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"customization",children:"Customization"}),"\n",(0,t.jsx)(n.p,{children:"The flow can be customized by:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Modifying the parameters in the ",(0,t.jsx)(n.em,{children:"Start Transcript"})," component."]}),"\n",(0,t.jsxs)(n.li,{children:["Modifying the subtitle format in the ",(0,t.jsx)(n.em,{children:"Get Subtitles"})," component."]}),"\n",(0,t.jsxs)(n.li,{children:["Modifying the LLM prompt for input of the ",(0,t.jsx)(n.em,{children:"LeMUR"})," component."]}),"\n",(0,t.jsxs)(n.li,{children:["Modifying the LLM parameters (e.g., temperature) in the ",(0,t.jsx)(n.em,{children:"LeMUR"})," component."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,t.jsx)(n.p,{children:"If you encounter issues:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Ensure the API key is correctly set in all components that require the key."}),"\n",(0,t.jsx)(n.li,{children:"To use LeMUR, you need to upgrade your AssemblyAI account, since this is not included in the free account."}),"\n",(0,t.jsx)(n.li,{children:"Verify that all components are properly connected in the flow."}),"\n",(0,t.jsx)(n.li,{children:"Review the Langflow logs for any error messages."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["For more advanced usage, refer to the ",(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/docs/",children:"AssemblyAI API documentation"}),". If you need more help, you can reach out to the ",(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/contact/support",children:"AssemblyAI support"}),"."]})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},8618:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/files/AssemblyAI_Flow-22ac78676a24fcafe6cbef24c124b018.json"},7835:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/assemblyai-components-b88c7c97e04114bf658898f7fc633e23.png"},8453:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>o});var t=s(6540);const i={},l=t.createContext(i);function r(e){const n=t.useContext(l);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),t.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[3964],{4745:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>r,default:()=>d,frontMatter:()=>l,metadata:()=>o,toc:()=>c});var t=s(4848),i=s(8453);const l={title:"AssemblyAI",sidebar_position:3,slug:"/integrations-assemblyai"},r="AssemblyAI",o={id:"Integrations/integrations-assemblyai",title:"AssemblyAI",description:"The AssemblyAI components allow you to apply powerful Speech AI models to your app for tasks like:",source:"@site/docs/Integrations/integrations-assemblyai.md",sourceDirName:"Integrations",slug:"/integrations-assemblyai",permalink:"/integrations-assemblyai",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{title:"AssemblyAI",sidebar_position:3,slug:"/integrations-assemblyai"},sidebar:"defaultSidebar",previous:{title:"Notion Conversational Agent",permalink:"/integrations/notion/notion-agent-conversational"},next:{title:"Telemetry",permalink:"/contributing-telemetry"}},a={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Components",id:"components",level:2},{value:"AssemblyAI Start Transcript",id:"assemblyai-start-transcript",level:3},{value:"AssebmlyAI Poll Transcript",id:"assebmlyai-poll-transcript",level:3},{value:"AssebmlyAI Get Subtitles",id:"assebmlyai-get-subtitles",level:3},{value:"AssebmlyAI LeMUR",id:"assebmlyai-lemur",level:3},{value:"AssemblyAI List Transcripts",id:"assemblyai-list-transcripts",level:3},{value:"Flow Process",id:"flow-process",level:2},{value:"Run the Transcription and Speech AI Flow",id:"run-the-transcription-and-speech-ai-flow",level:2},{value:"Customization",id:"customization",level:2},{value:"Troubleshooting",id:"troubleshooting",level:2}];function h(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"assemblyai",children:"AssemblyAI"}),"\n",(0,t.jsx)(n.p,{children:"The AssemblyAI components allow you to apply powerful Speech AI models to your app for tasks like:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Transcribing audio and video files"}),"\n",(0,t.jsx)(n.li,{children:"Formatting transcripts"}),"\n",(0,t.jsx)(n.li,{children:"Generating subtitles"}),"\n",(0,t.jsx)(n.li,{children:"Applying LLMs to audio files"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"More info about AssemblyAI:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/",children:"Website"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/docs",children:"AssemblyAI API Docs"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/dashboard/signup",children:"Get a Free API key"})}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,t.jsxs)(n.p,{children:["You need an ",(0,t.jsx)(n.strong,{children:"AssemblyAI API key"}),". After creating a free account, you'll find the API key in your dashboard. ",(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/dashboard/signup",children:"Get a Free API key here"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["Enter the key in the ",(0,t.jsx)(n.em,{children:"AssemblyAI API Key"})," field in all components that require the key."]}),"\n",(0,t.jsx)(n.p,{children:"(Optional): To use LeMUR, you need to upgrade your AssemblyAI account, since this is not included in the free account."}),"\n",(0,t.jsx)(n.h2,{id:"components",children:"Components"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"AssemblyAI Components",src:s(7835).A+"",width:"1494",height:"1048"})}),"\n",(0,t.jsx)(n.h3,{id:"assemblyai-start-transcript",children:"AssemblyAI Start Transcript"}),"\n",(0,t.jsx)(n.p,{children:"This component allows you to submit an audio or video file for transcription."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Tip"}),": You can freeze the path of this component to only submit the file once."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Input"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,t.jsx)(n.li,{children:"Audio File: The audio or video file to transcribe."}),"\n",(0,t.jsxs)(n.li,{children:["Speech Model (Optional): Select the class of models. Default is ",(0,t.jsx)(n.em,{children:"Best"}),". See ",(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/docs/speech-to-text/speech-recognition#select-the-speech-model-with-best-and-nano",children:"speech models"})," for more info."]}),"\n",(0,t.jsx)(n.li,{children:"Automatic Language Detection (Optional): Enable automatic language detection."}),"\n",(0,t.jsxs)(n.li,{children:["Language (Optional): The language of the audio file. Can be set manually if automatic language detection is disabled.\nSee ",(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/docs/getting-started/supported-languages",children:"supported languages"})," for a list of supported language codes."]}),"\n",(0,t.jsx)(n.li,{children:"Enable Speaker Labels (Optional): Detect speakers in an audio file and what each speaker said."}),"\n",(0,t.jsx)(n.li,{children:"Expected Number of Speakers (Optional): Set the expected number of speakers, if Speaker Labels is enabled."}),"\n",(0,t.jsxs)(n.li,{children:["Audio File URL (Optional): The URL of the audio or video file to transcribe. Can be used instead of ",(0,t.jsx)(n.em,{children:"Audio File"}),"."]}),"\n",(0,t.jsx)(n.li,{children:"Punctuate (Optional): Apply punctuation. Default is true."}),"\n",(0,t.jsx)(n.li,{children:"Format Text (Optional): Apply casing and text formatting. Default is true."}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Transcript ID: The id of the transcript"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"assebmlyai-poll-transcript",children:"AssebmlyAI Poll Transcript"}),"\n",(0,t.jsx)(n.p,{children:"This components allows you to poll the transcripts. It checks the status of the transcript every few seconds until the transcription is completed."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Input"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,t.jsx)(n.li,{children:"Polling Interval (Optional): The polling interval in seconds. Default is 3."}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Transcription Result: The AssemblyAI JSON response of a completed transcript. Contains the text and other info."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"assebmlyai-get-subtitles",children:"AssebmlyAI Get Subtitles"}),"\n",(0,t.jsx)(n.p,{children:"This component allows you to generate subtitles in SRT or VTT format."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Input"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,t.jsxs)(n.li,{children:["Transcription Result: The output of the ",(0,t.jsx)(n.em,{children:"Poll Transcript"})," component."]}),"\n",(0,t.jsx)(n.li,{children:"Subtitle Format: The format of the captions (SRT or VTT)."}),"\n",(0,t.jsx)(n.li,{children:"Character per Caption (Optional): The maximum number of characters per caption (0 for no limit)."}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Subtitles: A JSON response with the ",(0,t.jsx)(n.code,{children:"subtitles"})," field containing the captions in SRT or VTT format."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"assebmlyai-lemur",children:"AssebmlyAI LeMUR"}),"\n",(0,t.jsxs)(n.p,{children:["This component allows you to apply Large Language Models to spoken data using the ",(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/docs/lemur",children:"AssemblyAI LeMUR framework"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"LeMUR automatically ingests the transcript as additional context, making it easy to apply LLMs to audio data. You can use it for tasks like summarizing audio, extracting insights, or asking questions."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Input"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,t.jsxs)(n.li,{children:["Transcription Result: The output of the ",(0,t.jsx)(n.em,{children:"Poll Transcript"})," component."]}),"\n",(0,t.jsxs)(n.li,{children:["Input Prompt: The text to prompt the model. You can type your prompt in this field or connect it to a ",(0,t.jsx)(n.em,{children:"Prompt"})," component."]}),"\n",(0,t.jsx)(n.li,{children:"Final Model: The model that is used for the final prompt after compression is performed. Default is Claude 3.5 Sonnet."}),"\n",(0,t.jsx)(n.li,{children:"Temperature (Optional): The temperature to use for the model. Default is 0.0."}),"\n",(0,t.jsx)(n.li,{children:"Max Output Size (Optional): Max output size in tokens, up to 4000. Default is 2000."}),"\n",(0,t.jsxs)(n.li,{children:['Endpoint (Optional): The LeMUR endpoint to use. Default is "task". For "summary" and "question-answer", no prompt input is needed. See ',(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/docs/api-reference/lemur/",children:"LeMUR API docs"})," for more info."]}),"\n",(0,t.jsxs)(n.li,{children:["Questions (Optional): Comma-separated list of your questions. Only used if ",(0,t.jsx)(n.em,{children:"Endpoint"}),' is "question-answer".']}),"\n",(0,t.jsxs)(n.li,{children:["Transcript IDs (Optional): Comma-separated list of transcript IDs. LeMUR can perform actions over multiple transcripts. If provided, the ",(0,t.jsx)(n.em,{children:"Transcription Result"})," is ignored."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"LeMUR Response: The generated LLM response."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"assemblyai-list-transcripts",children:"AssemblyAI List Transcripts"}),"\n",(0,t.jsx)(n.p,{children:"This component can be used as a standalone component to list all previously generated transcripts."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Input"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,t.jsx)(n.li,{children:"Limit (Optional): Maximum number of transcripts to retrieve. Default is 20, use 0 for all."}),"\n",(0,t.jsx)(n.li,{children:"Filter (Optional): Filter by transcript status."}),"\n",(0,t.jsx)(n.li,{children:"Created On (Optional): Only get transcripts created on this date (YYYY-MM-DD)."}),"\n",(0,t.jsx)(n.li,{children:"Throttled Only (Optional): Only get throttled transcripts, overrides the status filter"}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Transcript List: A list of all transcripts with info such as the transcript ID, the status, and the data."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"flow-process",children:"Flow Process"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"The user inputs an audio or video file."}),"\n",(0,t.jsx)(n.li,{children:"The user can also input an LLM prompt. In this example, we want to generate a summary of the transcript."}),"\n",(0,t.jsx)(n.li,{children:"The flow submits the audio file for transcription."}),"\n",(0,t.jsx)(n.li,{children:"The flow checks the status of the transcript every few seconds until transcription is completed."}),"\n",(0,t.jsx)(n.li,{children:"The flow parses the transcription result and outputs the transcribed text."}),"\n",(0,t.jsx)(n.li,{children:"The flow also generates subtitles."}),"\n",(0,t.jsx)(n.li,{children:"The flow applies the LLM prompt to generate a summary."}),"\n",(0,t.jsx)(n.li,{children:"As a standalone component, all transcripts can be listed."}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"run-the-transcription-and-speech-ai-flow",children:"Run the Transcription and Speech AI Flow"}),"\n",(0,t.jsx)(n.p,{children:"To run the Transcription and Speech AI Flow:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Open Langflow and create a new project."}),"\n",(0,t.jsxs)(n.li,{children:["Add the components listed above to your flow canvas, or download the ",(0,t.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:s(8618).A+"",children:"AssemblyAI Transcription and Speech AI Flow"}),"(Download link) and ",(0,t.jsx)(n.strong,{children:"Import"})," the JSON file into Langflow."]}),"\n",(0,t.jsxs)(n.li,{children:["Connect the components as shown in the flow diagram. ",(0,t.jsx)(n.strong,{children:"Tip"}),": Freeze the path of the ",(0,t.jsx)(n.em,{children:"Start Transcript"})," component to only submit the file once."]}),"\n",(0,t.jsx)(n.li,{children:"Input the AssemblyAI API key in in all components that require the key (Start Transcript, Poll Transcript, Get Subtitles, LeMUR, List Transcripts)."}),"\n",(0,t.jsxs)(n.li,{children:["Select an audio or video file in the ",(0,t.jsx)(n.em,{children:"Start Transcript"})," component."]}),"\n",(0,t.jsxs)(n.li,{children:["Run the flow by clicking ",(0,t.jsx)(n.strong,{children:"Play"})," on the ",(0,t.jsx)(n.em,{children:"Parse Data"})," component. Make sure that the specified template is ",(0,t.jsx)(n.code,{children:"{text}"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["To generate subtitles, click ",(0,t.jsx)(n.strong,{children:"Play"})," on the ",(0,t.jsx)(n.em,{children:"Get Subtitles"})," component."]}),"\n",(0,t.jsxs)(n.li,{children:["To apply an LLM to your audio file, click ",(0,t.jsx)(n.strong,{children:"Play"})," on the ",(0,t.jsx)(n.em,{children:"LeMUR"})," component. Note that you need an upgraded AssemblyAI account to use LeMUR."]}),"\n",(0,t.jsxs)(n.li,{children:["To list all transcripts, click ",(0,t.jsx)(n.strong,{children:"Play"})," on the ",(0,t.jsx)(n.em,{children:"List Transcript"})," component."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"customization",children:"Customization"}),"\n",(0,t.jsx)(n.p,{children:"The flow can be customized by:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Modifying the parameters in the ",(0,t.jsx)(n.em,{children:"Start Transcript"})," component."]}),"\n",(0,t.jsxs)(n.li,{children:["Modifying the subtitle format in the ",(0,t.jsx)(n.em,{children:"Get Subtitles"})," component."]}),"\n",(0,t.jsxs)(n.li,{children:["Modifying the LLM prompt for input of the ",(0,t.jsx)(n.em,{children:"LeMUR"})," component."]}),"\n",(0,t.jsxs)(n.li,{children:["Modifying the LLM parameters (e.g., temperature) in the ",(0,t.jsx)(n.em,{children:"LeMUR"})," component."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,t.jsx)(n.p,{children:"If you encounter issues:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Ensure the API key is correctly set in all components that require the key."}),"\n",(0,t.jsx)(n.li,{children:"To use LeMUR, you need to upgrade your AssemblyAI account, since this is not included in the free account."}),"\n",(0,t.jsx)(n.li,{children:"Verify that all components are properly connected in the flow."}),"\n",(0,t.jsx)(n.li,{children:"Review the Langflow logs for any error messages."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["For more advanced usage, refer to the ",(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/docs/",children:"AssemblyAI API documentation"}),". If you need more help, you can reach out to the ",(0,t.jsx)(n.a,{href:"https://www.assemblyai.com/contact/support",children:"AssemblyAI support"}),"."]})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},8618:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/files/AssemblyAI_Flow-9d763ba2772e4d12c09be021ad223167.json"},7835:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/assemblyai-components-b88c7c97e04114bf658898f7fc633e23.png"},8453:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>o});var t=s(6540);const i={},l=t.createContext(i);function r(e){const n=t.useContext(l);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),t.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.f3be9898.js b/assets/js/runtime~main.b3c8ab3a.js similarity index 99% rename from assets/js/runtime~main.f3be9898.js rename to assets/js/runtime~main.b3c8ab3a.js index 63ad13b14e..bfa1a49e16 100644 --- a/assets/js/runtime~main.f3be9898.js +++ b/assets/js/runtime~main.b3c8ab3a.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,c,r,d,f={},t={};function b(e){var a=t[e];if(void 0!==a)return a.exports;var c=t[e]={id:e,loaded:!1,exports:{}};return f[e].call(c.exports,c,c.exports,b),c.loaded=!0,c.exports}b.m=f,b.c=t,e=[],b.O=(a,c,r,d)=>{if(!c){var f=1/0;for(n=0;n=d)&&Object.keys(b.O).every((e=>b.O[e](c[o])))?c.splice(o--,1):(t=!1,d0&&e[n-1][2]>d;n--)e[n]=e[n-1];e[n]=[c,r,d]},b.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return b.d(a,{a:a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var d=Object.create(null);b.r(d);var f={};a=a||[null,c({}),c([]),c(c)];for(var t=2&r&&e;"object"==typeof t&&!~a.indexOf(t);t=c(t))Object.getOwnPropertyNames(t).forEach((a=>f[a]=()=>e[a]));return f.default=()=>e,b.d(d,f),d},b.d=(e,a)=>{for(var c in a)b.o(a,c)&&!b.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce(((a,c)=>(b.f[c](e,a),a)),[])),b.u=e=>"assets/js/"+({144:"e2a386ca",145:"0be1d5fe",784:"fe965b62",804:"7fcd30b6",868:"dc7b1ef3",1039:"16d61ab3",1227:"647965d5",1246:"1b523369",1456:"ecd98ae0",1563:"3ef76b56",1567:"22dd74f7",1917:"c3616f7f",2005:"0575dfc8",2042:"reactPlayerTwitch",2431:"c0d3c6ab",2624:"8ff68e6f",2657:"a3ab51d1",2691:"2efb9d3a",2723:"reactPlayerMux",3110:"6a2beaac",3392:"reactPlayerVidyard",3659:"4618a71f",3917:"c8dad5f1",3964:"829ff4d2",4028:"c2ebd62a",4046:"9ac856ad",4058:"ccff95c4",4133:"5cf11f26",5475:"18f3809a",5527:"9e7a34ba",5562:"20e9af62",5572:"873ebc27",5628:"a83bc7c0",5664:"36970916",5742:"aba21aa0",5772:"f66238ae",6008:"445668ec",6147:"ab17fe15",6173:"reactPlayerVimeo",6328:"reactPlayerDailyMotion",6353:"reactPlayerPreview",6463:"reactPlayerKaltura",6494:"b453f7b0",6677:"2f617b24",6887:"reactPlayerFacebook",6900:"3f8193f3",7098:"a7bd4aaa",7211:"cacdc615",7258:"11478de3",7338:"c39b795e",7408:"3ae94ad4",7453:"fdefa9a8",7458:"reactPlayerFilePlayer",7462:"921b5fc1",7570:"reactPlayerMixcloud",7627:"reactPlayerStreamable",8031:"25bf2d67",8054:"85112c90",8127:"53ed7db4",8183:"d59b5b70",8261:"474d53cd",8401:"17896441",8446:"reactPlayerYouTube",8598:"44dfcf75",8661:"8f774222",8929:"172b3cfb",8953:"adef6868",9048:"a94703ab",9126:"ea3c040a",9304:"c329cc2b",9340:"reactPlayerWistia",9455:"54175a6c",9461:"23d0e682",9580:"f81a91eb",9642:"eae80ce0",9647:"5e95c892",9979:"reactPlayerSoundCloud"}[e]||e)+"."+{144:"7e8e09aa",145:"6a62a03b",784:"bf3c3b32",804:"052d3ec1",868:"d7c01dec",900:"cec9b91d",1039:"6b5d9275",1227:"d5386d93",1246:"9ab26cae",1456:"e5056aaa",1563:"3ee3f5d2",1567:"e73c21b3",1917:"66691f62",2005:"e2f00246",2042:"38dd7b7d",2237:"4bb44bc4",2431:"0df77f03",2624:"3e899d5e",2657:"1448a30b",2691:"c7804f19",2723:"8f6391ba",3110:"18b2687e",3392:"cb42cdfc",3554:"c7291073",3659:"65567128",3917:"3379b67c",3964:"af19e614",4028:"4c8ebf9d",4046:"0b7c5218",4058:"9c31c71d",4133:"988b28fb",5475:"8de530d5",5527:"c924b445",5562:"8d63ec91",5572:"d11012c8",5628:"707c1b67",5664:"46db89cf",5742:"7728a8b8",5772:"158b350c",6008:"5070ebd4",6147:"3f45eb86",6173:"291c2909",6328:"f614ee4c",6353:"8cd2b61f",6463:"8e37235b",6494:"404054b3",6677:"6a39e3b4",6887:"a60ee927",6900:"ed789b0e",7098:"71beb8e2",7211:"69ff3bb2",7258:"a9a0ccb4",7338:"156cd17a",7408:"95af4b45",7453:"c2cad3b5",7458:"c0e08054",7462:"df5a557c",7570:"34c84b39",7627:"b6323134",8031:"9469dd38",8054:"2d20ecfb",8127:"7f91271f",8183:"7baaad08",8261:"4737b75e",8401:"2ed86b26",8446:"a89f408c",8598:"44362993",8661:"c22b1210",8929:"e136d1f2",8953:"469ae773",9048:"38aef81a",9126:"5122becc",9304:"db4c4794",9340:"7f514310",9455:"77251598",9461:"f73e4482",9580:"77eb4862",9642:"b1d36097",9647:"8641e05b",9979:"9ddea34f"}[e]+".js",b.miniCssF=e=>{},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r={},d="langflow-docs:",b.l=(e,a,c,f)=>{if(r[e])r[e].push(a);else{var t,o;if(void 0!==c)for(var l=document.getElementsByTagName("script"),n=0;n{t.onerror=t.onload=null,clearTimeout(s);var d=r[e];if(delete r[e],t.parentNode&&t.parentNode.removeChild(t),d&&d.forEach((e=>e(c))),a)return a(c)},s=setTimeout(u.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=u.bind(null,t.onerror),t.onload=u.bind(null,t.onload),o&&document.head.appendChild(t)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.p="/",b.gca=function(e){return e={17896441:"8401",36970916:"5664",e2a386ca:"144","0be1d5fe":"145",fe965b62:"784","7fcd30b6":"804",dc7b1ef3:"868","16d61ab3":"1039","647965d5":"1227","1b523369":"1246",ecd98ae0:"1456","3ef76b56":"1563","22dd74f7":"1567",c3616f7f:"1917","0575dfc8":"2005",reactPlayerTwitch:"2042",c0d3c6ab:"2431","8ff68e6f":"2624",a3ab51d1:"2657","2efb9d3a":"2691",reactPlayerMux:"2723","6a2beaac":"3110",reactPlayerVidyard:"3392","4618a71f":"3659",c8dad5f1:"3917","829ff4d2":"3964",c2ebd62a:"4028","9ac856ad":"4046",ccff95c4:"4058","5cf11f26":"4133","18f3809a":"5475","9e7a34ba":"5527","20e9af62":"5562","873ebc27":"5572",a83bc7c0:"5628",aba21aa0:"5742",f66238ae:"5772","445668ec":"6008",ab17fe15:"6147",reactPlayerVimeo:"6173",reactPlayerDailyMotion:"6328",reactPlayerPreview:"6353",reactPlayerKaltura:"6463",b453f7b0:"6494","2f617b24":"6677",reactPlayerFacebook:"6887","3f8193f3":"6900",a7bd4aaa:"7098",cacdc615:"7211","11478de3":"7258",c39b795e:"7338","3ae94ad4":"7408",fdefa9a8:"7453",reactPlayerFilePlayer:"7458","921b5fc1":"7462",reactPlayerMixcloud:"7570",reactPlayerStreamable:"7627","25bf2d67":"8031","85112c90":"8054","53ed7db4":"8127",d59b5b70:"8183","474d53cd":"8261",reactPlayerYouTube:"8446","44dfcf75":"8598","8f774222":"8661","172b3cfb":"8929",adef6868:"8953",a94703ab:"9048",ea3c040a:"9126",c329cc2b:"9304",reactPlayerWistia:"9340","54175a6c":"9455","23d0e682":"9461",f81a91eb:"9580",eae80ce0:"9642","5e95c892":"9647",reactPlayerSoundCloud:"9979"}[e]||e,b.p+b.u(e)},(()=>{var e={5354:0,1869:0};b.f.j=(a,c)=>{var r=b.o(e,a)?e[a]:void 0;if(0!==r)if(r)c.push(r[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var d=new Promise(((c,d)=>r=e[a]=[c,d]));c.push(r[2]=d);var f=b.p+b.u(a),t=new Error;b.l(f,(c=>{if(b.o(e,a)&&(0!==(r=e[a])&&(e[a]=void 0),r)){var d=c&&("load"===c.type?"missing":c.type),f=c&&c.target&&c.target.src;t.message="Loading chunk "+a+" failed.\n("+d+": "+f+")",t.name="ChunkLoadError",t.type=d,t.request=f,r[1](t)}}),"chunk-"+a,a)}},b.O.j=a=>0===e[a];var a=(a,c)=>{var r,d,f=c[0],t=c[1],o=c[2],l=0;if(f.some((a=>0!==e[a]))){for(r in t)b.o(t,r)&&(b.m[r]=t[r]);if(o)var n=o(b)}for(a&&a(c);l{"use strict";var e,a,c,r,d,f={},t={};function b(e){var a=t[e];if(void 0!==a)return a.exports;var c=t[e]={id:e,loaded:!1,exports:{}};return f[e].call(c.exports,c,c.exports,b),c.loaded=!0,c.exports}b.m=f,b.c=t,e=[],b.O=(a,c,r,d)=>{if(!c){var f=1/0;for(n=0;n=d)&&Object.keys(b.O).every((e=>b.O[e](c[o])))?c.splice(o--,1):(t=!1,d0&&e[n-1][2]>d;n--)e[n]=e[n-1];e[n]=[c,r,d]},b.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return b.d(a,{a:a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var d=Object.create(null);b.r(d);var f={};a=a||[null,c({}),c([]),c(c)];for(var t=2&r&&e;"object"==typeof t&&!~a.indexOf(t);t=c(t))Object.getOwnPropertyNames(t).forEach((a=>f[a]=()=>e[a]));return f.default=()=>e,b.d(d,f),d},b.d=(e,a)=>{for(var c in a)b.o(a,c)&&!b.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce(((a,c)=>(b.f[c](e,a),a)),[])),b.u=e=>"assets/js/"+({144:"e2a386ca",145:"0be1d5fe",784:"fe965b62",804:"7fcd30b6",868:"dc7b1ef3",1039:"16d61ab3",1227:"647965d5",1246:"1b523369",1456:"ecd98ae0",1563:"3ef76b56",1567:"22dd74f7",1917:"c3616f7f",2005:"0575dfc8",2042:"reactPlayerTwitch",2431:"c0d3c6ab",2624:"8ff68e6f",2657:"a3ab51d1",2691:"2efb9d3a",2723:"reactPlayerMux",3110:"6a2beaac",3392:"reactPlayerVidyard",3659:"4618a71f",3917:"c8dad5f1",3964:"829ff4d2",4028:"c2ebd62a",4046:"9ac856ad",4058:"ccff95c4",4133:"5cf11f26",5475:"18f3809a",5527:"9e7a34ba",5562:"20e9af62",5572:"873ebc27",5628:"a83bc7c0",5664:"36970916",5742:"aba21aa0",5772:"f66238ae",6008:"445668ec",6147:"ab17fe15",6173:"reactPlayerVimeo",6328:"reactPlayerDailyMotion",6353:"reactPlayerPreview",6463:"reactPlayerKaltura",6494:"b453f7b0",6677:"2f617b24",6887:"reactPlayerFacebook",6900:"3f8193f3",7098:"a7bd4aaa",7211:"cacdc615",7258:"11478de3",7338:"c39b795e",7408:"3ae94ad4",7453:"fdefa9a8",7458:"reactPlayerFilePlayer",7462:"921b5fc1",7570:"reactPlayerMixcloud",7627:"reactPlayerStreamable",8031:"25bf2d67",8054:"85112c90",8127:"53ed7db4",8183:"d59b5b70",8261:"474d53cd",8401:"17896441",8446:"reactPlayerYouTube",8598:"44dfcf75",8661:"8f774222",8929:"172b3cfb",8953:"adef6868",9048:"a94703ab",9126:"ea3c040a",9304:"c329cc2b",9340:"reactPlayerWistia",9455:"54175a6c",9461:"23d0e682",9580:"f81a91eb",9642:"eae80ce0",9647:"5e95c892",9979:"reactPlayerSoundCloud"}[e]||e)+"."+{144:"7e8e09aa",145:"6a62a03b",784:"bf3c3b32",804:"052d3ec1",868:"d7c01dec",900:"cec9b91d",1039:"6b5d9275",1227:"d5386d93",1246:"9ab26cae",1456:"e5056aaa",1563:"3ee3f5d2",1567:"e73c21b3",1917:"66691f62",2005:"e2f00246",2042:"38dd7b7d",2237:"4bb44bc4",2431:"0df77f03",2624:"3e899d5e",2657:"1448a30b",2691:"c7804f19",2723:"8f6391ba",3110:"18b2687e",3392:"cb42cdfc",3554:"c7291073",3659:"65567128",3917:"3379b67c",3964:"adf532df",4028:"4c8ebf9d",4046:"0b7c5218",4058:"9c31c71d",4133:"988b28fb",5475:"8de530d5",5527:"c924b445",5562:"8d63ec91",5572:"d11012c8",5628:"707c1b67",5664:"46db89cf",5742:"7728a8b8",5772:"158b350c",6008:"5070ebd4",6147:"3f45eb86",6173:"291c2909",6328:"f614ee4c",6353:"8cd2b61f",6463:"8e37235b",6494:"404054b3",6677:"6a39e3b4",6887:"a60ee927",6900:"ed789b0e",7098:"71beb8e2",7211:"69ff3bb2",7258:"a9a0ccb4",7338:"156cd17a",7408:"95af4b45",7453:"c2cad3b5",7458:"c0e08054",7462:"df5a557c",7570:"34c84b39",7627:"b6323134",8031:"9469dd38",8054:"2d20ecfb",8127:"7f91271f",8183:"7baaad08",8261:"4737b75e",8401:"2ed86b26",8446:"a89f408c",8598:"44362993",8661:"c22b1210",8929:"e136d1f2",8953:"469ae773",9048:"38aef81a",9126:"5122becc",9304:"db4c4794",9340:"7f514310",9455:"77251598",9461:"f73e4482",9580:"77eb4862",9642:"b1d36097",9647:"8641e05b",9979:"9ddea34f"}[e]+".js",b.miniCssF=e=>{},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r={},d="langflow-docs:",b.l=(e,a,c,f)=>{if(r[e])r[e].push(a);else{var t,o;if(void 0!==c)for(var l=document.getElementsByTagName("script"),n=0;n{t.onerror=t.onload=null,clearTimeout(s);var d=r[e];if(delete r[e],t.parentNode&&t.parentNode.removeChild(t),d&&d.forEach((e=>e(c))),a)return a(c)},s=setTimeout(u.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=u.bind(null,t.onerror),t.onload=u.bind(null,t.onload),o&&document.head.appendChild(t)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.p="/",b.gca=function(e){return e={17896441:"8401",36970916:"5664",e2a386ca:"144","0be1d5fe":"145",fe965b62:"784","7fcd30b6":"804",dc7b1ef3:"868","16d61ab3":"1039","647965d5":"1227","1b523369":"1246",ecd98ae0:"1456","3ef76b56":"1563","22dd74f7":"1567",c3616f7f:"1917","0575dfc8":"2005",reactPlayerTwitch:"2042",c0d3c6ab:"2431","8ff68e6f":"2624",a3ab51d1:"2657","2efb9d3a":"2691",reactPlayerMux:"2723","6a2beaac":"3110",reactPlayerVidyard:"3392","4618a71f":"3659",c8dad5f1:"3917","829ff4d2":"3964",c2ebd62a:"4028","9ac856ad":"4046",ccff95c4:"4058","5cf11f26":"4133","18f3809a":"5475","9e7a34ba":"5527","20e9af62":"5562","873ebc27":"5572",a83bc7c0:"5628",aba21aa0:"5742",f66238ae:"5772","445668ec":"6008",ab17fe15:"6147",reactPlayerVimeo:"6173",reactPlayerDailyMotion:"6328",reactPlayerPreview:"6353",reactPlayerKaltura:"6463",b453f7b0:"6494","2f617b24":"6677",reactPlayerFacebook:"6887","3f8193f3":"6900",a7bd4aaa:"7098",cacdc615:"7211","11478de3":"7258",c39b795e:"7338","3ae94ad4":"7408",fdefa9a8:"7453",reactPlayerFilePlayer:"7458","921b5fc1":"7462",reactPlayerMixcloud:"7570",reactPlayerStreamable:"7627","25bf2d67":"8031","85112c90":"8054","53ed7db4":"8127",d59b5b70:"8183","474d53cd":"8261",reactPlayerYouTube:"8446","44dfcf75":"8598","8f774222":"8661","172b3cfb":"8929",adef6868:"8953",a94703ab:"9048",ea3c040a:"9126",c329cc2b:"9304",reactPlayerWistia:"9340","54175a6c":"9455","23d0e682":"9461",f81a91eb:"9580",eae80ce0:"9642","5e95c892":"9647",reactPlayerSoundCloud:"9979"}[e]||e,b.p+b.u(e)},(()=>{var e={5354:0,1869:0};b.f.j=(a,c)=>{var r=b.o(e,a)?e[a]:void 0;if(0!==r)if(r)c.push(r[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var d=new Promise(((c,d)=>r=e[a]=[c,d]));c.push(r[2]=d);var f=b.p+b.u(a),t=new Error;b.l(f,(c=>{if(b.o(e,a)&&(0!==(r=e[a])&&(e[a]=void 0),r)){var d=c&&("load"===c.type?"missing":c.type),f=c&&c.target&&c.target.src;t.message="Loading chunk "+a+" failed.\n("+d+": "+f+")",t.name="ChunkLoadError",t.type=d,t.request=f,r[1](t)}}),"chunk-"+a,a)}},b.O.j=a=>0===e[a];var a=(a,c)=>{var r,d,f=c[0],t=c[1],o=c[2],l=0;if(f.some((a=>0!==e[a]))){for(r in t)b.o(t,r)&&(b.m[r]=t[r]);if(o)var n=o(b)}for(a&&a(c);l - + diff --git a/components-data.html b/components-data.html index 6e204efb93..17b1642bf2 100644 --- a/components-data.html +++ b/components-data.html @@ -10,7 +10,7 @@ - + diff --git a/components-embedding-models.html b/components-embedding-models.html index ce57503266..d5d10eaa9a 100644 --- a/components-embedding-models.html +++ b/components-embedding-models.html @@ -10,7 +10,7 @@ - + diff --git a/components-helpers.html b/components-helpers.html index bbaae82500..43b6d46f9e 100644 --- a/components-helpers.html +++ b/components-helpers.html @@ -10,7 +10,7 @@ - + diff --git a/components-io.html b/components-io.html index f1d6077594..025461120d 100644 --- a/components-io.html +++ b/components-io.html @@ -10,7 +10,7 @@ - + diff --git a/components-loaders.html b/components-loaders.html index e1ab54dea5..824cf902f1 100644 --- a/components-loaders.html +++ b/components-loaders.html @@ -10,7 +10,7 @@ - + diff --git a/components-models.html b/components-models.html index f96a33e105..0510f19ccd 100644 --- a/components-models.html +++ b/components-models.html @@ -10,7 +10,7 @@ - + diff --git a/components-prompts.html b/components-prompts.html index 029a2132f0..e8cb03bc6c 100644 --- a/components-prompts.html +++ b/components-prompts.html @@ -10,7 +10,7 @@ - + diff --git a/components-rag.html b/components-rag.html index 65903c9010..58a74135d5 100644 --- a/components-rag.html +++ b/components-rag.html @@ -10,7 +10,7 @@ - + diff --git a/components-vector-stores.html b/components-vector-stores.html index 90d69f32a5..1cd9f4bd73 100644 --- a/components-vector-stores.html +++ b/components-vector-stores.html @@ -10,7 +10,7 @@ - + diff --git a/components.html b/components.html index 34d5477279..2923861baf 100644 --- a/components.html +++ b/components.html @@ -10,7 +10,7 @@ - + diff --git a/configuration-api-keys.html b/configuration-api-keys.html index 8e503fe7b7..cffae3b669 100644 --- a/configuration-api-keys.html +++ b/configuration-api-keys.html @@ -10,7 +10,7 @@ - + diff --git a/configuration-authentication.html b/configuration-authentication.html index 9ef2220d91..ba19934375 100644 --- a/configuration-authentication.html +++ b/configuration-authentication.html @@ -10,7 +10,7 @@ - + diff --git a/configuration-auto-save.html b/configuration-auto-save.html index 36b3a6e861..23e9bf0645 100644 --- a/configuration-auto-save.html +++ b/configuration-auto-save.html @@ -10,7 +10,7 @@ - + diff --git a/configuration-backend-only.html b/configuration-backend-only.html index add67de32c..270804631e 100644 --- a/configuration-backend-only.html +++ b/configuration-backend-only.html @@ -10,7 +10,7 @@ - + diff --git a/configuration-cli.html b/configuration-cli.html index 2093488c04..153c70c1df 100644 --- a/configuration-cli.html +++ b/configuration-cli.html @@ -10,7 +10,7 @@ - + diff --git a/contributing-community.html b/contributing-community.html index 45b6a2d4b9..749edfe91a 100644 --- a/contributing-community.html +++ b/contributing-community.html @@ -10,7 +10,7 @@ - + diff --git a/contributing-github-issues.html b/contributing-github-issues.html index 5c77c415d1..81e2ab0e0d 100644 --- a/contributing-github-issues.html +++ b/contributing-github-issues.html @@ -10,7 +10,7 @@ - + diff --git a/contributing-how-to-contribute.html b/contributing-how-to-contribute.html index cc84785909..2fcf103dd3 100644 --- a/contributing-how-to-contribute.html +++ b/contributing-how-to-contribute.html @@ -10,7 +10,7 @@ - + diff --git a/contributing-telemetry.html b/contributing-telemetry.html index 8ed6fe945a..72d5d36e9e 100644 --- a/contributing-telemetry.html +++ b/contributing-telemetry.html @@ -10,7 +10,7 @@ - + diff --git a/deployment-docker.html b/deployment-docker.html index a38fa622c7..5e3c925ccd 100644 --- a/deployment-docker.html +++ b/deployment-docker.html @@ -10,7 +10,7 @@ - + diff --git a/deployment-gcp.html b/deployment-gcp.html index 7d886a479a..9d1c9708c8 100644 --- a/deployment-gcp.html +++ b/deployment-gcp.html @@ -10,7 +10,7 @@ - + diff --git a/deployment-hugging-face-spaces.html b/deployment-hugging-face-spaces.html index 40cb10c78a..c6c278e5d2 100644 --- a/deployment-hugging-face-spaces.html +++ b/deployment-hugging-face-spaces.html @@ -10,7 +10,7 @@ - + diff --git a/deployment-kubernetes.html b/deployment-kubernetes.html index 512e2bc303..f5aebff7d8 100644 --- a/deployment-kubernetes.html +++ b/deployment-kubernetes.html @@ -10,7 +10,7 @@ - + diff --git a/deployment-railway.html b/deployment-railway.html index 1d559a7704..522f0f69b8 100644 --- a/deployment-railway.html +++ b/deployment-railway.html @@ -10,7 +10,7 @@ - + diff --git a/deployment-render.html b/deployment-render.html index ac1de6acc1..308e73aa2f 100644 --- a/deployment-render.html +++ b/deployment-render.html @@ -10,7 +10,7 @@ - + diff --git a/getting-started-common-installation-issues.html b/getting-started-common-installation-issues.html index a04e76d96b..c9c5283876 100644 --- a/getting-started-common-installation-issues.html +++ b/getting-started-common-installation-issues.html @@ -10,7 +10,7 @@ - + diff --git a/getting-started-installation.html b/getting-started-installation.html index a32865103b..e42daece18 100644 --- a/getting-started-installation.html +++ b/getting-started-installation.html @@ -10,7 +10,7 @@ - + diff --git a/getting-started-quickstart.html b/getting-started-quickstart.html index 2548723ab8..324dc0cfd4 100644 --- a/getting-started-quickstart.html +++ b/getting-started-quickstart.html @@ -10,7 +10,7 @@ - + diff --git a/guides-chat-memory.html b/guides-chat-memory.html index d800def941..86c439dd7f 100644 --- a/guides-chat-memory.html +++ b/guides-chat-memory.html @@ -10,7 +10,7 @@ - + diff --git a/guides-data-message.html b/guides-data-message.html index f1492a9180..cffc8d2839 100644 --- a/guides-data-message.html +++ b/guides-data-message.html @@ -10,7 +10,7 @@ - + diff --git a/guides-new-to-llms.html b/guides-new-to-llms.html index e8617b6dfa..907e826ed3 100644 --- a/guides-new-to-llms.html +++ b/guides-new-to-llms.html @@ -10,7 +10,7 @@ - + diff --git a/index.html b/index.html index 54b894b627..0ed219e8c1 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ - + diff --git a/integrations-assemblyai.html b/integrations-assemblyai.html index 8b60bd354d..d391521886 100644 --- a/integrations-assemblyai.html +++ b/integrations-assemblyai.html @@ -10,7 +10,7 @@ - + @@ -159,7 +159,7 @@ See AssemblyAI Transcription and Speech AI Flow(Download link) and Import the JSON file into Langflow. +
  • Add the components listed above to your flow canvas, or download the AssemblyAI Transcription and Speech AI Flow(Download link) and Import the JSON file into Langflow.
  • Connect the components as shown in the flow diagram. Tip: Freeze the path of the Start Transcript component to only submit the file once.
  • Input the AssemblyAI API key in in all components that require the key (Start Transcript, Poll Transcript, Get Subtitles, LeMUR, List Transcripts).
  • Select an audio or video file in the Start Transcript component.
  • diff --git a/integrations-langsmith.html b/integrations-langsmith.html index 662b7087d8..dc89241aa9 100644 --- a/integrations-langsmith.html +++ b/integrations-langsmith.html @@ -10,7 +10,7 @@ - + diff --git a/integrations-langwatch.html b/integrations-langwatch.html index 41e3be8c17..9103db550e 100644 --- a/integrations-langwatch.html +++ b/integrations-langwatch.html @@ -10,7 +10,7 @@ - + diff --git a/integrations/notion/notion-agent-conversational.html b/integrations/notion/notion-agent-conversational.html index 3fc6b76c39..1137a73bb0 100644 --- a/integrations/notion/notion-agent-conversational.html +++ b/integrations/notion/notion-agent-conversational.html @@ -10,7 +10,7 @@ - + diff --git a/integrations/notion/notion-agent-meeting-notes.html b/integrations/notion/notion-agent-meeting-notes.html index ad01c4942e..b3086eb7ae 100644 --- a/integrations/notion/notion-agent-meeting-notes.html +++ b/integrations/notion/notion-agent-meeting-notes.html @@ -10,7 +10,7 @@ - + diff --git a/integrations/notion/setup.html b/integrations/notion/setup.html index a311ee4d7b..b77dfb7020 100644 --- a/integrations/notion/setup.html +++ b/integrations/notion/setup.html @@ -10,7 +10,7 @@ - + diff --git a/settings-global-variables.html b/settings-global-variables.html index 2f7791c337..902306d9b8 100644 --- a/settings-global-variables.html +++ b/settings-global-variables.html @@ -10,7 +10,7 @@ - + diff --git a/settings-project-general-settings.html b/settings-project-general-settings.html index 1ceed2b647..3b754782c5 100644 --- a/settings-project-general-settings.html +++ b/settings-project-general-settings.html @@ -10,7 +10,7 @@ - + diff --git a/starter-projects-basic-prompting.html b/starter-projects-basic-prompting.html index 8481025cac..32ff1ef0c7 100644 --- a/starter-projects-basic-prompting.html +++ b/starter-projects-basic-prompting.html @@ -10,7 +10,7 @@ - + diff --git a/starter-projects-blog-writer.html b/starter-projects-blog-writer.html index 59fee81b76..45a0576145 100644 --- a/starter-projects-blog-writer.html +++ b/starter-projects-blog-writer.html @@ -10,7 +10,7 @@ - + diff --git a/starter-projects-document-qa.html b/starter-projects-document-qa.html index 0ee12d3cfb..c688de6a93 100644 --- a/starter-projects-document-qa.html +++ b/starter-projects-document-qa.html @@ -10,7 +10,7 @@ - + diff --git a/starter-projects-memory-chatbot.html b/starter-projects-memory-chatbot.html index 7fc44280b9..727d8ccd71 100644 --- a/starter-projects-memory-chatbot.html +++ b/starter-projects-memory-chatbot.html @@ -10,7 +10,7 @@ - + diff --git a/starter-projects-vector-store-rag.html b/starter-projects-vector-store-rag.html index a489003fe7..66fcb4d45f 100644 --- a/starter-projects-vector-store-rag.html +++ b/starter-projects-vector-store-rag.html @@ -10,7 +10,7 @@ - + diff --git a/whats-new-a-new-chapter-langflow.html b/whats-new-a-new-chapter-langflow.html index a83e2c0500..8c266e4a2d 100644 --- a/whats-new-a-new-chapter-langflow.html +++ b/whats-new-a-new-chapter-langflow.html @@ -10,7 +10,7 @@ - + diff --git a/workspace-api.html b/workspace-api.html index 50a5c7d970..44b10c8576 100644 --- a/workspace-api.html +++ b/workspace-api.html @@ -10,7 +10,7 @@ - + diff --git a/workspace-logs.html b/workspace-logs.html index 6abc3f2a3f..a3597898df 100644 --- a/workspace-logs.html +++ b/workspace-logs.html @@ -10,7 +10,7 @@ - + diff --git a/workspace-playground.html b/workspace-playground.html index ed17ecab20..b0efe8a9e8 100644 --- a/workspace-playground.html +++ b/workspace-playground.html @@ -10,7 +10,7 @@ - + diff --git a/workspace.html b/workspace.html index 8c37009538..af2bc72c8e 100644 --- a/workspace.html +++ b/workspace.html @@ -10,7 +10,7 @@ - +