Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
Fix variable typo (#8084)
Nam Vu2d7954c7da44
diff --git a/api/configs/feature/__init__.py b/api/configs/feature/__init__.pyindex 303bce2aa50..12e8e665939 100644--- a/api/configs/feature/__init__.py+++ b/api/configs/feature/__init__.py@@ -46,7 +46,7 @@ class CodeExecutionSandboxConfig(BaseSettings):"""CODE_EXECUTION_ENDPOINT: HttpUrl = Field(- description="endpoint URL of code execution servcie",+ description="endpoint URL of code execution service",default="http://sandbox:8194",)@@ -415,7 +415,7 @@ class MailConfig(BaseSettings):"""MAIL_TYPE: Optional[str] = Field(- description="Mail provider type name, default to None, availabile values are `smtp` and `resend`.",+ description="Mail provider type name, default to None, available values are `smtp` and `resend`.",default=None,)diff --git a/api/constants/recommended_apps.json b/api/constants/recommended_apps.jsonindex df4adc4a1f8..3779fb0180e 100644--- a/api/constants/recommended_apps.json+++ b/api/constants/recommended_apps.json@@ -320,7 +320,7 @@"icon_background": "#FFEAD5","id": "e9870913-dd01-4710-9f06-15d4180ca1ce","mode": "advanced-chat",- "name": "Knowledge Retreival + Chatbot "+ "name": "Knowledge Retrieval + Chatbot "},"app_id": "e9870913-dd01-4710-9f06-15d4180ca1ce","category": "Workflow",@@ -423,7 +423,7 @@"name": "Website Generator"},"a23b57fa-85da-49c0-a571-3aff375976c1": {- "export_data": "app:\n icon: \"\\U0001F911\"\n icon_background: '#E4FBCC'\n mode: agent-chat\n name: Investment Analysis Report Copilot\nmodel_config:\n agent_mode:\n enabled: true\n max_iteration: 5\n strategy: function_call\n tools:\n - enabled: true\n isDeleted: false\n notAuthor: false\n provider_id: yahoo\n provider_name: yahoo\n provider_type: builtin\n tool_label: Analytics\n tool_name: yahoo_finance_analytics\n tool_parameters:\n end_date: ''\n start_date: ''\n symbol: ''\n - enabled: true\n isDeleted: false\n notAuthor: false\n provider_id: yahoo\n provider_name: yahoo\n provider_type: builtin\n tool_label: News\n tool_name: yahoo_finance_news\n tool_parameters:\n symbol: ''\n - enabled: true\n isDeleted: false\n notAuthor: false\n provider_id: yahoo\n provider_name: yahoo\n provider_type: builtin\n tool_label: Ticker\n tool_name: yahoo_finance_ticker\n tool_parameters:\n symbol: ''\n annotation_reply:\n enabled: false\n chat_prompt_config: {}\n completion_prompt_config: {}\n dataset_configs:\n datasets:\n datasets: []\n retrieval_model: single\n dataset_query_variable: ''\n external_data_tools: []\n file_upload:\n image:\n detail: high\n enabled: false\n number_limits: 3\n transfer_methods:\n - remote_url\n - local_file\n model:\n completion_params:\n frequency_penalty: 0.5\n max_tokens: 4096\n presence_penalty: 0.5\n stop: []\n temperature: 0.2\n top_p: 0.75\n mode: chat\n name: gpt-4-1106-preview\n provider: openai\n more_like_this:\n enabled: false\n opening_statement: 'Welcome to your personalized Investment Analysis Copilot service,\n where we delve into the depths of stock analysis to provide you with comprehensive\n insights. To begin our journey into the financial world, try to ask:\n\n '\n pre_prompt: \"# Job Description: Data Analysis Copilot\\n## Character\\nMy primary\\\n \\ goal is to provide user with expert data analysis advice. Using extensive and\\\n \\ detailed data. Tell me the stock (with ticket symbol) you want to analyze. I\\\n \\ will do all fundemental, technical, market sentiment, and Marcoeconomical analysis\\\n \\ for the stock as an expert. \\n\\n## Skills \\n### Skill 1: Search for stock information\\\n \\ using 'Ticker' from Yahoo Finance \\n### Skill 2: Search for recent news using\\\n \\ 'News' for the target company. \\n### Skill 3: Search for financial figures and\\\n \\ analytics using 'Analytics' for the target company\\n\\n## Workflow\\nAsks the\\\n \\ user which stocks with ticker name need to be analyzed and then performs the\\\n \\ following analysis in sequence. \\n**Part I: Fundamental analysis: financial\\\n \\ reporting analysis\\n*Objective 1: In-depth analysis of the financial situation\\\n \\ of the target company.\\n*Steps:\\n1. Identify the object of analysis:\\n<Record\\\n \\ 1.1: Introduce the basic information of {{company}}>\\n\\n\\n2. Access to financial\\\n \\ reports \\n<Use tool: 'Ticker', 'News', and 'Analytics'>\\n- Obtain the key data\\\n \\ of the latest financial report of the target company {{company}} organized by\\\n \\ Yahoo Finance. \\n\\n\\n<Record 1.2: Record the analysis results acquisition date\\\n \\ and source link >\\n3. Vertical Analysis:\\n- Get the insight of the company's\\\n \\ balance sheet Income Statement and cash flow. \\n- Analyze Income Statement:\\\n \\ Analyze the proportion of each type of income and expense to total income. /Analyze\\\n \\ Balance Sheet: Analyze the proportion of each asset and liability to total assets\\\n \\ or total liabilities./ Analyze Cash Flow \\n-<Record 1.3: Record the result of\\\n \\ the analysis of Balance sheet cash flow and Income Statement>\\n4. Ratio Analysis:\\n\\\n - analyze the Profitability Ratios Solvency Ratios Operational Efficiency Ratios\\\n \\ and Market Performance Ratios of the company. \\n(Profitability Ratios: Such\\\n \\ as net profit margin gross profit margin operating profit margin to assess the\\\n \\ company's profitability.)\\n(Solvency Ratios: Such as debt-to-asset ratio interest\\\n \\ coverage ratio to assess the company's ability to pay its debts.)\\n(Operational\\\n \\ Efficiency Ratios: Such as inventory turnover accounts receivable turnover to\\\n \\ assess the company's operational efficiency.)\\n(Market Performance Ratios: Such\\\n \\ as price-to-earnings ratio price-to-book ratio to assess the company's market\\\n \\ performance.)>\\n-<Record 1.4: Record the conclusions and results of the analysis.\\\n \\ >\\n5. Comprehensive Analysis and Conclusion:\\n- Combine the above analyses to\\\n \\ evaluate the company's financial health profitability solvency and operational\\\n \\ efficiency comprehensively. Identify the main financial risks and potential\\\n \\ opportunities facing the company.\\n-<Record 1.5: Record the overall conclusion\\\n \\ risks and opportunities. >\\nOrganize and output [Record 1.1] [Record 1.2] [Record\\\n \\ 1.3] [Record 1.4] [Record 1.5] \\nPart II: Foundamental Analysis: Industry\\n\\\n *Objective 2: To analyze the position and competitiveness of the target company\\\n \\ {{company}} in the industry. \\n\\n\\n* Steps:\\n1. Determine the industry classification:\\n\\\n - Define the industry to which the target company belongs.\\n- Search for company\\\n \\ information to determine its main business and industry.\\n-<Record 2.1: the\\\n \\ company's industry classification >\\n2. Market Positioning and Segmentation\\\n \\ analysis:\\n- To assess the company's market positioning and segmentation. \\n\\\n - Understand the company's market share growth rate and competitors in the industry\\\n \\ to analyze them. \\n-<Record 2.2: the company's market share ranking major competitors\\\n \\ the analysis result and insight etc.>\\n3. Analysis \\n- Analyze the development\\\n \\ trend of the industry. \\n- <Record 2.3: the development trend of the industry.\\\n \\ > \\n4. Competitors\\n- Analyze the competition around the target company \\n-\\\n \\ <Record 2.4: a analysis on the competition of the target company > \\nOrganize\\\n \\ and output [Record 2.1] [Record 2.2] [Record 2.3] [Record 2.4]\\nCombine the\\\n \\ above Record and output all the analysis in the form of a investment analysis\\\n \\ report. Use markdown syntax for a structured output. \\n\\n## Constraints\\n- Your\\\n \\ responses should be strictly on analysis tasks. Use a structured language and\\\n \\ think step by step. \\n- The language you use should be identical to the user's\\\n \\ language.\\n- Avoid addressing questions regarding work tools and regulations.\\n\\\n - Give a structured response using bullet points and markdown syntax. Give an\\\n \\ introduction to the situation first then analyse the main trend in the graph.\\\n \\ \\n\"\n prompt_type: simple\n retriever_resource:\n enabled: true\n sensitive_word_avoidance:\n configs: []\n enabled: false\n type: ''\n speech_to_text:\n enabled: false\n suggested_questions:\n - 'Analyze the stock of Tesla. '\n - What are some recent development on Nvidia?\n - 'Do a fundamental analysis for Amazon. '\n suggested_questions_after_answer:\n enabled: true\n text_to_speech:\n enabled: false\n user_input_form:\n - text-input:\n default: ''\n label: company\n required: false\n variable: company\n",+ "export_data": "app:\n icon: \"\\U0001F911\"\n icon_background: '#E4FBCC'\n mode: agent-chat\n name: Investment Analysis Report Copilot\nmodel_config:\n agent_mode:\n enabled: true\n max_iteration: 5\n strategy: function_call\n tools:\n - enabled: true\n isDeleted: false\n notAuthor: false\n provider_id: yahoo\n provider_name: yahoo\n provider_type: builtin\n tool_label: Analytics\n tool_name: yahoo_finance_analytics\n tool_parameters:\n end_date: ''\n start_date: ''\n symbol: ''\n - enabled: true\n isDeleted: false\n notAuthor: false\n provider_id: yahoo\n provider_name: yahoo\n provider_type: builtin\n tool_label: News\n tool_name: yahoo_finance_news\n tool_parameters:\n symbol: ''\n - enabled: true\n isDeleted: false\n notAuthor: false\n provider_id: yahoo\n provider_name: yahoo\n provider_type: builtin\n tool_label: Ticker\n tool_name: yahoo_finance_ticker\n tool_parameters:\n symbol: ''\n annotation_reply:\n enabled: false\n chat_prompt_config: {}\n completion_prompt_config: {}\n dataset_configs:\n datasets:\n datasets: []\n retrieval_model: single\n dataset_query_variable: ''\n external_data_tools: []\n file_upload:\n image:\n detail: high\n enabled: false\n number_limits: 3\n transfer_methods:\n - remote_url\n - local_file\n model:\n completion_params:\n frequency_penalty: 0.5\n max_tokens: 4096\n presence_penalty: 0.5\n stop: []\n temperature: 0.2\n top_p: 0.75\n mode: chat\n name: gpt-4-1106-preview\n provider: openai\n more_like_this:\n enabled: false\n opening_statement: 'Welcome to your personalized Investment Analysis Copilot service,\n where we delve into the depths of stock analysis to provide you with comprehensive\n insights. To begin our journey into the financial world, try to ask:\n\n '\n pre_prompt: \"# Job Description: Data Analysis Copilot\\n## Character\\nMy primary\\\n \\ goal is to provide user with expert data analysis advice. Using extensive and\\\n \\ detailed data. Tell me the stock (with ticket symbol) you want to analyze. I\\\n \\ will do all fundamental, technical, market sentiment, and Marco economical analysis\\\n \\ for the stock as an expert. \\n\\n## Skills \\n### Skill 1: Search for stock information\\\n \\ using 'Ticker' from Yahoo Finance \\n### Skill 2: Search for recent news using\\\n \\ 'News' for the target company. \\n### Skill 3: Search for financial figures and\\\n \\ analytics using 'Analytics' for the target company\\n\\n## Workflow\\nAsks the\\\n \\ user which stocks with ticker name need to be analyzed and then performs the\\\n \\ following analysis in sequence. \\n**Part I: Fundamental analysis: financial\\\n \\ reporting analysis\\n*Objective 1: In-depth analysis of the financial situation\\\n \\ of the target company.\\n*Steps:\\n1. Identify the object of analysis:\\n<Record\\\n \\ 1.1: Introduce the basic information of {{company}}>\\n\\n\\n2. Access to financial\\\n \\ reports \\n<Use tool: 'Ticker', 'News', and 'Analytics'>\\n- Obtain the key data\\\n \\ of the latest financial report of the target company {{company}} organized by\\\n \\ Yahoo Finance. \\n\\n\\n<Record 1.2: Record the analysis results acquisition date\\\n \\ and source link >\\n3. Vertical Analysis:\\n- Get the insight of the company's\\\n \\ balance sheet Income Statement and cash flow. \\n- Analyze Income Statement:\\\n \\ Analyze the proportion of each type of income and expense to total income. /Analyze\\\n \\ Balance Sheet: Analyze the proportion of each asset and liability to total assets\\\n \\ or total liabilities./ Analyze Cash Flow \\n-<Record 1.3: Record the result of\\\n \\ the analysis of Balance sheet cash flow and Income Statement>\\n4. Ratio Analysis:\\n\\\n - analyze the Profitability Ratios Solvency Ratios Operational Efficiency Ratios\\\n \\ and Market Performance Ratios of the company. \\n(Profitability Ratios: Such\\\n \\ as net profit margin gross profit margin operating profit margin to assess the\\\n \\ company's profitability.)\\n(Solvency Ratios: Such as debt-to-asset ratio interest\\\n \\ coverage ratio to assess the company's ability to pay its debts.)\\n(Operational\\\n \\ Efficiency Ratios: Such as inventory turnover accounts receivable turnover to\\\n \\ assess the company's operational efficiency.)\\n(Market Performance Ratios: Such\\\n \\ as price-to-earnings ratio price-to-book ratio to assess the company's market\\\n \\ performance.)>\\n-<Record 1.4: Record the conclusions and results of the analysis.\\\n \\ >\\n5. Comprehensive Analysis and Conclusion:\\n- Combine the above analyses to\\\n \\ evaluate the company's financial health profitability solvency and operational\\\n \\ efficiency comprehensively. Identify the main financial risks and potential\\\n \\ opportunities facing the company.\\n-<Record 1.5: Record the overall conclusion\\\n \\ risks and opportunities. >\\nOrganize and output [Record 1.1] [Record 1.2] [Record\\\n \\ 1.3] [Record 1.4] [Record 1.5] \\nPart II: Fundamental Analysis: Industry\\n\\\n *Objective 2: To analyze the position and competitiveness of the target company\\\n \\ {{company}} in the industry. \\n\\n\\n* Steps:\\n1. Determine the industry classification:\\n\\\n - Define the industry to which the target company belongs.\\n- Search for company\\\n \\ information to determine its main business and industry.\\n-<Record 2.1: the\\\n \\ company's industry classification >\\n2. Market Positioning and Segmentation\\\n \\ analysis:\\n- To assess the company's market positioning and segmentation. \\n\\\n - Understand the company's market share growth rate and competitors in the industry\\\n \\ to analyze them. \\n-<Record 2.2: the company's market share ranking major competitors\\\n \\ the analysis result and insight etc.>\\n3. Analysis \\n- Analyze the development\\\n \\ trend of the industry. \\n- <Record 2.3: the development trend of the industry.\\\n \\ > \\n4. Competitors\\n- Analyze the competition around the target company \\n-\\\n \\ <Record 2.4: a analysis on the competition of the target company > \\nOrganize\\\n \\ and output [Record 2.1] [Record 2.2] [Record 2.3] [Record 2.4]\\nCombine the\\\n \\ above Record and output all the analysis in the form of a investment analysis\\\n \\ report. Use markdown syntax for a structured output. \\n\\n## Constraints\\n- Your\\\n \\ responses should be strictly on analysis tasks. Use a structured language and\\\n \\ think step by step. \\n- The language you use should be identical to the user's\\\n \\ language.\\n- Avoid addressing questions regarding work tools and regulations.\\n\\\n - Give a structured response using bullet points and markdown syntax. Give an\\\n \\ introduction to the situation first then analyse the main trend in the graph.\\\n \\ \\n\"\n prompt_type: simple\n retriever_resource:\n enabled: true\n sensitive_word_avoidance:\n configs: []\n enabled: false\n type: ''\n speech_to_text:\n enabled: false\n suggested_questions:\n - 'Analyze the stock of Tesla. '\n - What are some recent development on Nvidia?\n - 'Do a fundamental analysis for Amazon. '\n suggested_questions_after_answer:\n enabled: true\n text_to_speech:\n enabled: false\n user_input_form:\n - text-input:\n default: ''\n label: company\n required: false\n variable: company\n","icon": "🤑","icon_background": "#E4FBCC","id": "a23b57fa-85da-49c0-a571-3aff375976c1",@@ -438,8 +438,8 @@"mode": "advanced-chat","name": "Workflow Planning Assistant "},- "e9d92058-7d20-4904-892f-75d90bef7587":{"export_data":"app:\n icon: \"\\U0001F916\"\n icon_background: '#FFEAD5'\n mode: advanced-chat\n name: 'Automated Email Reply '\nworkflow:\n features:\n file_upload:\n image:\n enabled: false\n opening_statement: ''\n retriever_resource:\n enabled: false\n sensitive_word_avoidance:\n enabled: false\n speech_to_text:\n enabled: false\n suggested_questions: []\n suggested_questions_after_answer:\n enabled: false\n text_to_speech:\n enabled: false\n language: ''\n voice: ''\n graph:\n edges:\n - data:\n isInIteration: false\n sourceType: code\n targetType: iteration\n id: 1716909112104-source-1716909114582-target\n source: '1716909112104'\n sourceHandle: source\n target: '1716909114582'\n targetHandle: target\n type: custom\n zIndex: 0\n - data:\n isInIteration: false\n sourceType: iteration\n targetType: template-transform\n id: 1716909114582-source-1716913435742-target\n source: '1716909114582'\n sourceHandle: source\n target: '1716913435742'\n targetHandle: target\n type: custom\n zIndex: 0\n - data:\n isInIteration: false\n sourceType: template-transform\n targetType: answer\n id: 1716913435742-source-1716806267180-target\n source: '1716913435742'\n sourceHandle: source\n target: '1716806267180'\n targetHandle: target\n type: custom\n zIndex: 0\n - data:\n isInIteration: false\n sourceType: start\n targetType: tool\n id: 1716800588219-source-1716946869294-target\n source: '1716800588219'\n sourceHandle: source\n target: '1716946869294'\n targetHandle: target\n type: custom\n zIndex: 0\n - data:\n isInIteration: false\n sourceType: tool\n targetType: code\n id: 1716946869294-source-1716909112104-target\n source: '1716946869294'\n sourceHandle: source\n target: '1716909112104'\n targetHandle: target\n type: custom\n zIndex: 0\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: tool\n targetType: code\n id: 1716946889408-source-1716909122343-target\n source: '1716946889408'\n sourceHandle: source\n target: '1716909122343'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: code\n targetType: code\n id: 1716909122343-source-1716951357236-target\n source: '1716909122343'\n sourceHandle: source\n target: '1716951357236'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: code\n targetType: llm\n id: 1716951357236-source-1716913272656-target\n source: '1716951357236'\n sourceHandle: source\n target: '1716913272656'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: template-transform\n targetType: llm\n id: 1716951236700-source-1716951159073-target\n source: '1716951236700'\n sourceHandle: source\n target: '1716951159073'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: llm\n targetType: template-transform\n id: 1716951159073-source-1716952228079-target\n source: '1716951159073'\n sourceHandle: source\n target: '1716952228079'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: template-transform\n targetType: tool\n id: 1716952228079-source-1716952912103-target\n source: '1716952228079'\n sourceHandle: source\n target: '1716952912103'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: llm\n targetType: question-classifier\n id: 1716913272656-source-1716960721611-target\n source: '1716913272656'\n sourceHandle: source\n target: '1716960721611'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: question-classifier\n targetType: llm\n id: 1716960721611-1-1716909125498-target\n source: '1716960721611'\n sourceHandle: '1'\n target: '1716909125498'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: question-classifier\n targetType: llm\n id: 1716960721611-2-1716960728136-target\n source: '1716960721611'\n sourceHandle: '2'\n target: '1716960728136'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: llm\n targetType: variable-aggregator\n id: 1716909125498-source-1716960791399-target\n source: '1716909125498'\n sourceHandle: source\n target: '1716960791399'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: variable-aggregator\n targetType: template-transform\n id: 1716960791399-source-1716951236700-target\n source: '1716960791399'\n sourceHandle: source\n target: '1716951236700'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: question-classifier\n targetType: template-transform\n id: 1716960721611-1716960736883-1716960834468-target\n source: '1716960721611'\n sourceHandle: '1716960736883'\n target: '1716960834468'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: llm\n targetType: variable-aggregator\n id: 1716960728136-source-1716960791399-target\n source: '1716960728136'\n sourceHandle: source\n target: '1716960791399'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: template-transform\n targetType: variable-aggregator\n id: 1716960834468-source-1716960791399-target\n source: '1716960834468'\n sourceHandle: source\n target: '1716960791399'\n targetHandle: target\n type: custom\n zIndex: 1002\n nodes:\n - data:\n desc: ''\n selected: false\n title: Start\n type: start\n variables:\n - label: Your Email\n max_length: 256\n options: []\n required: true\n type: text-input\n variable: email\n - label: Maximum Number of Email you want to retrieve\n max_length: 256\n options: []\n required: true\n type: number\n variable: maxResults\n height: 115\n id: '1716800588219'\n position:\n x: 30\n y: 445\n positionAbsolute:\n x: 30\n y: 445\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n - data:\n answer: '{{#1716913435742.output#}}'\n desc: ''\n selected: false\n title: Direct Reply\n type: answer\n variables: []\n height: 106\n id: '1716806267180'\n position:\n x: 4700\n y: 445\n positionAbsolute:\n x: 4700\n y: 445\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n - data:\n code: \"def main(message: str) -> dict:\\n import json\\n \\n # Parse\\\n \\ the JSON string\\n parsed_data = json.loads(message)\\n \\n # Extract\\\n \\ all the \\\"id\\\" values\\n ids = [msg['id'] for msg in parsed_data['messages']]\\n\\\n \\ \\n return {\\n \\\"result\\\": ids\\n }\"\n code_language: python3\n desc: ''\n outputs:\n result:\n children: null\n type: array[string]\n selected: false\n title: 'Code: Extract Email ID'\n type: code\n variables:\n - value_selector:\n - '1716946869294'\n - text\n variable: message\n height: 53\n id: '1716909112104'\n position:\n x: 638\n y: 445\n positionAbsolute:\n x: 638\n y: 445\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n - data:\n desc: ''\n height: 490\n iterator_selector:\n - '1716909112104'\n - result\n output_selector:\n - '1716909125498'\n - text\n output_type: array[string]\n selected: false\n startNodeType: tool\n start_node_id: '1716946889408'\n title: 'Iteraction '\n type: iteration\n width: 3393.7520359289056\n height: 490\n id: '1716909114582'\n position:\n x: 942\n y: 445\n positionAbsolute:\n x: 942\n y: 445\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 3394\n zIndex: 1\n - data:\n desc: ''\n isInIteration: true\n isIterationStart: true\n iteration_id: '1716909114582'\n provider_id: e64b4c7f-2795-499c-8d11-a971a7d57fc9\n provider_name: List and Get Gmail\n provider_type: api\n selected: false\n title: getMessage\n tool_configurations: {}\n tool_label: getMessage\n tool_name: getMessage\n tool_parameters:\n format:\n type: mixed\n value: full\n id:\n type: mixed\n value: '{{#1716909114582.item#}}'\n userId:\n type: mixed\n value: '{{#1716800588219.email#}}'\n type: tool\n extent: parent\n height: 53\n id: '1716946889408'\n parentId: '1716909114582'\n position:\n x: 117\n y: 85\n positionAbsolute:\n x: 1059\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1001\n - data:\n code: \"\\ndef main(email_json: dict) -> dict:\\n import json \\n email_dict\\\n \\ = json.loads(email_json)\\n base64_data = email_dict['payload']['parts'][0]['body']['data']\\n\\\n \\n return {\\n \\\"result\\\": base64_data, \\n }\\n\"\n code_language: python3\n desc: ''\n isInIteration: true\n iteration_id: '1716909114582'\n outputs:\n result:\n children: null\n type: string\n selected: false\n title: 'Code: Extract Email Body'\n type: code\n variables:\n - value_selector:\n - '1716946889408'\n - text\n variable: email_json\n extent: parent\n height: 53\n id: '1716909122343'\n parentId: '1716909114582'\n position:\n x: 421\n y: 85\n positionAbsolute:\n x: 1363\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: 'Generate reply. '\n isInIteration: true\n iteration_id: '1716909114582'\n model:\n completion_params:\n temperature: 0.7\n mode: chat\n name: gpt-4o\n provider: openai\n prompt_template:\n - id: 982014aa-702b-4d7c-ae1f-08dbceb6e930\n role: system\n text: \"<Task> \\nRespond to the emails. \\n<Emails>\\n{{#1716913272656.text#}}\\n\\\n <Your response>\"\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n configs:\n detail: high\n enabled: true\n extent: parent\n height: 127\n id: '1716909125498'\n parentId: '1716909114582'\n position:\n x: 1625\n y: 85\n positionAbsolute:\n x: 2567\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: ''\n isInIteration: true\n iteration_id: '1716909114582'\n model:\n completion_params:\n temperature: 0.7\n mode: chat\n name: gpt-4o\n provider: openai\n prompt_template:\n - id: fd8de569-c099-4320-955b-61aa4b054789\n role: system\n text: \"<Task>\\nYou need to transform the input data (in base64 encoding)\\\n \\ to text. Input base64. Output text. \\n<input>\\n{{#1716909122343.result#}}\\n\\\n <output> \"\n selected: false\n title: 'Base64 Decoder '\n type: llm\n variables: []\n vision:\n configs:\n detail: high\n enabled: false\n extent: parent\n height: 97\n id: '1716913272656'\n parentId: '1716909114582'\n position:\n x: 1025\n y: 85\n positionAbsolute:\n x: 1967\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 | join(\"\\n\\n -------------------------\\n\\n\") }}'\n title: 'Template '\n type: template-transform\n variables:\n - value_selector:\n - '1716909114582'\n - output\n variable: arg1\n height: 53\n id: '1716913435742'\n position:\n x: 4396\n y: 445\n positionAbsolute:\n x: 4396\n y: 445\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n - data:\n desc: ''\n provider_id: e64b4c7f-2795-499c-8d11-a971a7d57fc9\n provider_name: List and Get Gmail\n provider_type: api\n selected: false\n title: listMessages\n tool_configurations: {}\n tool_label: listMessages\n tool_name: listMessages\n tool_parameters:\n maxResults:\n type: variable\n value:\n - '1716800588219'\n - maxResults\n userId:\n type: mixed\n value: '{{#1716800588219.email#}}'\n type: tool\n height: 53\n id: '1716946869294'\n position:\n x: 334\n y: 445\n positionAbsolute:\n x: 334\n y: 445\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: ''\n isInIteration: true\n iteration_id: '1716909114582'\n model:\n completion_params:\n temperature: 0.7\n mode: chat\n name: gpt-4o\n provider: openai\n prompt_template:\n - id: b7fd0ec5-864a-42c6-9d04-a1958bd4fc0d\n role: system\n text: \"<Task>\\nYou need to encode the input data from text to base64. Input\\\n \\ text. Output base64 encoding. Output nothing other than base64 encoding.\\\n \\ \\n<input>\\n{{#1716951236700.output#}}\\n<output> \"\n selected: false\n title: Base64 Encoder\n type: llm\n variables: []\n vision:\n configs:\n detail: high\n enabled: true\n extent: parent\n height: 97\n id: '1716951159073'\n parentId: '1716909114582'\n position:\n x: 2525.7520359289056\n y: 85\n positionAbsolute:\n x: 3467.7520359289056\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n desc: Generaate MIME email template\n isInIteration: true\n iteration_id: '1716909114582'\n selected: false\n template: \"Content-Type: text/plain; charset=\\\"utf-8\\\"\\r\\nContent-Transfer-Encoding:\\\n \\ 7bit\\r\\nMIME-Version: 1.0\\r\\nTo: {{ emailMetadata.recipientEmail }} #\\\n \\ [email protected]\\r\\nFrom: {{ emailMetadata.senderEmail }} # [email protected]\\r\\\n \\nSubject: Re: {{ emailMetadata.subject }} \\r\\n\\r\\n{{ text }}\\r\\n\"\n title: 'Template: Reply Email'\n type: template-transform\n variables:\n - value_selector:\n - '1716951357236'\n - result\n variable: emailMetadata\n - value_selector:\n - '1716960791399'\n - output\n variable: text\n extent: parent\n height: 83\n id: '1716951236700'\n parentId: '1716909114582'\n position:\n x: 2231.269960149744\n y: 85\n positionAbsolute:\n x: 3173.269960149744\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n code: \"def main(email_json: dict) -> dict:\\n import json\\n if isinstance(email_json,\\\n \\ str): \\n email_json = json.loads(email_json)\\n\\n subject = None\\n\\\n \\ recipient_email = None \\n sender_email = None\\n \\n headers\\\n \\ = email_json['payload']['headers']\\n for header in headers:\\n \\\n \\ if header['name'] == 'Subject':\\n subject = header['value']\\n\\\n \\ elif header['name'] == 'To':\\n recipient_email = header['value']\\n\\\n \\ elif header['name'] == 'From':\\n sender_email = header['value']\\n\\\n \\n return {\\n \\\"result\\\": [subject, recipient_email, sender_email]\\n\\\n \\ }\\n\"\n code_language: python3\n desc: \"Recipient, Sender, Subject\\uFF0COutput Array[String]\"\n isInIteration: true\n iteration_id: '1716909114582'\n outputs:\n result:\n children: null\n type: array[string]\n selected: false\n title: Extract Email Metadata\n type: code\n variables:\n - value_selector:\n - '1716946889408'\n - text\n variable: email_json\n extent: parent\n height: 101\n id: '1716951357236'\n parentId: '1716909114582'\n position:\n x: 725\n y: 85\n positionAbsolute:\n x: 1667\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n desc: ''\n isInIteration: true\n iteration_id: '1716909114582'\n selected: false\n template: '{\"raw\": \"{{ encoded_message }}\"}'\n title: \"Template\\uFF1AEmail Request Body\"\n type: template-transform\n variables:\n - value_selector:\n - '1716951159073'\n - text\n variable: encoded_message\n extent: parent\n height: 53\n id: '1716952228079'\n parentId: '1716909114582'\n position:\n x: 2828.4325280181324\n y: 86.31950791077293\n positionAbsolute:\n x: 3770.4325280181324\n y: 531.3195079107729\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n desc: ''\n isInIteration: true\n iteration_id: '1716909114582'\n provider_id: 038963aa-43c8-47fc-be4b-0255c19959c1\n provider_name: Draft Gmail\n provider_type: api\n selected: false\n title: createDraft\n tool_configurations: {}\n tool_label: createDraft\n tool_name: createDraft\n tool_parameters:\n message:\n type: mixed\n value: '{{#1716952228079.output#}}'\n userId:\n type: mixed\n value: '{{#1716800588219.email#}}'\n type: tool\n extent: parent\n height: 53\n id: '1716952912103'\n parentId: '1716909114582'\n position:\n x: 3133.7520359289056\n y: 85\n positionAbsolute:\n x: 4075.7520359289056\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n classes:\n - id: '1'\n name: 'Technical questions, related to product '\n - id: '2'\n name: Unrelated to technicals, non technical\n - id: '1716960736883'\n name: Other questions\n desc: ''\n instructions: ''\n isInIteration: true\n iteration_id: '1716909114582'\n model:\n completion_params:\n temperature: 0.7\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n query_variable_selector:\n - '1716800588219'\n - sys.query\n selected: false\n title: Question Classifier\n topics: []\n type: question-classifier\n extent: parent\n height: 255\n id: '1716960721611'\n parentId: '1716909114582'\n position:\n x: 1325\n y: 85\n positionAbsolute:\n x: 2267\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: ''\n isInIteration: true\n iteration_id: '1716909114582'\n model:\n completion_params:\n temperature: 0.7\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - id: a639bbf8-bc58-42a2-b477-6748e80ecda2\n role: system\n text: \"<Task> \\nRespond to the emails. \\n<Emails>\\n{{#1716913272656.text#}}\\n\\\n <Your response>\"\n selected: false\n title: 'LLM - Non technical '\n type: llm\n variables: []\n vision:\n enabled: false\n extent: parent\n height: 97\n id: '1716960728136'\n parentId: '1716909114582'\n position:\n x: 1625\n y: 251\n positionAbsolute:\n x: 2567\n y: 696\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n desc: ''\n isInIteration: true\n iteration_id: '1716909114582'\n output_type: string\n selected: false\n title: Variable Aggregator\n type: variable-aggregator\n variables:\n - - '1716909125498'\n - text\n - - '1716960728136'\n - text\n - - '1716960834468'\n - output\n extent: parent\n height: 164\n id: '1716960791399'\n parentId: '1716909114582'\n position:\n x: 1931.2699601497438\n y: 85\n positionAbsolute:\n x: 2873.269960149744\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n desc: Other questions\n isInIteration: true\n iteration_id: '1716909114582'\n selected: false\n template: 'Sorry, I cannot answer that. This is outside my capabilities. '\n title: 'Direct Reply '\n type: template-transform\n variables: []\n extent: parent\n height: 83\n id: '1716960834468'\n parentId: '1716909114582'\n position:\n x: 1625\n y: 385.57142857142856\n positionAbsolute:\n x: 2567\n y: 830.5714285714286\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n author: Dify\n desc: ''\n height: 153\n selected: false\n showAuthor: true\n text: '{\"root\":{\"children\":[{\"children\":[{\"detail\":0,\"format\":3,\"mode\":\"normal\",\"style\":\"font-size:\n 14px;\",\"text\":\"OpenAPI-Swagger for all custom tools: \",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":3},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"openapi:\n 3.0.0\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"info:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" title:\n Gmail API\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n OpenAPI schema for Gmail API methods `users.messages.get`, `users.messages.list`,\n and `users.drafts.create`.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" version:\n 1.0.0\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"servers:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n url: https://gmail.googleapis.com\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Gmail API Server\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"paths:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" /gmail/v1/users/{userId}/messages/{id}:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" get:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" summary:\n Get a message.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Retrieves a specific message by ID.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" operationId:\n getMessage\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" parameters:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n name: userId\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" in:\n path\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" required:\n true\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The user''s email address. The special value `me` can be used to indicate\n the authenticated user.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n name: id\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" in:\n path\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" required:\n true\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The ID of the message to retrieve.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n name: format\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" in:\n query\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" required:\n false\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" enum:\n [full, metadata, minimal, raw]\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" default:\n full\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The format to return the message in.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" responses:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''200'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Successful response\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" content:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" application/json:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n object\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" properties:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" id:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" threadId:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" labelIds:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n array\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" items:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" snippet:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" historyId:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" internalDate:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" payload:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n object\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" sizeEstimate:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n integer\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" raw:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''401'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Unauthorized\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''403'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Forbidden\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''404'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Not Found\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" /gmail/v1/users/{userId}/messages:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" get:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" summary:\n List messages.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Lists the messages in the user''s mailbox.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" operationId:\n listMessages\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" parameters:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n name: userId\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" in:\n path\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" required:\n true\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The user''s email address. The special value `me` can be used to indicate\n the authenticated user.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n name: maxResults\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" in:\n query\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n integer\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" format:\n int32\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" default:\n 100\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Maximum number of messages to return.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" responses:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''200'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Successful response\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" content:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" application/json:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n object\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" properties:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" messages:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n array\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" items:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n object\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" properties:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" id:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" threadId:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" nextPageToken:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" resultSizeEstimate:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n integer\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''401'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Unauthorized\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" /gmail/v1/users/{userId}/drafts:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" post:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" summary:\n Creates a new draft.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" operationId:\n createDraft\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" tags:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n Drafts\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" parameters:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n name: userId\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" in:\n path\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" required:\n true\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The user''s email address. The special value \\\"me\\\" can be used to indicate\n the authenticated user.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" requestBody:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" required:\n true\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" content:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" application/json:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n object\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" properties:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" message:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n object\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" properties:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" raw:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The entire email message in an RFC 2822 formatted and base64url encoded\n string.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" responses:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''200'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Successful response with the created draft.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" content:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" application/json:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n object\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" properties:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" id:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The immutable ID of the draft.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" message:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n object\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" properties:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" id:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The immutable ID of the message.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" threadId:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The ID of the thread the message belongs to.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" labelIds:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n array\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" items:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" snippet:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n A short part of the message text.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" historyId:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The ID of the last history record that modified this message.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''400'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Bad Request - The request is invalid.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''401'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Unauthorized - Authentication is required.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''403'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Forbidden - The user does not have permission to create drafts.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''404'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Not Found - The specified user does not exist.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''500'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Internal Server Error - An error occurred on the server.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"components:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" securitySchemes:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" OAuth2:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n oauth2\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" flows:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" authorizationCode:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" authorizationUrl:\n https://accounts.google.com/o/oauth2/auth\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" tokenUrl:\n https://oauth2.googleapis.com/token\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" scopes:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" https://mail.google.com/:\n All access to Gmail.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" https://www.googleapis.com/auth/gmail.compose:\n Send email on your behalf.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" https://www.googleapis.com/auth/gmail.modify:\n Modify your email.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"security:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n OAuth2:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n https://mail.google.com/\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n https://www.googleapis.com/auth/gmail.compose\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n https://www.googleapis.com/auth/gmail.modify\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}'\n theme: yellow\n title: ''\n type: ''\n width: 367\n height: 153\n id: '1718992681576'\n position:\n x: 321.9646831030669\n y: 538.1642616264143\n positionAbsolute:\n x: 321.9646831030669\n y: 538.1642616264143\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom-note\n width: 367\n - data:\n author: Dify\n desc: ''\n height: 158\n selected: false\n showAuthor: true\n text: '{\"root\":{\"children\":[{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Replace\n custom tools after added this template to your own workspace. \",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Fill\n in \",\"type\":\"text\",\"version\":1},{\"detail\":0,\"format\":1,\"mode\":\"normal\",\"style\":\"\",\"text\":\"your\n email \",\"type\":\"text\",\"version\":1},{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"and\n the \",\"type\":\"text\",\"version\":1},{\"detail\":0,\"format\":1,\"mode\":\"normal\",\"style\":\"\",\"text\":\"maximum\n number of results you want to retrieve from your inbox \",\"type\":\"text\",\"version\":1},{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"to\n get started. \",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}'\n theme: blue\n title: ''\n type: ''\n width: 287\n height: 158\n id: '1718992805687'\n position:\n x: 18.571428571428356\n y: 237.80887395992687\n positionAbsolute:\n x: 18.571428571428356\n y: 237.80887395992687\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom-note\n width: 287\n - data:\n author: Dify\n desc: ''\n height: 375\n selected: true\n showAuthor: true\n text: '{\"root\":{\"children\":[{\"children\":[{\"detail\":0,\"format\":1,\"mode\":\"normal\",\"style\":\"font-size:\n 16px;\",\"text\":\"Steps within Iteraction node: \",\"type\":\"text\",\"version\":1},{\"type\":\"linebreak\",\"version\":1},{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"1.\n getMessage: This step retrieves the incoming email message.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":1},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"2.\n Code: Extract Email Body: Custom code is executed to extract the body of\n the email from the retrieved message.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"3.\n Extract Email Metadata: Extracts metadata from the email, such as the recipient,\n sender, subject, and other relevant information.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"4.\n Base64 Decoder: Decodes the email content from Base64 encoding.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"5.\n Question Classifier (gpt-3.5-turbo): Uses a GPT-3.5-turbo model to classify\n the email content into different categories. For each classified question,\n the workflow uses a GPT-4.0 model to generate an appropriate reply:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"6.\n Template: Reply Email: Uses a template to generate a MIME email format for\n the reply.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"6.\n Base64 Encoder: Encodes the generated reply email content back to Base64.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"7.\n Template: Email Request: Prepares the email request using a template.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"8.\n createDraft: Creates a draft of the email reply.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"This\n workflow automates the process of reading, classifying, responding to, and\n drafting replies to incoming emails, leveraging advanced language models\n to generate contextually appropriate responses.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}'\n theme: blue\n title: ''\n type: ''\n width: 640\n height: 375\n id: '1718993366836'\n position:\n x: 966.7525290975368\n y: 971.80362905854\n positionAbsolute:\n x: 966.7525290975368\n y: 971.80362905854\n selected: true\n sourcePosition: right\n targetPosition: left\n type: custom-note\n width: 640\n - data:\n author: Dify\n desc: ''\n height: 400\n selected: false\n showAuthor: true\n text: '{\"root\":{\"children\":[{\"children\":[{\"detail\":0,\"format\":3,\"mode\":\"normal\",\"style\":\"font-size:\n 16px;\",\"text\":\"Preparation\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":3},{\"children\":[{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Enable\n Gmail API in Google Cloud Console\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":1},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Configure\n OAuth Client ID, OAuth Client Secrets, and OAuth Consent Screen for the\n Web Application in Google Cloud Console\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":2},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Use\n Postman to authorize and obtain the OAuth Access Token (Google''s Access\n Token will expire after 1 hour and cannot be used for a long time)\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":3}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"list\",\"version\":1,\"listType\":\"bullet\",\"start\":1,\"tag\":\"ul\"},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Users\n who want to try building an AI auto-reply email can refer to this document\n to use Postman (Postman.com) to obtain all the above keys: https://blog.postman.com/how-to-access-google-apis-using-oauth-in-postman/.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Developers\n who want to use Google OAuth to call the Gmail API to develop corresponding\n plugins can refer to this official document: \",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"https://developers.google.com/identity/protocols/oauth2/web-server.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"At\n this stage, it is still a bit difficult to reproduce this example within\n the Dify platform. If you have development capabilities, developing the\n corresponding plugin externally and using an external database to automatically\n read and write the user''s Access Token and write the Refresh Token would\n be a better choice.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}'\n theme: blue\n title: ''\n type: ''\n width: 608\n height: 400\n id: '1718993557447'\n position:\n x: 354.0157230378119\n y: -1.2732157979666\n positionAbsolute:\n x: 354.0157230378119\n y: -1.2732157979666\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom-note\n width: 608\n viewport:\n x: 147.09446825757777\n y: 101.03530130020579\n zoom: 0.9548416039104178\n","icon":"\ud83e\udd16","icon_background":"#FFEAD5","id":"e9d92058-7d20-4904-892f-75d90bef7587","mode":"advanced-chat","name":"Automated Email Reply "},- "98b87f88-bd22-4d86-8b74-86beba5e0ed4":{"export_data":"app:\n icon: \"\\U0001F916\"\n icon_background: '#FFEAD5'\n mode: workflow\n name: 'Book Translation '\nworkflow:\n features:\n file_upload:\n image:\n enabled: false\n number_limits: 3\n transfer_methods:\n - local_file\n - remote_url\n opening_statement: ''\n retriever_resource:\n enabled: false\n sensitive_word_avoidance:\n enabled: false\n speech_to_text:\n enabled: false\n suggested_questions: []\n suggested_questions_after_answer:\n enabled: false\n text_to_speech:\n enabled: false\n language: ''\n voice: ''\n graph:\n edges:\n - data:\n isInIteration: false\n sourceType: start\n targetType: code\n id: 1711067409646-source-1717916867969-target\n source: '1711067409646'\n sourceHandle: source\n target: '1717916867969'\n targetHandle: target\n type: custom\n zIndex: 0\n - data:\n isInIteration: false\n sourceType: code\n targetType: iteration\n id: 1717916867969-source-1717916955547-target\n source: '1717916867969'\n sourceHandle: source\n target: '1717916955547'\n targetHandle: target\n type: custom\n zIndex: 0\n - data:\n isInIteration: true\n iteration_id: '1717916955547'\n sourceType: llm\n targetType: llm\n id: 1717916961837-source-1717916977413-target\n source: '1717916961837'\n sourceHandle: source\n target: '1717916977413'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1717916955547'\n sourceType: llm\n targetType: llm\n id: 1717916977413-source-1717916984996-target\n source: '1717916977413'\n sourceHandle: source\n target: '1717916984996'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1717916955547'\n sourceType: llm\n targetType: llm\n id: 1717916984996-source-1717916991709-target\n source: '1717916984996'\n sourceHandle: source\n target: '1717916991709'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: false\n sourceType: iteration\n targetType: template-transform\n id: 1717916955547-source-1717917057450-target\n source: '1717916955547'\n sourceHandle: source\n target: '1717917057450'\n targetHandle: target\n type: custom\n zIndex: 0\n - data:\n isInIteration: false\n sourceType: template-transform\n targetType: end\n id: 1717917057450-source-1711068257370-target\n source: '1717917057450'\n sourceHandle: source\n target: '1711068257370'\n targetHandle: target\n type: custom\n zIndex: 0\n nodes:\n - data:\n desc: ''\n selected: false\n title: Start\n type: start\n variables:\n - label: Input Text\n max_length: null\n options: []\n required: true\n type: paragraph\n variable: input_text\n dragging: false\n height: 89\n id: '1711067409646'\n position:\n x: 30\n y: 301.5\n positionAbsolute:\n x: 30\n y: 301.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1717917057450'\n - output\n variable: final\n selected: false\n title: End\n type: end\n height: 89\n id: '1711068257370'\n position:\n x: 2291\n y: 301.5\n positionAbsolute:\n x: 2291\n y: 301.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n - data:\n code: \"\\ndef main(input_text: str) -> str:\\n token_limit = 1000\\n overlap\\\n \\ = 100\\n chunk_size = int(token_limit * 6 * (4/3))\\n\\n # Initialize\\\n \\ variables\\n chunks = []\\n start_index = 0\\n text_length = len(input_text)\\n\\\n \\n # Loop until the end of the text is reached\\n while start_index\\\n \\ < text_length:\\n # If we are not at the beginning, adjust the start_index\\\n \\ to ensure overlap\\n if start_index > 0:\\n start_index\\\n \\ -= overlap\\n\\n # Calculate end index for the current chunk\\n \\\n \\ end_index = start_index + chunk_size\\n if end_index > text_length:\\n\\\n \\ end_index = text_length\\n\\n # Add the current chunk\\\n \\ to the list\\n chunks.append(input_text[start_index:end_index])\\n\\\n \\n # Update the start_index for the next chunk\\n start_index\\\n \\ += chunk_size\\n\\n return {\\n \\\"chunks\\\": chunks,\\n }\\n\"\n code_language: python3\n dependencies: []\n desc: 'token_limit = 1000\n\n overlap = 100'\n outputs:\n chunks:\n children: null\n type: array[string]\n selected: false\n title: Code\n type: code\n variables:\n - value_selector:\n - '1711067409646'\n - input_text\n variable: input_text\n height: 101\n id: '1717916867969'\n position:\n x: 336\n y: 301.5\n positionAbsolute:\n x: 336\n y: 301.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n - data:\n desc: 'Take good care on maximum number of iterations. '\n height: 203\n iterator_selector:\n - '1717916867969'\n - chunks\n output_selector:\n - '1717916991709'\n - text\n output_type: array[string]\n selected: false\n startNodeType: llm\n start_node_id: '1717916961837'\n title: Iteration\n type: iteration\n width: 1289\n height: 203\n id: '1717916955547'\n position:\n x: 638\n y: 301.5\n positionAbsolute:\n x: 638\n y: 301.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 1289\n zIndex: 1\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: ''\n isInIteration: true\n isIterationStart: true\n iteration_id: '1717916955547'\n model:\n completion_params:\n temperature: 0.7\n mode: chat\n name: gpt-4o\n provider: openai\n prompt_template:\n - id: 7261280b-cb27-4f84-8363-b93e09246d16\n role: system\n text: \"<Task> Identify the technical terms in the users input. Use the following\\\n \\ format {XXX} -> {XXX} to show the corresponding technical terms before\\\n \\ and after translation. \\n\\n<Input Text> \\n{{#1717916955547.item#}}\\n\\\n \\n<Example>\\n| \\u82F1\\u6587 | \\u4E2D\\u6587 |\\n| --- | --- |\\n| Prompt\\\n \\ Engineering | \\u63D0\\u793A\\u8BCD\\u5DE5\\u7A0B |\\n| Text Generation \\_\\\n | \\u6587\\u672C\\u751F\\u6210 |\\n| Token \\_| Token |\\n| Prompt \\_| \\u63D0\\\n \\u793A\\u8BCD |\\n| Meta Prompting \\_| \\u5143\\u63D0\\u793A |\\n| diffusion\\\n \\ models \\_| \\u6269\\u6563\\u6A21\\u578B |\\n| Agent \\_| \\u667A\\u80FD\\u4F53\\\n \\ |\\n| Transformer \\_| Transformer |\\n| Zero Shot \\_| \\u96F6\\u6837\\u672C\\\n \\ |\\n| Few Shot \\_| \\u5C11\\u6837\\u672C |\\n| chat window \\_| \\u804A\\u5929\\\n \\ |\\n| context | \\u4E0A\\u4E0B\\u6587 |\\n| stock photo \\_| \\u56FE\\u5E93\\u7167\\\n \\u7247 |\\n\\n\\n<Technical Terms> \"\n selected: false\n title: 'Identify Terms '\n type: llm\n variables: []\n vision:\n configs:\n detail: high\n enabled: true\n extent: parent\n height: 97\n id: '1717916961837'\n parentId: '1717916955547'\n position:\n x: 117\n y: 85\n positionAbsolute:\n x: 755\n y: 386.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1001\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: ''\n isInIteration: true\n iteration_id: '1717916955547'\n model:\n completion_params:\n temperature: 0.7\n mode: chat\n name: gpt-4o\n provider: openai\n prompt_template:\n - id: 05e03f0d-c1a9-43ab-b4c0-44b55049434d\n role: system\n text: \"<Task> You are a professional translator proficient in Simplified\\\n \\ Chinese especially skilled in translating professional academic papers\\\n \\ into easy-to-understand popular science articles. Please help me translate\\\n \\ the following english paragraph into Chinese, in a style similar to\\\n \\ Chinese popular science articles .\\n<Constraints> \\nTranslate directly\\\n \\ based on the English content, maintain the original format and do not\\\n \\ omit any information. \\n<Before Translation> \\n{{#1717916955547.item#}}\\n\\\n <Terms>\\n{{#1717916961837.text#}}\\n<Direct Translation> \"\n selected: false\n title: 1st Translation\n type: llm\n variables: []\n vision:\n configs:\n detail: high\n enabled: true\n extent: parent\n height: 97\n id: '1717916977413'\n parentId: '1717916955547'\n position:\n x: 421\n y: 85\n positionAbsolute:\n x: 1059\n y: 386.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: ''\n isInIteration: true\n iteration_id: '1717916955547'\n model:\n completion_params:\n temperature: 0.7\n mode: chat\n name: gpt-4o\n provider: openai\n prompt_template:\n - id: 9e6cc050-465e-4632-abc9-411acb255a95\n role: system\n text: \"<Task>\\nBased on the results of the direct translation, point out\\\n \\ specific issues it have. Accurate descriptions are required, avoiding\\\n \\ vague statements, and there's no need to add content or formats that\\\n \\ were not present in the original text, including but not liimited to:\\\n \\ \\n- inconsistent with chinese expression habits, clearly indicate where\\\n \\ it does not conform\\n- Clumsy sentences, specify the location, no need\\\n \\ to offer suggestions for modification, which will be fixed during free\\\n \\ translation\\n- Obscure and difficult to understand, attempts to explain\\\n \\ may be made\\n- \\u65E0\\u6F0F\\u8BD1\\uFF08\\u539F\\u2F42\\u4E2D\\u7684\\u5173\\\n \\u952E\\u8BCD\\u3001\\u53E5\\u2F26\\u3001\\u6BB5\\u843D\\u90FD\\u5E94\\u4F53\\u73B0\\\n \\u5728\\u8BD1\\u2F42\\u4E2D\\uFF09\\u3002\\n- \\u2F46\\u9519\\u8BD1\\uFF08\\u770B\\\n \\u9519\\u539F\\u2F42\\u3001\\u8BEF\\u89E3\\u539F\\u2F42\\u610F\\u601D\\u5747\\u7B97\\\n \\u9519\\u8BD1\\uFF09\\u3002\\n- \\u2F46\\u6709\\u610F\\u589E\\u52A0\\u6216\\u8005\\\n \\u5220\\u51CF\\u7684\\u539F\\u2F42\\u5185\\u5BB9\\uFF08\\u7FFB\\u8BD1\\u5E76\\u2FAE\\\n \\u521B\\u4F5C\\uFF0C\\u9700\\u5C0A\\u91CD\\u4F5C\\u8005\\u89C2 \\u70B9\\uFF1B\\u53EF\\\n \\u4EE5\\u9002\\u5F53\\u52A0\\u8BD1\\u8005\\u6CE8\\u8BF4\\u660E\\uFF09\\u3002\\n-\\\n \\ \\u8BD1\\u2F42\\u6D41\\u7545\\uFF0C\\u7B26\\u5408\\u4E2D\\u2F42\\u8868\\u8FBE\\u4E60\\\n \\u60EF\\u3002\\n- \\u5173\\u4E8E\\u2F08\\u540D\\u7684\\u7FFB\\u8BD1\\u3002\\u6280\\\n \\u672F\\u56FE\\u4E66\\u4E2D\\u7684\\u2F08\\u540D\\u901A\\u5E38\\u4E0D\\u7FFB\\u8BD1\\\n \\uFF0C\\u4F46\\u662F\\u2F00\\u4E9B\\u4F17\\u6240 \\u5468\\u77E5\\u7684\\u2F08\\u540D\\\n \\u9700\\u2F64\\u4E2D\\u2F42\\uFF08\\u5982\\u4E54\\u5E03\\u65AF\\uFF09\\u3002\\n-\\\n \\ \\u5173\\u4E8E\\u4E66\\u540D\\u7684\\u7FFB\\u8BD1\\u3002\\u6709\\u4E2D\\u2F42\\u7248\\\n \\u7684\\u56FE\\u4E66\\uFF0C\\u8BF7\\u2F64\\u4E2D\\u2F42\\u7248\\u4E66\\u540D\\uFF1B\\\n \\u2F46\\u4E2D\\u2F42\\u7248 \\u7684\\u56FE\\u4E66\\uFF0C\\u76F4\\u63A5\\u2F64\\u82F1\\\n \\u2F42\\u4E66\\u540D\\u3002\\n- \\u5173\\u4E8E\\u56FE\\u8868\\u7684\\u7FFB\\u8BD1\\\n \\u3002\\u8868\\u683C\\u4E2D\\u7684\\u8868\\u9898\\u3001\\u8868\\u5B57\\u548C\\u6CE8\\\n \\u89E3\\u7B49\\u5747\\u9700\\u7FFB\\u8BD1\\u3002\\u56FE\\u9898 \\u9700\\u8981\\u7FFB\\\n \\u8BD1\\u3002\\u754C\\u2FAF\\u622A\\u56FE\\u4E0D\\u9700\\u8981\\u7FFB\\u8BD1\\u56FE\\\n \\u5B57\\u3002\\u89E3\\u91CA\\u6027\\u56FE\\u9700\\u8981\\u6309\\u7167\\u4E2D\\u82F1\\\n \\u2F42 \\u5BF9\\u7167\\u683C\\u5F0F\\u7ED9\\u51FA\\u56FE\\u5B57\\u7FFB\\u8BD1\\u3002\\\n \\n- \\u5173\\u4E8E\\u82F1\\u2F42\\u672F\\u8BED\\u7684\\u8868\\u8FF0\\u3002\\u82F1\\\n \\u2F42\\u672F\\u8BED\\u2FB8\\u6B21\\u51FA\\u73B0\\u65F6\\uFF0C\\u5E94\\u8BE5\\u6839\\\n \\u636E\\u8BE5\\u672F\\u8BED\\u7684 \\u6D41\\u2F8F\\u60C5\\u51B5\\uFF0C\\u4F18\\u5148\\\n \\u4F7F\\u2F64\\u7B80\\u5199\\u5F62\\u5F0F\\uFF0C\\u5E76\\u5728\\u5176\\u540E\\u4F7F\\\n \\u2F64\\u62EC\\u53F7\\u52A0\\u82F1\\u2F42\\u3001\\u4E2D\\u2F42 \\u5168\\u79F0\\u6CE8\\\n \\u89E3\\uFF0C\\u683C\\u5F0F\\u4E3A\\uFF08\\u4E3E\\u4F8B\\uFF09\\uFF1AHTML\\uFF08\\\n Hypertext Markup Language\\uFF0C\\u8D85\\u2F42\\u672C\\u6807\\u8BC6\\u8BED\\u2F94\\\n \\uFF09\\u3002\\u7136\\u540E\\u5728\\u4E0B\\u2F42\\u4E2D\\u76F4\\u63A5\\u4F7F\\u2F64\\\n \\u7B80\\u5199\\u5F62 \\u5F0F\\u3002\\u5F53\\u7136\\uFF0C\\u5FC5\\u8981\\u65F6\\u4E5F\\\n \\u53EF\\u4EE5\\u6839\\u636E\\u8BED\\u5883\\u4F7F\\u2F64\\u4E2D\\u3001\\u82F1\\u2F42\\\n \\u5168\\u79F0\\u3002\\n- \\u5173\\u4E8E\\u4EE3\\u7801\\u6E05\\u5355\\u548C\\u4EE3\\\n \\u7801\\u2F5A\\u6BB5\\u3002\\u539F\\u4E66\\u4E2D\\u5305\\u542B\\u7684\\u7A0B\\u5E8F\\\n \\u4EE3\\u7801\\u4E0D\\u8981\\u6C42\\u8BD1\\u8005\\u5F55 \\u2F0A\\uFF0C\\u4F46\\u5E94\\\n \\u8BE5\\u4F7F\\u2F64\\u201C\\u539F\\u4E66P99\\u2EDA\\u4EE3\\u78011\\u201D\\uFF08\\\n \\u5373\\u539F\\u4E66\\u7B2C99\\u2EDA\\u4E2D\\u7684\\u7B2C\\u2F00\\u6BB5\\u4EE3 \\u7801\\\n \\uFF09\\u7684\\u683C\\u5F0F\\u4F5C\\u51FA\\u6807\\u6CE8\\u3002\\u540C\\u65F6\\uFF0C\\\n \\u8BD1\\u8005\\u5E94\\u8BE5\\u5728\\u6709\\u6761\\u4EF6\\u7684\\u60C5\\u51B5\\u4E0B\\\n \\u68C0\\u6838\\u4EE3 \\u7801\\u7684\\u6B63\\u786E\\u6027\\uFF0C\\u5BF9\\u53D1\\u73B0\\\n \\u7684\\u9519\\u8BEF\\u4EE5\\u8BD1\\u8005\\u6CE8\\u5F62\\u5F0F\\u8BF4\\u660E\\u3002\\\n \\u7A0B\\u5E8F\\u4EE3\\u7801\\u4E2D\\u7684\\u6CE8 \\u91CA\\u8981\\u6C42\\u7FFB\\u8BD1\\\n \\uFF0C\\u5982\\u679C\\u8BD1\\u7A3F\\u4E2D\\u6CA1\\u6709\\u4EE3\\u7801\\uFF0C\\u5219\\\n \\u5E94\\u8BE5\\u4EE5\\u2F00\\u53E5\\u82F1\\u2F42\\uFF08\\u6CE8\\u91CA\\uFF09 \\u2F00\\\n \\u53E5\\u4E2D\\u2F42\\uFF08\\u6CE8\\u91CA\\uFF09\\u7684\\u5F62\\u5F0F\\u7ED9\\u51FA\\\n \\u6CE8\\u91CA\\u3002\\n- \\u5173\\u4E8E\\u6807\\u70B9\\u7B26\\u53F7\\u3002\\u8BD1\\\n \\u7A3F\\u4E2D\\u7684\\u6807\\u70B9\\u7B26\\u53F7\\u8981\\u9075\\u5FAA\\u4E2D\\u2F42\\\n \\u8868\\u8FBE\\u4E60\\u60EF\\u548C\\u4E2D\\u2F42\\u6807 \\u70B9\\u7B26\\u53F7\\u7684\\\n \\u4F7F\\u2F64\\u4E60\\u60EF\\uFF0C\\u4E0D\\u80FD\\u7167\\u642C\\u539F\\u2F42\\u7684\\\n \\u6807\\u70B9\\u7B26\\u53F7\\u3002\\n\\n<Direct Translation>\\n{{#1717916977413.text#}}\\n\\\n <Original Text>\\n{{#1717916955547.item#}}\\n<Terms>\\n{{#1717916961837.text#}}\\n\\\n <Problems with the Direct Translation>\"\n selected: false\n title: 'Problems '\n type: llm\n variables: []\n vision:\n configs:\n detail: high\n enabled: true\n extent: parent\n height: 97\n id: '1717916984996'\n parentId: '1717916955547'\n position:\n x: 725\n y: 85\n positionAbsolute:\n x: 1363\n y: 386.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: ''\n isInIteration: true\n iteration_id: '1717916955547'\n model:\n completion_params:\n temperature: 0.7\n mode: chat\n name: gpt-4o\n provider: openai\n prompt_template:\n - id: 4d7ae758-2d7b-4404-ad9f-d6748ee64439\n role: system\n text: \"<Task>\\nBased on the results of the direct translation in the first\\\n \\ step and the problems identified in the second step, re-translate to\\\n \\ achieve a meaning-based interpretation. Ensure the original intent of\\\n \\ the content is preserved while making it easier to understand and more\\\n \\ in line with Chinese expression habits. All the while maintaining the\\\n \\ original format unchanged. \\n\\n<Guidance>\\n- inconsistent with chinese\\\n \\ expression habits, clearly indicate where it does not conform\\n- Clumsy\\\n \\ sentences, specify the location, no need to offer suggestions for modification,\\\n \\ which will be fixed during free translation\\n- Obscure and difficult\\\n \\ to understand, attempts to explain may be made\\n- \\u65E0\\u6F0F\\u8BD1\\\n \\uFF08\\u539F\\u2F42\\u4E2D\\u7684\\u5173\\u952E\\u8BCD\\u3001\\u53E5\\u2F26\\u3001\\\n \\u6BB5\\u843D\\u90FD\\u5E94\\u4F53\\u73B0\\u5728\\u8BD1\\u2F42\\u4E2D\\uFF09\\u3002\\\n \\n- \\u2F46\\u9519\\u8BD1\\uFF08\\u770B\\u9519\\u539F\\u2F42\\u3001\\u8BEF\\u89E3\\\n \\u539F\\u2F42\\u610F\\u601D\\u5747\\u7B97\\u9519\\u8BD1\\uFF09\\u3002\\n- \\u2F46\\\n \\u6709\\u610F\\u589E\\u52A0\\u6216\\u8005\\u5220\\u51CF\\u7684\\u539F\\u2F42\\u5185\\\n \\u5BB9\\uFF08\\u7FFB\\u8BD1\\u5E76\\u2FAE\\u521B\\u4F5C\\uFF0C\\u9700\\u5C0A\\u91CD\\\n \\u4F5C\\u8005\\u89C2 \\u70B9\\uFF1B\\u53EF\\u4EE5\\u9002\\u5F53\\u52A0\\u8BD1\\u8005\\\n \\u6CE8\\u8BF4\\u660E\\uFF09\\u3002\\n- \\u8BD1\\u2F42\\u6D41\\u7545\\uFF0C\\u7B26\\\n \\u5408\\u4E2D\\u2F42\\u8868\\u8FBE\\u4E60\\u60EF\\u3002\\n- \\u5173\\u4E8E\\u2F08\\\n \\u540D\\u7684\\u7FFB\\u8BD1\\u3002\\u6280\\u672F\\u56FE\\u4E66\\u4E2D\\u7684\\u2F08\\\n \\u540D\\u901A\\u5E38\\u4E0D\\u7FFB\\u8BD1\\uFF0C\\u4F46\\u662F\\u2F00\\u4E9B\\u4F17\\\n \\u6240 \\u5468\\u77E5\\u7684\\u2F08\\u540D\\u9700\\u2F64\\u4E2D\\u2F42\\uFF08\\u5982\\\n \\u4E54\\u5E03\\u65AF\\uFF09\\u3002\\n- \\u5173\\u4E8E\\u4E66\\u540D\\u7684\\u7FFB\\\n \\u8BD1\\u3002\\u6709\\u4E2D\\u2F42\\u7248\\u7684\\u56FE\\u4E66\\uFF0C\\u8BF7\\u2F64\\\n \\u4E2D\\u2F42\\u7248\\u4E66\\u540D\\uFF1B\\u2F46\\u4E2D\\u2F42\\u7248 \\u7684\\u56FE\\\n \\u4E66\\uFF0C\\u76F4\\u63A5\\u2F64\\u82F1\\u2F42\\u4E66\\u540D\\u3002\\n- \\u5173\\\n \\u4E8E\\u56FE\\u8868\\u7684\\u7FFB\\u8BD1\\u3002\\u8868\\u683C\\u4E2D\\u7684\\u8868\\\n \\u9898\\u3001\\u8868\\u5B57\\u548C\\u6CE8\\u89E3\\u7B49\\u5747\\u9700\\u7FFB\\u8BD1\\\n \\u3002\\u56FE\\u9898 \\u9700\\u8981\\u7FFB\\u8BD1\\u3002\\u754C\\u2FAF\\u622A\\u56FE\\\n \\u4E0D\\u9700\\u8981\\u7FFB\\u8BD1\\u56FE\\u5B57\\u3002\\u89E3\\u91CA\\u6027\\u56FE\\\n \\u9700\\u8981\\u6309\\u7167\\u4E2D\\u82F1\\u2F42 \\u5BF9\\u7167\\u683C\\u5F0F\\u7ED9\\\n \\u51FA\\u56FE\\u5B57\\u7FFB\\u8BD1\\u3002\\n- \\u5173\\u4E8E\\u82F1\\u2F42\\u672F\\\n \\u8BED\\u7684\\u8868\\u8FF0\\u3002\\u82F1\\u2F42\\u672F\\u8BED\\u2FB8\\u6B21\\u51FA\\\n \\u73B0\\u65F6\\uFF0C\\u5E94\\u8BE5\\u6839\\u636E\\u8BE5\\u672F\\u8BED\\u7684 \\u6D41\\\n \\u2F8F\\u60C5\\u51B5\\uFF0C\\u4F18\\u5148\\u4F7F\\u2F64\\u7B80\\u5199\\u5F62\\u5F0F\\\n \\uFF0C\\u5E76\\u5728\\u5176\\u540E\\u4F7F\\u2F64\\u62EC\\u53F7\\u52A0\\u82F1\\u2F42\\\n \\u3001\\u4E2D\\u2F42 \\u5168\\u79F0\\u6CE8\\u89E3\\uFF0C\\u683C\\u5F0F\\u4E3A\\uFF08\\\n \\u4E3E\\u4F8B\\uFF09\\uFF1AHTML\\uFF08Hypertext Markup Language\\uFF0C\\u8D85\\\n \\u2F42\\u672C\\u6807\\u8BC6\\u8BED\\u2F94\\uFF09\\u3002\\u7136\\u540E\\u5728\\u4E0B\\\n \\u2F42\\u4E2D\\u76F4\\u63A5\\u4F7F\\u2F64\\u7B80\\u5199\\u5F62 \\u5F0F\\u3002\\u5F53\\\n \\u7136\\uFF0C\\u5FC5\\u8981\\u65F6\\u4E5F\\u53EF\\u4EE5\\u6839\\u636E\\u8BED\\u5883\\\n \\u4F7F\\u2F64\\u4E2D\\u3001\\u82F1\\u2F42\\u5168\\u79F0\\u3002\\n- \\u5173\\u4E8E\\\n \\u4EE3\\u7801\\u6E05\\u5355\\u548C\\u4EE3\\u7801\\u2F5A\\u6BB5\\u3002\\u539F\\u4E66\\\n \\u4E2D\\u5305\\u542B\\u7684\\u7A0B\\u5E8F\\u4EE3\\u7801\\u4E0D\\u8981\\u6C42\\u8BD1\\\n \\u8005\\u5F55 \\u2F0A\\uFF0C\\u4F46\\u5E94\\u8BE5\\u4F7F\\u2F64\\u201C\\u539F\\u4E66\\\n P99\\u2EDA\\u4EE3\\u78011\\u201D\\uFF08\\u5373\\u539F\\u4E66\\u7B2C99\\u2EDA\\u4E2D\\\n \\u7684\\u7B2C\\u2F00\\u6BB5\\u4EE3 \\u7801\\uFF09\\u7684\\u683C\\u5F0F\\u4F5C\\u51FA\\\n \\u6807\\u6CE8\\u3002\\u540C\\u65F6\\uFF0C\\u8BD1\\u8005\\u5E94\\u8BE5\\u5728\\u6709\\\n \\u6761\\u4EF6\\u7684\\u60C5\\u51B5\\u4E0B\\u68C0\\u6838\\u4EE3 \\u7801\\u7684\\u6B63\\\n \\u786E\\u6027\\uFF0C\\u5BF9\\u53D1\\u73B0\\u7684\\u9519\\u8BEF\\u4EE5\\u8BD1\\u8005\\\n \\u6CE8\\u5F62\\u5F0F\\u8BF4\\u660E\\u3002\\u7A0B\\u5E8F\\u4EE3\\u7801\\u4E2D\\u7684\\\n \\u6CE8 \\u91CA\\u8981\\u6C42\\u7FFB\\u8BD1\\uFF0C\\u5982\\u679C\\u8BD1\\u7A3F\\u4E2D\\\n \\u6CA1\\u6709\\u4EE3\\u7801\\uFF0C\\u5219\\u5E94\\u8BE5\\u4EE5\\u2F00\\u53E5\\u82F1\\\n \\u2F42\\uFF08\\u6CE8\\u91CA\\uFF09 \\u2F00\\u53E5\\u4E2D\\u2F42\\uFF08\\u6CE8\\u91CA\\\n \\uFF09\\u7684\\u5F62\\u5F0F\\u7ED9\\u51FA\\u6CE8\\u91CA\\u3002\\n- \\u5173\\u4E8E\\\n \\u6807\\u70B9\\u7B26\\u53F7\\u3002\\u8BD1\\u7A3F\\u4E2D\\u7684\\u6807\\u70B9\\u7B26\\\n \\u53F7\\u8981\\u9075\\u5FAA\\u4E2D\\u2F42\\u8868\\u8FBE\\u4E60\\u60EF\\u548C\\u4E2D\\\n \\u2F42\\u6807 \\u70B9\\u7B26\\u53F7\\u7684\\u4F7F\\u2F64\\u4E60\\u60EF\\uFF0C\\u4E0D\\\n \\u80FD\\u7167\\u642C\\u539F\\u2F42\\u7684\\u6807\\u70B9\\u7B26\\u53F7\\u3002\\n\\n\\\n <Direct Translation> \\n{{#1717916977413.text#}}\\n<problems in the first\\\n \\ translation>\\n{{#1717916984996.text#}}\\n<Original Text>\\n{{#1711067409646.input_text#}}\\n\\\n <Terms>\\n{{#1717916961837.text#}}\\n<Free Translation> \"\n selected: false\n title: '2nd Translation '\n type: llm\n variables: []\n vision:\n configs:\n detail: high\n enabled: true\n extent: parent\n height: 97\n id: '1717916991709'\n parentId: '1717916955547'\n position:\n x: 1029\n y: 85\n positionAbsolute:\n x: 1667\n y: 386.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n desc: 'Combine all chunks of translation. '\n selected: false\n template: '{{ translated_text | join('' '') }}'\n title: Template\n type: template-transform\n variables:\n - value_selector:\n - '1717916955547'\n - output\n variable: translated_text\n height: 83\n id: '1717917057450'\n position:\n x: 1987\n y: 301.5\n positionAbsolute:\n x: 1987\n y: 301.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n - data:\n author: Dify\n desc: ''\n height: 186\n selected: false\n showAuthor: true\n text: '{\"root\":{\"children\":[{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Code\n node separates the input_text into chunks with length of token_limit. Each\n chunk overlap with each other to make sure the texts are consistent. \",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"The\n code node outputs an array of segmented texts of input_texts. \",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}'\n theme: blue\n title: ''\n type: ''\n width: 340\n height: 186\n id: '1718990593686'\n position:\n x: 259.3026056936437\n y: 451.6924912936374\n positionAbsolute:\n x: 259.3026056936437\n y: 451.6924912936374\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom-note\n width: 340\n - data:\n author: Dify\n desc: ''\n height: 128\n selected: false\n showAuthor: true\n text: '{\"root\":{\"children\":[{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Iterate\n through all the elements in output of the code node and translate each chunk\n using a three steps translation workflow. \",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}'\n theme: blue\n title: ''\n type: ''\n width: 355\n height: 128\n id: '1718991836605'\n position:\n x: 764.3891977435923\n y: 530.8917807505335\n positionAbsolute:\n x: 764.3891977435923\n y: 530.8917807505335\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom-note\n width: 355\n - data:\n author: Dify\n desc: ''\n height: 126\n selected: false\n showAuthor: true\n text: '{\"root\":{\"children\":[{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Avoid\n using a high token_limit, LLM''s performance decreases with longer context\n length for gpt-4o. \",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Recommend\n to use less than or equal to 1000 tokens. \",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}'\n theme: yellow\n title: ''\n type: ''\n width: 351\n height: 126\n id: '1718991882984'\n position:\n x: 304.49115824454367\n y: 148.4042994607805\n positionAbsolute:\n x: 304.49115824454367\n y: 148.4042994607805\n selected: true\n sourcePosition: right\n targetPosition: left\n type: custom-note\n width: 351\n viewport:\n x: 335.92505067152274\n y: 18.806553508850584\n zoom: 0.8705505632961259\n","icon":"\ud83e\udd16","icon_background":"#FFEAD5","id":"98b87f88-bd22-4d86-8b74-86beba5e0ed4","mode":"workflow","name":"Book Translation "},+ "e9d92058-7d20-4904-892f-75d90bef7587":{"export_data":"app:\n icon: \"\\U0001F916\"\n icon_background: '#FFEAD5'\n mode: advanced-chat\n name: 'Automated Email Reply '\nworkflow:\n features:\n file_upload:\n image:\n enabled: false\n opening_statement: ''\n retriever_resource:\n enabled: false\n sensitive_word_avoidance:\n enabled: false\n speech_to_text:\n enabled: false\n suggested_questions: []\n suggested_questions_after_answer:\n enabled: false\n text_to_speech:\n enabled: false\n language: ''\n voice: ''\n graph:\n edges:\n - data:\n isInIteration: false\n sourceType: code\n targetType: iteration\n id: 1716909112104-source-1716909114582-target\n source: '1716909112104'\n sourceHandle: source\n target: '1716909114582'\n targetHandle: target\n type: custom\n zIndex: 0\n - data:\n isInIteration: false\n sourceType: iteration\n targetType: template-transform\n id: 1716909114582-source-1716913435742-target\n source: '1716909114582'\n sourceHandle: source\n target: '1716913435742'\n targetHandle: target\n type: custom\n zIndex: 0\n - data:\n isInIteration: false\n sourceType: template-transform\n targetType: answer\n id: 1716913435742-source-1716806267180-target\n source: '1716913435742'\n sourceHandle: source\n target: '1716806267180'\n targetHandle: target\n type: custom\n zIndex: 0\n - data:\n isInIteration: false\n sourceType: start\n targetType: tool\n id: 1716800588219-source-1716946869294-target\n source: '1716800588219'\n sourceHandle: source\n target: '1716946869294'\n targetHandle: target\n type: custom\n zIndex: 0\n - data:\n isInIteration: false\n sourceType: tool\n targetType: code\n id: 1716946869294-source-1716909112104-target\n source: '1716946869294'\n sourceHandle: source\n target: '1716909112104'\n targetHandle: target\n type: custom\n zIndex: 0\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: tool\n targetType: code\n id: 1716946889408-source-1716909122343-target\n source: '1716946889408'\n sourceHandle: source\n target: '1716909122343'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: code\n targetType: code\n id: 1716909122343-source-1716951357236-target\n source: '1716909122343'\n sourceHandle: source\n target: '1716951357236'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: code\n targetType: llm\n id: 1716951357236-source-1716913272656-target\n source: '1716951357236'\n sourceHandle: source\n target: '1716913272656'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: template-transform\n targetType: llm\n id: 1716951236700-source-1716951159073-target\n source: '1716951236700'\n sourceHandle: source\n target: '1716951159073'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: llm\n targetType: template-transform\n id: 1716951159073-source-1716952228079-target\n source: '1716951159073'\n sourceHandle: source\n target: '1716952228079'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: template-transform\n targetType: tool\n id: 1716952228079-source-1716952912103-target\n source: '1716952228079'\n sourceHandle: source\n target: '1716952912103'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: llm\n targetType: question-classifier\n id: 1716913272656-source-1716960721611-target\n source: '1716913272656'\n sourceHandle: source\n target: '1716960721611'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: question-classifier\n targetType: llm\n id: 1716960721611-1-1716909125498-target\n source: '1716960721611'\n sourceHandle: '1'\n target: '1716909125498'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: question-classifier\n targetType: llm\n id: 1716960721611-2-1716960728136-target\n source: '1716960721611'\n sourceHandle: '2'\n target: '1716960728136'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: llm\n targetType: variable-aggregator\n id: 1716909125498-source-1716960791399-target\n source: '1716909125498'\n sourceHandle: source\n target: '1716960791399'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: variable-aggregator\n targetType: template-transform\n id: 1716960791399-source-1716951236700-target\n source: '1716960791399'\n sourceHandle: source\n target: '1716951236700'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: question-classifier\n targetType: template-transform\n id: 1716960721611-1716960736883-1716960834468-target\n source: '1716960721611'\n sourceHandle: '1716960736883'\n target: '1716960834468'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: llm\n targetType: variable-aggregator\n id: 1716960728136-source-1716960791399-target\n source: '1716960728136'\n sourceHandle: source\n target: '1716960791399'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1716909114582'\n sourceType: template-transform\n targetType: variable-aggregator\n id: 1716960834468-source-1716960791399-target\n source: '1716960834468'\n sourceHandle: source\n target: '1716960791399'\n targetHandle: target\n type: custom\n zIndex: 1002\n nodes:\n - data:\n desc: ''\n selected: false\n title: Start\n type: start\n variables:\n - label: Your Email\n max_length: 256\n options: []\n required: true\n type: text-input\n variable: email\n - label: Maximum Number of Email you want to retrieve\n max_length: 256\n options: []\n required: true\n type: number\n variable: maxResults\n height: 115\n id: '1716800588219'\n position:\n x: 30\n y: 445\n positionAbsolute:\n x: 30\n y: 445\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n - data:\n answer: '{{#1716913435742.output#}}'\n desc: ''\n selected: false\n title: Direct Reply\n type: answer\n variables: []\n height: 106\n id: '1716806267180'\n position:\n x: 4700\n y: 445\n positionAbsolute:\n x: 4700\n y: 445\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n - data:\n code: \"def main(message: str) -> dict:\\n import json\\n \\n # Parse\\\n \\ the JSON string\\n parsed_data = json.loads(message)\\n \\n # Extract\\\n \\ all the \\\"id\\\" values\\n ids = [msg['id'] for msg in parsed_data['messages']]\\n\\\n \\ \\n return {\\n \\\"result\\\": ids\\n }\"\n code_language: python3\n desc: ''\n outputs:\n result:\n children: null\n type: array[string]\n selected: false\n title: 'Code: Extract Email ID'\n type: code\n variables:\n - value_selector:\n - '1716946869294'\n - text\n variable: message\n height: 53\n id: '1716909112104'\n position:\n x: 638\n y: 445\n positionAbsolute:\n x: 638\n y: 445\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n - data:\n desc: ''\n height: 490\n iterator_selector:\n - '1716909112104'\n - result\n output_selector:\n - '1716909125498'\n - text\n output_type: array[string]\n selected: false\n startNodeType: tool\n start_node_id: '1716946889408'\n title: 'Iteraction '\n type: iteration\n width: 3393.7520359289056\n height: 490\n id: '1716909114582'\n position:\n x: 942\n y: 445\n positionAbsolute:\n x: 942\n y: 445\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 3394\n zIndex: 1\n - data:\n desc: ''\n isInIteration: true\n isIterationStart: true\n iteration_id: '1716909114582'\n provider_id: e64b4c7f-2795-499c-8d11-a971a7d57fc9\n provider_name: List and Get Gmail\n provider_type: api\n selected: false\n title: getMessage\n tool_configurations: {}\n tool_label: getMessage\n tool_name: getMessage\n tool_parameters:\n format:\n type: mixed\n value: full\n id:\n type: mixed\n value: '{{#1716909114582.item#}}'\n userId:\n type: mixed\n value: '{{#1716800588219.email#}}'\n type: tool\n extent: parent\n height: 53\n id: '1716946889408'\n parentId: '1716909114582'\n position:\n x: 117\n y: 85\n positionAbsolute:\n x: 1059\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1001\n - data:\n code: \"\\ndef main(email_json: dict) -> dict:\\n import json \\n email_dict\\\n \\ = json.loads(email_json)\\n base64_data = email_dict['payload']['parts'][0]['body']['data']\\n\\\n \\n return {\\n \\\"result\\\": base64_data, \\n }\\n\"\n code_language: python3\n desc: ''\n isInIteration: true\n iteration_id: '1716909114582'\n outputs:\n result:\n children: null\n type: string\n selected: false\n title: 'Code: Extract Email Body'\n type: code\n variables:\n - value_selector:\n - '1716946889408'\n - text\n variable: email_json\n extent: parent\n height: 53\n id: '1716909122343'\n parentId: '1716909114582'\n position:\n x: 421\n y: 85\n positionAbsolute:\n x: 1363\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: 'Generate reply. '\n isInIteration: true\n iteration_id: '1716909114582'\n model:\n completion_params:\n temperature: 0.7\n mode: chat\n name: gpt-4o\n provider: openai\n prompt_template:\n - id: 982014aa-702b-4d7c-ae1f-08dbceb6e930\n role: system\n text: \"<Task> \\nRespond to the emails. \\n<Emails>\\n{{#1716913272656.text#}}\\n\\\n <Your response>\"\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n configs:\n detail: high\n enabled: true\n extent: parent\n height: 127\n id: '1716909125498'\n parentId: '1716909114582'\n position:\n x: 1625\n y: 85\n positionAbsolute:\n x: 2567\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: ''\n isInIteration: true\n iteration_id: '1716909114582'\n model:\n completion_params:\n temperature: 0.7\n mode: chat\n name: gpt-4o\n provider: openai\n prompt_template:\n - id: fd8de569-c099-4320-955b-61aa4b054789\n role: system\n text: \"<Task>\\nYou need to transform the input data (in base64 encoding)\\\n \\ to text. Input base64. Output text. \\n<input>\\n{{#1716909122343.result#}}\\n\\\n <output> \"\n selected: false\n title: 'Base64 Decoder '\n type: llm\n variables: []\n vision:\n configs:\n detail: high\n enabled: false\n extent: parent\n height: 97\n id: '1716913272656'\n parentId: '1716909114582'\n position:\n x: 1025\n y: 85\n positionAbsolute:\n x: 1967\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 | join(\"\\n\\n -------------------------\\n\\n\") }}'\n title: 'Template '\n type: template-transform\n variables:\n - value_selector:\n - '1716909114582'\n - output\n variable: arg1\n height: 53\n id: '1716913435742'\n position:\n x: 4396\n y: 445\n positionAbsolute:\n x: 4396\n y: 445\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n - data:\n desc: ''\n provider_id: e64b4c7f-2795-499c-8d11-a971a7d57fc9\n provider_name: List and Get Gmail\n provider_type: api\n selected: false\n title: listMessages\n tool_configurations: {}\n tool_label: listMessages\n tool_name: listMessages\n tool_parameters:\n maxResults:\n type: variable\n value:\n - '1716800588219'\n - maxResults\n userId:\n type: mixed\n value: '{{#1716800588219.email#}}'\n type: tool\n height: 53\n id: '1716946869294'\n position:\n x: 334\n y: 445\n positionAbsolute:\n x: 334\n y: 445\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: ''\n isInIteration: true\n iteration_id: '1716909114582'\n model:\n completion_params:\n temperature: 0.7\n mode: chat\n name: gpt-4o\n provider: openai\n prompt_template:\n - id: b7fd0ec5-864a-42c6-9d04-a1958bd4fc0d\n role: system\n text: \"<Task>\\nYou need to encode the input data from text to base64. Input\\\n \\ text. Output base64 encoding. Output nothing other than base64 encoding.\\\n \\ \\n<input>\\n{{#1716951236700.output#}}\\n<output> \"\n selected: false\n title: Base64 Encoder\n type: llm\n variables: []\n vision:\n configs:\n detail: high\n enabled: true\n extent: parent\n height: 97\n id: '1716951159073'\n parentId: '1716909114582'\n position:\n x: 2525.7520359289056\n y: 85\n positionAbsolute:\n x: 3467.7520359289056\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n desc: Generate MIME email template\n isInIteration: true\n iteration_id: '1716909114582'\n selected: false\n template: \"Content-Type: text/plain; charset=\\\"utf-8\\\"\\r\\nContent-Transfer-Encoding:\\\n \\ 7bit\\r\\nMIME-Version: 1.0\\r\\nTo: {{ emailMetadata.recipientEmail }} #\\\n \\ [email protected]\\r\\nFrom: {{ emailMetadata.senderEmail }} # [email protected]\\r\\\n \\nSubject: Re: {{ emailMetadata.subject }} \\r\\n\\r\\n{{ text }}\\r\\n\"\n title: 'Template: Reply Email'\n type: template-transform\n variables:\n - value_selector:\n - '1716951357236'\n - result\n variable: emailMetadata\n - value_selector:\n - '1716960791399'\n - output\n variable: text\n extent: parent\n height: 83\n id: '1716951236700'\n parentId: '1716909114582'\n position:\n x: 2231.269960149744\n y: 85\n positionAbsolute:\n x: 3173.269960149744\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n code: \"def main(email_json: dict) -> dict:\\n import json\\n if isinstance(email_json,\\\n \\ str): \\n email_json = json.loads(email_json)\\n\\n subject = None\\n\\\n \\ recipient_email = None \\n sender_email = None\\n \\n headers\\\n \\ = email_json['payload']['headers']\\n for header in headers:\\n \\\n \\ if header['name'] == 'Subject':\\n subject = header['value']\\n\\\n \\ elif header['name'] == 'To':\\n recipient_email = header['value']\\n\\\n \\ elif header['name'] == 'From':\\n sender_email = header['value']\\n\\\n \\n return {\\n \\\"result\\\": [subject, recipient_email, sender_email]\\n\\\n \\ }\\n\"\n code_language: python3\n desc: \"Recipient, Sender, Subject\\uFF0COutput Array[String]\"\n isInIteration: true\n iteration_id: '1716909114582'\n outputs:\n result:\n children: null\n type: array[string]\n selected: false\n title: Extract Email Metadata\n type: code\n variables:\n - value_selector:\n - '1716946889408'\n - text\n variable: email_json\n extent: parent\n height: 101\n id: '1716951357236'\n parentId: '1716909114582'\n position:\n x: 725\n y: 85\n positionAbsolute:\n x: 1667\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n desc: ''\n isInIteration: true\n iteration_id: '1716909114582'\n selected: false\n template: '{\"raw\": \"{{ encoded_message }}\"}'\n title: \"Template\\uFF1AEmail Request Body\"\n type: template-transform\n variables:\n - value_selector:\n - '1716951159073'\n - text\n variable: encoded_message\n extent: parent\n height: 53\n id: '1716952228079'\n parentId: '1716909114582'\n position:\n x: 2828.4325280181324\n y: 86.31950791077293\n positionAbsolute:\n x: 3770.4325280181324\n y: 531.3195079107729\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n desc: ''\n isInIteration: true\n iteration_id: '1716909114582'\n provider_id: 038963aa-43c8-47fc-be4b-0255c19959c1\n provider_name: Draft Gmail\n provider_type: api\n selected: false\n title: createDraft\n tool_configurations: {}\n tool_label: createDraft\n tool_name: createDraft\n tool_parameters:\n message:\n type: mixed\n value: '{{#1716952228079.output#}}'\n userId:\n type: mixed\n value: '{{#1716800588219.email#}}'\n type: tool\n extent: parent\n height: 53\n id: '1716952912103'\n parentId: '1716909114582'\n position:\n x: 3133.7520359289056\n y: 85\n positionAbsolute:\n x: 4075.7520359289056\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n classes:\n - id: '1'\n name: 'Technical questions, related to product '\n - id: '2'\n name: Unrelated to technicals, non technical\n - id: '1716960736883'\n name: Other questions\n desc: ''\n instructions: ''\n isInIteration: true\n iteration_id: '1716909114582'\n model:\n completion_params:\n temperature: 0.7\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n query_variable_selector:\n - '1716800588219'\n - sys.query\n selected: false\n title: Question Classifier\n topics: []\n type: question-classifier\n extent: parent\n height: 255\n id: '1716960721611'\n parentId: '1716909114582'\n position:\n x: 1325\n y: 85\n positionAbsolute:\n x: 2267\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: ''\n isInIteration: true\n iteration_id: '1716909114582'\n model:\n completion_params:\n temperature: 0.7\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - id: a639bbf8-bc58-42a2-b477-6748e80ecda2\n role: system\n text: \"<Task> \\nRespond to the emails. \\n<Emails>\\n{{#1716913272656.text#}}\\n\\\n <Your response>\"\n selected: false\n title: 'LLM - Non technical '\n type: llm\n variables: []\n vision:\n enabled: false\n extent: parent\n height: 97\n id: '1716960728136'\n parentId: '1716909114582'\n position:\n x: 1625\n y: 251\n positionAbsolute:\n x: 2567\n y: 696\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n desc: ''\n isInIteration: true\n iteration_id: '1716909114582'\n output_type: string\n selected: false\n title: Variable Aggregator\n type: variable-aggregator\n variables:\n - - '1716909125498'\n - text\n - - '1716960728136'\n - text\n - - '1716960834468'\n - output\n extent: parent\n height: 164\n id: '1716960791399'\n parentId: '1716909114582'\n position:\n x: 1931.2699601497438\n y: 85\n positionAbsolute:\n x: 2873.269960149744\n y: 530\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n desc: Other questions\n isInIteration: true\n iteration_id: '1716909114582'\n selected: false\n template: 'Sorry, I cannot answer that. This is outside my capabilities. '\n title: 'Direct Reply '\n type: template-transform\n variables: []\n extent: parent\n height: 83\n id: '1716960834468'\n parentId: '1716909114582'\n position:\n x: 1625\n y: 385.57142857142856\n positionAbsolute:\n x: 2567\n y: 830.5714285714286\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n author: Dify\n desc: ''\n height: 153\n selected: false\n showAuthor: true\n text: '{\"root\":{\"children\":[{\"children\":[{\"detail\":0,\"format\":3,\"mode\":\"normal\",\"style\":\"font-size:\n 14px;\",\"text\":\"OpenAPI-Swagger for all custom tools: \",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":3},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"openapi:\n 3.0.0\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"info:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" title:\n Gmail API\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n OpenAPI schema for Gmail API methods `users.messages.get`, `users.messages.list`,\n and `users.drafts.create`.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" version:\n 1.0.0\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"servers:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n url: https://gmail.googleapis.com\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Gmail API Server\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"paths:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" /gmail/v1/users/{userId}/messages/{id}:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" get:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" summary:\n Get a message.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Retrieves a specific message by ID.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" operationId:\n getMessage\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" parameters:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n name: userId\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" in:\n path\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" required:\n true\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The user''s email address. The special value `me` can be used to indicate\n the authenticated user.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n name: id\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" in:\n path\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" required:\n true\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The ID of the message to retrieve.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n name: format\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" in:\n query\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" required:\n false\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" enum:\n [full, metadata, minimal, raw]\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" default:\n full\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The format to return the message in.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" responses:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''200'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Successful response\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" content:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" application/json:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n object\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" properties:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" id:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" threadId:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" labelIds:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n array\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" items:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" snippet:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" historyId:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" internalDate:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" payload:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n object\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" sizeEstimate:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n integer\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" raw:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''401'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Unauthorized\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''403'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Forbidden\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''404'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Not Found\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" /gmail/v1/users/{userId}/messages:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" get:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" summary:\n List messages.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Lists the messages in the user''s mailbox.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" operationId:\n listMessages\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" parameters:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n name: userId\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" in:\n path\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" required:\n true\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The user''s email address. The special value `me` can be used to indicate\n the authenticated user.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n name: maxResults\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" in:\n query\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n integer\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" format:\n int32\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" default:\n 100\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Maximum number of messages to return.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" responses:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''200'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Successful response\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" content:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" application/json:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n object\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" properties:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" messages:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n array\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" items:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n object\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" properties:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" id:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" threadId:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" nextPageToken:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" resultSizeEstimate:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n integer\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''401'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Unauthorized\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" /gmail/v1/users/{userId}/drafts:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" post:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" summary:\n Creates a new draft.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" operationId:\n createDraft\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" tags:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n Drafts\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" parameters:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n name: userId\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" in:\n path\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" required:\n true\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The user''s email address. The special value \\\"me\\\" can be used to indicate\n the authenticated user.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" requestBody:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" required:\n true\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" content:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" application/json:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n object\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" properties:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" message:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n object\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" properties:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" raw:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The entire email message in an RFC 2822 formatted and base64url encoded\n string.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" responses:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''200'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Successful response with the created draft.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" content:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" application/json:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" schema:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n object\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" properties:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" id:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The immutable ID of the draft.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" message:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n object\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" properties:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" id:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The immutable ID of the message.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" threadId:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The ID of the thread the message belongs to.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" labelIds:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n array\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" items:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" snippet:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n A short part of the message text.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" historyId:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n string\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n The ID of the last history record that modified this message.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''400'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Bad Request - The request is invalid.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''401'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Unauthorized - Authentication is required.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''403'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Forbidden - The user does not have permission to create drafts.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''404'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Not Found - The specified user does not exist.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" ''500'':\",\"type\":\"text\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" description:\n Internal Server Error - An error occurred on the server.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"components:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" securitySchemes:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" OAuth2:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" type:\n oauth2\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" flows:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" authorizationCode:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" authorizationUrl:\n https://accounts.google.com/o/oauth2/auth\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" tokenUrl:\n https://oauth2.googleapis.com/token\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" scopes:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" https://mail.google.com/:\n All access to Gmail.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" https://www.googleapis.com/auth/gmail.compose:\n Send email on your behalf.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" https://www.googleapis.com/auth/gmail.modify:\n Modify your email.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"security:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n OAuth2:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n https://mail.google.com/\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n https://www.googleapis.com/auth/gmail.compose\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\" -\n https://www.googleapis.com/auth/gmail.modify\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}'\n theme: yellow\n title: ''\n type: ''\n width: 367\n height: 153\n id: '1718992681576'\n position:\n x: 321.9646831030669\n y: 538.1642616264143\n positionAbsolute:\n x: 321.9646831030669\n y: 538.1642616264143\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom-note\n width: 367\n - data:\n author: Dify\n desc: ''\n height: 158\n selected: false\n showAuthor: true\n text: '{\"root\":{\"children\":[{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Replace\n custom tools after added this template to your own workspace. \",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Fill\n in \",\"type\":\"text\",\"version\":1},{\"detail\":0,\"format\":1,\"mode\":\"normal\",\"style\":\"\",\"text\":\"your\n email \",\"type\":\"text\",\"version\":1},{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"and\n the \",\"type\":\"text\",\"version\":1},{\"detail\":0,\"format\":1,\"mode\":\"normal\",\"style\":\"\",\"text\":\"maximum\n number of results you want to retrieve from your inbox \",\"type\":\"text\",\"version\":1},{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"to\n get started. \",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}'\n theme: blue\n title: ''\n type: ''\n width: 287\n height: 158\n id: '1718992805687'\n position:\n x: 18.571428571428356\n y: 237.80887395992687\n positionAbsolute:\n x: 18.571428571428356\n y: 237.80887395992687\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom-note\n width: 287\n - data:\n author: Dify\n desc: ''\n height: 375\n selected: true\n showAuthor: true\n text: '{\"root\":{\"children\":[{\"children\":[{\"detail\":0,\"format\":1,\"mode\":\"normal\",\"style\":\"font-size:\n 16px;\",\"text\":\"Steps within Iteraction node: \",\"type\":\"text\",\"version\":1},{\"type\":\"linebreak\",\"version\":1},{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"1.\n getMessage: This step retrieves the incoming email message.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":1},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"2.\n Code: Extract Email Body: Custom code is executed to extract the body of\n the email from the retrieved message.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"3.\n Extract Email Metadata: Extracts metadata from the email, such as the recipient,\n sender, subject, and other relevant information.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"4.\n Base64 Decoder: Decodes the email content from Base64 encoding.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"5.\n Question Classifier (gpt-3.5-turbo): Uses a GPT-3.5-turbo model to classify\n the email content into different categories. For each classified question,\n the workflow uses a GPT-4.0 model to generate an appropriate reply:\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"6.\n Template: Reply Email: Uses a template to generate a MIME email format for\n the reply.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"6.\n Base64 Encoder: Encodes the generated reply email content back to Base64.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"7.\n Template: Email Request: Prepares the email request using a template.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"8.\n createDraft: Creates a draft of the email reply.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"This\n workflow automates the process of reading, classifying, responding to, and\n drafting replies to incoming emails, leveraging advanced language models\n to generate contextually appropriate responses.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}'\n theme: blue\n title: ''\n type: ''\n width: 640\n height: 375\n id: '1718993366836'\n position:\n x: 966.7525290975368\n y: 971.80362905854\n positionAbsolute:\n x: 966.7525290975368\n y: 971.80362905854\n selected: true\n sourcePosition: right\n targetPosition: left\n type: custom-note\n width: 640\n - data:\n author: Dify\n desc: ''\n height: 400\n selected: false\n showAuthor: true\n text: '{\"root\":{\"children\":[{\"children\":[{\"detail\":0,\"format\":3,\"mode\":\"normal\",\"style\":\"font-size:\n 16px;\",\"text\":\"Preparation\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":3},{\"children\":[{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Enable\n Gmail API in Google Cloud Console\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":1},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Configure\n OAuth Client ID, OAuth Client Secrets, and OAuth Consent Screen for the\n Web Application in Google Cloud Console\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":2},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Use\n Postman to authorize and obtain the OAuth Access Token (Google''s Access\n Token will expire after 1 hour and cannot be used for a long time)\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":3}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"list\",\"version\":1,\"listType\":\"bullet\",\"start\":1,\"tag\":\"ul\"},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Users\n who want to try building an AI auto-reply email can refer to this document\n to use Postman (Postman.com) to obtain all the above keys: https://blog.postman.com/how-to-access-google-apis-using-oauth-in-postman/.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Developers\n who want to use Google OAuth to call the Gmail API to develop corresponding\n plugins can refer to this official document: \",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"https://developers.google.com/identity/protocols/oauth2/web-server.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"At\n this stage, it is still a bit difficult to reproduce this example within\n the Dify platform. If you have development capabilities, developing the\n corresponding plugin externally and using an external database to automatically\n read and write the user''s Access Token and write the Refresh Token would\n be a better choice.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}'\n theme: blue\n title: ''\n type: ''\n width: 608\n height: 400\n id: '1718993557447'\n position:\n x: 354.0157230378119\n y: -1.2732157979666\n positionAbsolute:\n x: 354.0157230378119\n y: -1.2732157979666\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom-note\n width: 608\n viewport:\n x: 147.09446825757777\n y: 101.03530130020579\n zoom: 0.9548416039104178\n","icon":"\ud83e\udd16","icon_background":"#FFEAD5","id":"e9d92058-7d20-4904-892f-75d90bef7587","mode":"advanced-chat","name":"Automated Email Reply "},+ "98b87f88-bd22-4d86-8b74-86beba5e0ed4":{"export_data":"app:\n icon: \"\\U0001F916\"\n icon_background: '#FFEAD5'\n mode: workflow\n name: 'Book Translation '\nworkflow:\n features:\n file_upload:\n image:\n enabled: false\n number_limits: 3\n transfer_methods:\n - local_file\n - remote_url\n opening_statement: ''\n retriever_resource:\n enabled: false\n sensitive_word_avoidance:\n enabled: false\n speech_to_text:\n enabled: false\n suggested_questions: []\n suggested_questions_after_answer:\n enabled: false\n text_to_speech:\n enabled: false\n language: ''\n voice: ''\n graph:\n edges:\n - data:\n isInIteration: false\n sourceType: start\n targetType: code\n id: 1711067409646-source-1717916867969-target\n source: '1711067409646'\n sourceHandle: source\n target: '1717916867969'\n targetHandle: target\n type: custom\n zIndex: 0\n - data:\n isInIteration: false\n sourceType: code\n targetType: iteration\n id: 1717916867969-source-1717916955547-target\n source: '1717916867969'\n sourceHandle: source\n target: '1717916955547'\n targetHandle: target\n type: custom\n zIndex: 0\n - data:\n isInIteration: true\n iteration_id: '1717916955547'\n sourceType: llm\n targetType: llm\n id: 1717916961837-source-1717916977413-target\n source: '1717916961837'\n sourceHandle: source\n target: '1717916977413'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1717916955547'\n sourceType: llm\n targetType: llm\n id: 1717916977413-source-1717916984996-target\n source: '1717916977413'\n sourceHandle: source\n target: '1717916984996'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: true\n iteration_id: '1717916955547'\n sourceType: llm\n targetType: llm\n id: 1717916984996-source-1717916991709-target\n source: '1717916984996'\n sourceHandle: source\n target: '1717916991709'\n targetHandle: target\n type: custom\n zIndex: 1002\n - data:\n isInIteration: false\n sourceType: iteration\n targetType: template-transform\n id: 1717916955547-source-1717917057450-target\n source: '1717916955547'\n sourceHandle: source\n target: '1717917057450'\n targetHandle: target\n type: custom\n zIndex: 0\n - data:\n isInIteration: false\n sourceType: template-transform\n targetType: end\n id: 1717917057450-source-1711068257370-target\n source: '1717917057450'\n sourceHandle: source\n target: '1711068257370'\n targetHandle: target\n type: custom\n zIndex: 0\n nodes:\n - data:\n desc: ''\n selected: false\n title: Start\n type: start\n variables:\n - label: Input Text\n max_length: null\n options: []\n required: true\n type: paragraph\n variable: input_text\n dragging: false\n height: 89\n id: '1711067409646'\n position:\n x: 30\n y: 301.5\n positionAbsolute:\n x: 30\n y: 301.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1717917057450'\n - output\n variable: final\n selected: false\n title: End\n type: end\n height: 89\n id: '1711068257370'\n position:\n x: 2291\n y: 301.5\n positionAbsolute:\n x: 2291\n y: 301.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n - data:\n code: \"\\ndef main(input_text: str) -> str:\\n token_limit = 1000\\n overlap\\\n \\ = 100\\n chunk_size = int(token_limit * 6 * (4/3))\\n\\n # Initialize\\\n \\ variables\\n chunks = []\\n start_index = 0\\n text_length = len(input_text)\\n\\\n \\n # Loop until the end of the text is reached\\n while start_index\\\n \\ < text_length:\\n # If we are not at the beginning, adjust the start_index\\\n \\ to ensure overlap\\n if start_index > 0:\\n start_index\\\n \\ -= overlap\\n\\n # Calculate end index for the current chunk\\n \\\n \\ end_index = start_index + chunk_size\\n if end_index > text_length:\\n\\\n \\ end_index = text_length\\n\\n # Add the current chunk\\\n \\ to the list\\n chunks.append(input_text[start_index:end_index])\\n\\\n \\n # Update the start_index for the next chunk\\n start_index\\\n \\ += chunk_size\\n\\n return {\\n \\\"chunks\\\": chunks,\\n }\\n\"\n code_language: python3\n dependencies: []\n desc: 'token_limit = 1000\n\n overlap = 100'\n outputs:\n chunks:\n children: null\n type: array[string]\n selected: false\n title: Code\n type: code\n variables:\n - value_selector:\n - '1711067409646'\n - input_text\n variable: input_text\n height: 101\n id: '1717916867969'\n position:\n x: 336\n y: 301.5\n positionAbsolute:\n x: 336\n y: 301.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n - data:\n desc: 'Take good care on maximum number of iterations. '\n height: 203\n iterator_selector:\n - '1717916867969'\n - chunks\n output_selector:\n - '1717916991709'\n - text\n output_type: array[string]\n selected: false\n startNodeType: llm\n start_node_id: '1717916961837'\n title: Iteration\n type: iteration\n width: 1289\n height: 203\n id: '1717916955547'\n position:\n x: 638\n y: 301.5\n positionAbsolute:\n x: 638\n y: 301.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 1289\n zIndex: 1\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: ''\n isInIteration: true\n isIterationStart: true\n iteration_id: '1717916955547'\n model:\n completion_params:\n temperature: 0.7\n mode: chat\n name: gpt-4o\n provider: openai\n prompt_template:\n - id: 7261280b-cb27-4f84-8363-b93e09246d16\n role: system\n text: \"<Task> Identify the technical terms in the users input. Use the following\\\n \\ format {XXX} -> {XXX} to show the corresponding technical terms before\\\n \\ and after translation. \\n\\n<Input Text> \\n{{#1717916955547.item#}}\\n\\\n \\n<Example>\\n| \\u82F1\\u6587 | \\u4E2D\\u6587 |\\n| --- | --- |\\n| Prompt\\\n \\ Engineering | \\u63D0\\u793A\\u8BCD\\u5DE5\\u7A0B |\\n| Text Generation \\_\\\n | \\u6587\\u672C\\u751F\\u6210 |\\n| Token \\_| Token |\\n| Prompt \\_| \\u63D0\\\n \\u793A\\u8BCD |\\n| Meta Prompting \\_| \\u5143\\u63D0\\u793A |\\n| diffusion\\\n \\ models \\_| \\u6269\\u6563\\u6A21\\u578B |\\n| Agent \\_| \\u667A\\u80FD\\u4F53\\\n \\ |\\n| Transformer \\_| Transformer |\\n| Zero Shot \\_| \\u96F6\\u6837\\u672C\\\n \\ |\\n| Few Shot \\_| \\u5C11\\u6837\\u672C |\\n| chat window \\_| \\u804A\\u5929\\\n \\ |\\n| context | \\u4E0A\\u4E0B\\u6587 |\\n| stock photo \\_| \\u56FE\\u5E93\\u7167\\\n \\u7247 |\\n\\n\\n<Technical Terms> \"\n selected: false\n title: 'Identify Terms '\n type: llm\n variables: []\n vision:\n configs:\n detail: high\n enabled: true\n extent: parent\n height: 97\n id: '1717916961837'\n parentId: '1717916955547'\n position:\n x: 117\n y: 85\n positionAbsolute:\n x: 755\n y: 386.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1001\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: ''\n isInIteration: true\n iteration_id: '1717916955547'\n model:\n completion_params:\n temperature: 0.7\n mode: chat\n name: gpt-4o\n provider: openai\n prompt_template:\n - id: 05e03f0d-c1a9-43ab-b4c0-44b55049434d\n role: system\n text: \"<Task> You are a professional translator proficient in Simplified\\\n \\ Chinese especially skilled in translating professional academic papers\\\n \\ into easy-to-understand popular science articles. Please help me translate\\\n \\ the following english paragraph into Chinese, in a style similar to\\\n \\ Chinese popular science articles .\\n<Constraints> \\nTranslate directly\\\n \\ based on the English content, maintain the original format and do not\\\n \\ omit any information. \\n<Before Translation> \\n{{#1717916955547.item#}}\\n\\\n <Terms>\\n{{#1717916961837.text#}}\\n<Direct Translation> \"\n selected: false\n title: 1st Translation\n type: llm\n variables: []\n vision:\n configs:\n detail: high\n enabled: true\n extent: parent\n height: 97\n id: '1717916977413'\n parentId: '1717916955547'\n position:\n x: 421\n y: 85\n positionAbsolute:\n x: 1059\n y: 386.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: ''\n isInIteration: true\n iteration_id: '1717916955547'\n model:\n completion_params:\n temperature: 0.7\n mode: chat\n name: gpt-4o\n provider: openai\n prompt_template:\n - id: 9e6cc050-465e-4632-abc9-411acb255a95\n role: system\n text: \"<Task>\\nBased on the results of the direct translation, point out\\\n \\ specific issues it have. Accurate descriptions are required, avoiding\\\n \\ vague statements, and there's no need to add content or formats that\\\n \\ were not present in the original text, including but not limited to:\\\n \\ \\n- inconsistent with chinese expression habits, clearly indicate where\\\n \\ it does not conform\\n- Clumsy sentences, specify the location, no need\\\n \\ to offer suggestions for modification, which will be fixed during free\\\n \\ translation\\n- Obscure and difficult to understand, attempts to explain\\\n \\ may be made\\n- \\u65E0\\u6F0F\\u8BD1\\uFF08\\u539F\\u2F42\\u4E2D\\u7684\\u5173\\\n \\u952E\\u8BCD\\u3001\\u53E5\\u2F26\\u3001\\u6BB5\\u843D\\u90FD\\u5E94\\u4F53\\u73B0\\\n \\u5728\\u8BD1\\u2F42\\u4E2D\\uFF09\\u3002\\n- \\u2F46\\u9519\\u8BD1\\uFF08\\u770B\\\n \\u9519\\u539F\\u2F42\\u3001\\u8BEF\\u89E3\\u539F\\u2F42\\u610F\\u601D\\u5747\\u7B97\\\n \\u9519\\u8BD1\\uFF09\\u3002\\n- \\u2F46\\u6709\\u610F\\u589E\\u52A0\\u6216\\u8005\\\n \\u5220\\u51CF\\u7684\\u539F\\u2F42\\u5185\\u5BB9\\uFF08\\u7FFB\\u8BD1\\u5E76\\u2FAE\\\n \\u521B\\u4F5C\\uFF0C\\u9700\\u5C0A\\u91CD\\u4F5C\\u8005\\u89C2 \\u70B9\\uFF1B\\u53EF\\\n \\u4EE5\\u9002\\u5F53\\u52A0\\u8BD1\\u8005\\u6CE8\\u8BF4\\u660E\\uFF09\\u3002\\n-\\\n \\ \\u8BD1\\u2F42\\u6D41\\u7545\\uFF0C\\u7B26\\u5408\\u4E2D\\u2F42\\u8868\\u8FBE\\u4E60\\\n \\u60EF\\u3002\\n- \\u5173\\u4E8E\\u2F08\\u540D\\u7684\\u7FFB\\u8BD1\\u3002\\u6280\\\n \\u672F\\u56FE\\u4E66\\u4E2D\\u7684\\u2F08\\u540D\\u901A\\u5E38\\u4E0D\\u7FFB\\u8BD1\\\n \\uFF0C\\u4F46\\u662F\\u2F00\\u4E9B\\u4F17\\u6240 \\u5468\\u77E5\\u7684\\u2F08\\u540D\\\n \\u9700\\u2F64\\u4E2D\\u2F42\\uFF08\\u5982\\u4E54\\u5E03\\u65AF\\uFF09\\u3002\\n-\\\n \\ \\u5173\\u4E8E\\u4E66\\u540D\\u7684\\u7FFB\\u8BD1\\u3002\\u6709\\u4E2D\\u2F42\\u7248\\\n \\u7684\\u56FE\\u4E66\\uFF0C\\u8BF7\\u2F64\\u4E2D\\u2F42\\u7248\\u4E66\\u540D\\uFF1B\\\n \\u2F46\\u4E2D\\u2F42\\u7248 \\u7684\\u56FE\\u4E66\\uFF0C\\u76F4\\u63A5\\u2F64\\u82F1\\\n \\u2F42\\u4E66\\u540D\\u3002\\n- \\u5173\\u4E8E\\u56FE\\u8868\\u7684\\u7FFB\\u8BD1\\\n \\u3002\\u8868\\u683C\\u4E2D\\u7684\\u8868\\u9898\\u3001\\u8868\\u5B57\\u548C\\u6CE8\\\n \\u89E3\\u7B49\\u5747\\u9700\\u7FFB\\u8BD1\\u3002\\u56FE\\u9898 \\u9700\\u8981\\u7FFB\\\n \\u8BD1\\u3002\\u754C\\u2FAF\\u622A\\u56FE\\u4E0D\\u9700\\u8981\\u7FFB\\u8BD1\\u56FE\\\n \\u5B57\\u3002\\u89E3\\u91CA\\u6027\\u56FE\\u9700\\u8981\\u6309\\u7167\\u4E2D\\u82F1\\\n \\u2F42 \\u5BF9\\u7167\\u683C\\u5F0F\\u7ED9\\u51FA\\u56FE\\u5B57\\u7FFB\\u8BD1\\u3002\\\n \\n- \\u5173\\u4E8E\\u82F1\\u2F42\\u672F\\u8BED\\u7684\\u8868\\u8FF0\\u3002\\u82F1\\\n \\u2F42\\u672F\\u8BED\\u2FB8\\u6B21\\u51FA\\u73B0\\u65F6\\uFF0C\\u5E94\\u8BE5\\u6839\\\n \\u636E\\u8BE5\\u672F\\u8BED\\u7684 \\u6D41\\u2F8F\\u60C5\\u51B5\\uFF0C\\u4F18\\u5148\\\n \\u4F7F\\u2F64\\u7B80\\u5199\\u5F62\\u5F0F\\uFF0C\\u5E76\\u5728\\u5176\\u540E\\u4F7F\\\n \\u2F64\\u62EC\\u53F7\\u52A0\\u82F1\\u2F42\\u3001\\u4E2D\\u2F42 \\u5168\\u79F0\\u6CE8\\\n \\u89E3\\uFF0C\\u683C\\u5F0F\\u4E3A\\uFF08\\u4E3E\\u4F8B\\uFF09\\uFF1AHTML\\uFF08\\\n Hypertext Markup Language\\uFF0C\\u8D85\\u2F42\\u672C\\u6807\\u8BC6\\u8BED\\u2F94\\\n \\uFF09\\u3002\\u7136\\u540E\\u5728\\u4E0B\\u2F42\\u4E2D\\u76F4\\u63A5\\u4F7F\\u2F64\\\n \\u7B80\\u5199\\u5F62 \\u5F0F\\u3002\\u5F53\\u7136\\uFF0C\\u5FC5\\u8981\\u65F6\\u4E5F\\\n \\u53EF\\u4EE5\\u6839\\u636E\\u8BED\\u5883\\u4F7F\\u2F64\\u4E2D\\u3001\\u82F1\\u2F42\\\n \\u5168\\u79F0\\u3002\\n- \\u5173\\u4E8E\\u4EE3\\u7801\\u6E05\\u5355\\u548C\\u4EE3\\\n \\u7801\\u2F5A\\u6BB5\\u3002\\u539F\\u4E66\\u4E2D\\u5305\\u542B\\u7684\\u7A0B\\u5E8F\\\n \\u4EE3\\u7801\\u4E0D\\u8981\\u6C42\\u8BD1\\u8005\\u5F55 \\u2F0A\\uFF0C\\u4F46\\u5E94\\\n \\u8BE5\\u4F7F\\u2F64\\u201C\\u539F\\u4E66P99\\u2EDA\\u4EE3\\u78011\\u201D\\uFF08\\\n \\u5373\\u539F\\u4E66\\u7B2C99\\u2EDA\\u4E2D\\u7684\\u7B2C\\u2F00\\u6BB5\\u4EE3 \\u7801\\\n \\uFF09\\u7684\\u683C\\u5F0F\\u4F5C\\u51FA\\u6807\\u6CE8\\u3002\\u540C\\u65F6\\uFF0C\\\n \\u8BD1\\u8005\\u5E94\\u8BE5\\u5728\\u6709\\u6761\\u4EF6\\u7684\\u60C5\\u51B5\\u4E0B\\\n \\u68C0\\u6838\\u4EE3 \\u7801\\u7684\\u6B63\\u786E\\u6027\\uFF0C\\u5BF9\\u53D1\\u73B0\\\n \\u7684\\u9519\\u8BEF\\u4EE5\\u8BD1\\u8005\\u6CE8\\u5F62\\u5F0F\\u8BF4\\u660E\\u3002\\\n \\u7A0B\\u5E8F\\u4EE3\\u7801\\u4E2D\\u7684\\u6CE8 \\u91CA\\u8981\\u6C42\\u7FFB\\u8BD1\\\n \\uFF0C\\u5982\\u679C\\u8BD1\\u7A3F\\u4E2D\\u6CA1\\u6709\\u4EE3\\u7801\\uFF0C\\u5219\\\n \\u5E94\\u8BE5\\u4EE5\\u2F00\\u53E5\\u82F1\\u2F42\\uFF08\\u6CE8\\u91CA\\uFF09 \\u2F00\\\n \\u53E5\\u4E2D\\u2F42\\uFF08\\u6CE8\\u91CA\\uFF09\\u7684\\u5F62\\u5F0F\\u7ED9\\u51FA\\\n \\u6CE8\\u91CA\\u3002\\n- \\u5173\\u4E8E\\u6807\\u70B9\\u7B26\\u53F7\\u3002\\u8BD1\\\n \\u7A3F\\u4E2D\\u7684\\u6807\\u70B9\\u7B26\\u53F7\\u8981\\u9075\\u5FAA\\u4E2D\\u2F42\\\n \\u8868\\u8FBE\\u4E60\\u60EF\\u548C\\u4E2D\\u2F42\\u6807 \\u70B9\\u7B26\\u53F7\\u7684\\\n \\u4F7F\\u2F64\\u4E60\\u60EF\\uFF0C\\u4E0D\\u80FD\\u7167\\u642C\\u539F\\u2F42\\u7684\\\n \\u6807\\u70B9\\u7B26\\u53F7\\u3002\\n\\n<Direct Translation>\\n{{#1717916977413.text#}}\\n\\\n <Original Text>\\n{{#1717916955547.item#}}\\n<Terms>\\n{{#1717916961837.text#}}\\n\\\n <Problems with the Direct Translation>\"\n selected: false\n title: 'Problems '\n type: llm\n variables: []\n vision:\n configs:\n detail: high\n enabled: true\n extent: parent\n height: 97\n id: '1717916984996'\n parentId: '1717916955547'\n position:\n x: 725\n y: 85\n positionAbsolute:\n x: 1363\n y: 386.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: ''\n isInIteration: true\n iteration_id: '1717916955547'\n model:\n completion_params:\n temperature: 0.7\n mode: chat\n name: gpt-4o\n provider: openai\n prompt_template:\n - id: 4d7ae758-2d7b-4404-ad9f-d6748ee64439\n role: system\n text: \"<Task>\\nBased on the results of the direct translation in the first\\\n \\ step and the problems identified in the second step, re-translate to\\\n \\ achieve a meaning-based interpretation. Ensure the original intent of\\\n \\ the content is preserved while making it easier to understand and more\\\n \\ in line with Chinese expression habits. All the while maintaining the\\\n \\ original format unchanged. \\n\\n<Guidance>\\n- inconsistent with chinese\\\n \\ expression habits, clearly indicate where it does not conform\\n- Clumsy\\\n \\ sentences, specify the location, no need to offer suggestions for modification,\\\n \\ which will be fixed during free translation\\n- Obscure and difficult\\\n \\ to understand, attempts to explain may be made\\n- \\u65E0\\u6F0F\\u8BD1\\\n \\uFF08\\u539F\\u2F42\\u4E2D\\u7684\\u5173\\u952E\\u8BCD\\u3001\\u53E5\\u2F26\\u3001\\\n \\u6BB5\\u843D\\u90FD\\u5E94\\u4F53\\u73B0\\u5728\\u8BD1\\u2F42\\u4E2D\\uFF09\\u3002\\\n \\n- \\u2F46\\u9519\\u8BD1\\uFF08\\u770B\\u9519\\u539F\\u2F42\\u3001\\u8BEF\\u89E3\\\n \\u539F\\u2F42\\u610F\\u601D\\u5747\\u7B97\\u9519\\u8BD1\\uFF09\\u3002\\n- \\u2F46\\\n \\u6709\\u610F\\u589E\\u52A0\\u6216\\u8005\\u5220\\u51CF\\u7684\\u539F\\u2F42\\u5185\\\n \\u5BB9\\uFF08\\u7FFB\\u8BD1\\u5E76\\u2FAE\\u521B\\u4F5C\\uFF0C\\u9700\\u5C0A\\u91CD\\\n \\u4F5C\\u8005\\u89C2 \\u70B9\\uFF1B\\u53EF\\u4EE5\\u9002\\u5F53\\u52A0\\u8BD1\\u8005\\\n \\u6CE8\\u8BF4\\u660E\\uFF09\\u3002\\n- \\u8BD1\\u2F42\\u6D41\\u7545\\uFF0C\\u7B26\\\n \\u5408\\u4E2D\\u2F42\\u8868\\u8FBE\\u4E60\\u60EF\\u3002\\n- \\u5173\\u4E8E\\u2F08\\\n \\u540D\\u7684\\u7FFB\\u8BD1\\u3002\\u6280\\u672F\\u56FE\\u4E66\\u4E2D\\u7684\\u2F08\\\n \\u540D\\u901A\\u5E38\\u4E0D\\u7FFB\\u8BD1\\uFF0C\\u4F46\\u662F\\u2F00\\u4E9B\\u4F17\\\n \\u6240 \\u5468\\u77E5\\u7684\\u2F08\\u540D\\u9700\\u2F64\\u4E2D\\u2F42\\uFF08\\u5982\\\n \\u4E54\\u5E03\\u65AF\\uFF09\\u3002\\n- \\u5173\\u4E8E\\u4E66\\u540D\\u7684\\u7FFB\\\n \\u8BD1\\u3002\\u6709\\u4E2D\\u2F42\\u7248\\u7684\\u56FE\\u4E66\\uFF0C\\u8BF7\\u2F64\\\n \\u4E2D\\u2F42\\u7248\\u4E66\\u540D\\uFF1B\\u2F46\\u4E2D\\u2F42\\u7248 \\u7684\\u56FE\\\n \\u4E66\\uFF0C\\u76F4\\u63A5\\u2F64\\u82F1\\u2F42\\u4E66\\u540D\\u3002\\n- \\u5173\\\n \\u4E8E\\u56FE\\u8868\\u7684\\u7FFB\\u8BD1\\u3002\\u8868\\u683C\\u4E2D\\u7684\\u8868\\\n \\u9898\\u3001\\u8868\\u5B57\\u548C\\u6CE8\\u89E3\\u7B49\\u5747\\u9700\\u7FFB\\u8BD1\\\n \\u3002\\u56FE\\u9898 \\u9700\\u8981\\u7FFB\\u8BD1\\u3002\\u754C\\u2FAF\\u622A\\u56FE\\\n \\u4E0D\\u9700\\u8981\\u7FFB\\u8BD1\\u56FE\\u5B57\\u3002\\u89E3\\u91CA\\u6027\\u56FE\\\n \\u9700\\u8981\\u6309\\u7167\\u4E2D\\u82F1\\u2F42 \\u5BF9\\u7167\\u683C\\u5F0F\\u7ED9\\\n \\u51FA\\u56FE\\u5B57\\u7FFB\\u8BD1\\u3002\\n- \\u5173\\u4E8E\\u82F1\\u2F42\\u672F\\\n \\u8BED\\u7684\\u8868\\u8FF0\\u3002\\u82F1\\u2F42\\u672F\\u8BED\\u2FB8\\u6B21\\u51FA\\\n \\u73B0\\u65F6\\uFF0C\\u5E94\\u8BE5\\u6839\\u636E\\u8BE5\\u672F\\u8BED\\u7684 \\u6D41\\\n \\u2F8F\\u60C5\\u51B5\\uFF0C\\u4F18\\u5148\\u4F7F\\u2F64\\u7B80\\u5199\\u5F62\\u5F0F\\\n \\uFF0C\\u5E76\\u5728\\u5176\\u540E\\u4F7F\\u2F64\\u62EC\\u53F7\\u52A0\\u82F1\\u2F42\\\n \\u3001\\u4E2D\\u2F42 \\u5168\\u79F0\\u6CE8\\u89E3\\uFF0C\\u683C\\u5F0F\\u4E3A\\uFF08\\\n \\u4E3E\\u4F8B\\uFF09\\uFF1AHTML\\uFF08Hypertext Markup Language\\uFF0C\\u8D85\\\n \\u2F42\\u672C\\u6807\\u8BC6\\u8BED\\u2F94\\uFF09\\u3002\\u7136\\u540E\\u5728\\u4E0B\\\n \\u2F42\\u4E2D\\u76F4\\u63A5\\u4F7F\\u2F64\\u7B80\\u5199\\u5F62 \\u5F0F\\u3002\\u5F53\\\n \\u7136\\uFF0C\\u5FC5\\u8981\\u65F6\\u4E5F\\u53EF\\u4EE5\\u6839\\u636E\\u8BED\\u5883\\\n \\u4F7F\\u2F64\\u4E2D\\u3001\\u82F1\\u2F42\\u5168\\u79F0\\u3002\\n- \\u5173\\u4E8E\\\n \\u4EE3\\u7801\\u6E05\\u5355\\u548C\\u4EE3\\u7801\\u2F5A\\u6BB5\\u3002\\u539F\\u4E66\\\n \\u4E2D\\u5305\\u542B\\u7684\\u7A0B\\u5E8F\\u4EE3\\u7801\\u4E0D\\u8981\\u6C42\\u8BD1\\\n \\u8005\\u5F55 \\u2F0A\\uFF0C\\u4F46\\u5E94\\u8BE5\\u4F7F\\u2F64\\u201C\\u539F\\u4E66\\\n P99\\u2EDA\\u4EE3\\u78011\\u201D\\uFF08\\u5373\\u539F\\u4E66\\u7B2C99\\u2EDA\\u4E2D\\\n \\u7684\\u7B2C\\u2F00\\u6BB5\\u4EE3 \\u7801\\uFF09\\u7684\\u683C\\u5F0F\\u4F5C\\u51FA\\\n \\u6807\\u6CE8\\u3002\\u540C\\u65F6\\uFF0C\\u8BD1\\u8005\\u5E94\\u8BE5\\u5728\\u6709\\\n \\u6761\\u4EF6\\u7684\\u60C5\\u51B5\\u4E0B\\u68C0\\u6838\\u4EE3 \\u7801\\u7684\\u6B63\\\n \\u786E\\u6027\\uFF0C\\u5BF9\\u53D1\\u73B0\\u7684\\u9519\\u8BEF\\u4EE5\\u8BD1\\u8005\\\n \\u6CE8\\u5F62\\u5F0F\\u8BF4\\u660E\\u3002\\u7A0B\\u5E8F\\u4EE3\\u7801\\u4E2D\\u7684\\\n \\u6CE8 \\u91CA\\u8981\\u6C42\\u7FFB\\u8BD1\\uFF0C\\u5982\\u679C\\u8BD1\\u7A3F\\u4E2D\\\n \\u6CA1\\u6709\\u4EE3\\u7801\\uFF0C\\u5219\\u5E94\\u8BE5\\u4EE5\\u2F00\\u53E5\\u82F1\\\n \\u2F42\\uFF08\\u6CE8\\u91CA\\uFF09 \\u2F00\\u53E5\\u4E2D\\u2F42\\uFF08\\u6CE8\\u91CA\\\n \\uFF09\\u7684\\u5F62\\u5F0F\\u7ED9\\u51FA\\u6CE8\\u91CA\\u3002\\n- \\u5173\\u4E8E\\\n \\u6807\\u70B9\\u7B26\\u53F7\\u3002\\u8BD1\\u7A3F\\u4E2D\\u7684\\u6807\\u70B9\\u7B26\\\n \\u53F7\\u8981\\u9075\\u5FAA\\u4E2D\\u2F42\\u8868\\u8FBE\\u4E60\\u60EF\\u548C\\u4E2D\\\n \\u2F42\\u6807 \\u70B9\\u7B26\\u53F7\\u7684\\u4F7F\\u2F64\\u4E60\\u60EF\\uFF0C\\u4E0D\\\n \\u80FD\\u7167\\u642C\\u539F\\u2F42\\u7684\\u6807\\u70B9\\u7B26\\u53F7\\u3002\\n\\n\\\n <Direct Translation> \\n{{#1717916977413.text#}}\\n<problems in the first\\\n \\ translation>\\n{{#1717916984996.text#}}\\n<Original Text>\\n{{#1711067409646.input_text#}}\\n\\\n <Terms>\\n{{#1717916961837.text#}}\\n<Free Translation> \"\n selected: false\n title: '2nd Translation '\n type: llm\n variables: []\n vision:\n configs:\n detail: high\n enabled: true\n extent: parent\n height: 97\n id: '1717916991709'\n parentId: '1717916955547'\n position:\n x: 1029\n y: 85\n positionAbsolute:\n x: 1667\n y: 386.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n zIndex: 1002\n - data:\n desc: 'Combine all chunks of translation. '\n selected: false\n template: '{{ translated_text | join('' '') }}'\n title: Template\n type: template-transform\n variables:\n - value_selector:\n - '1717916955547'\n - output\n variable: translated_text\n height: 83\n id: '1717917057450'\n position:\n x: 1987\n y: 301.5\n positionAbsolute:\n x: 1987\n y: 301.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 244\n - data:\n author: Dify\n desc: ''\n height: 186\n selected: false\n showAuthor: true\n text: '{\"root\":{\"children\":[{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Code\n node separates the input_text into chunks with length of token_limit. Each\n chunk overlap with each other to make sure the texts are consistent. \",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"The\n code node outputs an array of segmented texts of input_texts. \",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}'\n theme: blue\n title: ''\n type: ''\n width: 340\n height: 186\n id: '1718990593686'\n position:\n x: 259.3026056936437\n y: 451.6924912936374\n positionAbsolute:\n x: 259.3026056936437\n y: 451.6924912936374\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom-note\n width: 340\n - data:\n author: Dify\n desc: ''\n height: 128\n selected: false\n showAuthor: true\n text: '{\"root\":{\"children\":[{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Iterate\n through all the elements in output of the code node and translate each chunk\n using a three steps translation workflow. \",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}'\n theme: blue\n title: ''\n type: ''\n width: 355\n height: 128\n id: '1718991836605'\n position:\n x: 764.3891977435923\n y: 530.8917807505335\n positionAbsolute:\n x: 764.3891977435923\n y: 530.8917807505335\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom-note\n width: 355\n - data:\n author: Dify\n desc: ''\n height: 126\n selected: false\n showAuthor: true\n text: '{\"root\":{\"children\":[{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Avoid\n using a high token_limit, LLM''s performance decreases with longer context\n length for gpt-4o. \",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Recommend\n to use less than or equal to 1000 tokens. \",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1,\"textFormat\":0}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}'\n theme: yellow\n title: ''\n type: ''\n width: 351\n height: 126\n id: '1718991882984'\n position:\n x: 304.49115824454367\n y: 148.4042994607805\n positionAbsolute:\n x: 304.49115824454367\n y: 148.4042994607805\n selected: true\n sourcePosition: right\n targetPosition: left\n type: custom-note\n width: 351\n viewport:\n x: 335.92505067152274\n y: 18.806553508850584\n zoom: 0.8705505632961259\n","icon":"\ud83e\udd16","icon_background":"#FFEAD5","id":"98b87f88-bd22-4d86-8b74-86beba5e0ed4","mode":"workflow","name":"Book Translation "},"cae337e6-aec5-4c7b-beca-d6f1a808bd5e":{"export_data": "app:\n icon: \"\\U0001F916\"\n icon_background: '#FFEAD5'\n mode: chat\n name: Python bug fixer\nmodel_config:\n agent_mode:\n enabled: false\n max_iteration: 5\n strategy: function_call\n tools: []\n annotation_reply:\n enabled: false\n chat_prompt_config: {}\n completion_prompt_config: {}\n dataset_configs:\n datasets:\n datasets: []\n retrieval_model: single\n dataset_query_variable: ''\n external_data_tools: []\n file_upload:\n image:\n detail: high\n enabled: false\n number_limits: 3\n transfer_methods:\n - remote_url\n - local_file\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n stop: []\n temperature: 0\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n more_like_this:\n enabled: false\n opening_statement: ''\n pre_prompt: Your task is to analyze the provided Python code snippet, identify any\n bugs or errors present, and provide a corrected version of the code that resolves\n these issues. Explain the problems you found in the original code and how your\n fixes address them. The corrected code should be functional, efficient, and adhere\n to best practices in Python programming.\n prompt_type: simple\n retriever_resource:\n enabled: false\n sensitive_word_avoidance:\n configs: []\n enabled: false\n type: ''\n speech_to_text:\n enabled: false\n suggested_questions: []\n suggested_questions_after_answer:\n enabled: false\n text_to_speech:\n enabled: false\n language: ''\n voice: ''\n user_input_form: []\n","icon": "🤖",@@ -553,15 +553,15 @@"name": "AI Front-end interviewer"},"e9870913-dd01-4710-9f06-15d4180ca1ce": {- "export_data": "app:\n icon: \"\\U0001F916\"\n icon_background: '#FFEAD5'\n mode: advanced-chat\n name: 'Knowledge Retreival + Chatbot '\nworkflow:\n features:\n file_upload:\n image:\n enabled: false\n number_limits: 3\n transfer_methods:\n - local_file\n - remote_url\n opening_statement: ''\n retriever_resource:\n enabled: false\n sensitive_word_avoidance:\n enabled: false\n speech_to_text:\n enabled: false\n suggested_questions: []\n suggested_questions_after_answer:\n enabled: false\n text_to_speech:\n enabled: false\n language: ''\n voice: ''\n graph:\n edges:\n - data:\n sourceType: start\n targetType: knowledge-retrieval\n id: 1711528914102-1711528915811\n source: '1711528914102'\n sourceHandle: source\n target: '1711528915811'\n targetHandle: target\n type: custom\n - data:\n sourceType: knowledge-retrieval\n targetType: llm\n id: 1711528915811-1711528917469\n source: '1711528915811'\n sourceHandle: source\n target: '1711528917469'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: answer\n id: 1711528917469-1711528919501\n source: '1711528917469'\n sourceHandle: source\n target: '1711528919501'\n targetHandle: target\n type: custom\n nodes:\n - data:\n desc: ''\n selected: true\n title: Start\n type: start\n variables: []\n height: 53\n id: '1711528914102'\n position:\n x: 79.5\n y: 2634.5\n positionAbsolute:\n x: 79.5\n y: 2634.5\n selected: true\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n dataset_ids:\n - 6084ed3f-d100-4df2-a277-b40d639ea7c6\n desc: Allows you to query text content related to user questions from the\n Knowledge\n query_variable_selector:\n - '1711528914102'\n - sys.query\n retrieval_mode: single\n selected: false\n single_retrieval_config:\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n title: Knowledge Retrieval\n type: knowledge-retrieval\n dragging: false\n height: 101\n id: '1711528915811'\n position:\n x: 362.5\n y: 2634.5\n positionAbsolute:\n x: 362.5\n y: 2634.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: Invoking large language models to answer questions or process natural\n language\n memory:\n role_prefix:\n assistant: ''\n user: ''\n window:\n enabled: false\n size: 50\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: \"You are a helpful assistant. \\nUse the following context as your\\\n \\ learned knowledge, inside <context></context> XML tags.\\n<context>\\n\\\n {{#context#}}\\n</context>\\nWhen answer to user:\\n- If you don't know,\\\n \\ just say that you don't know.\\n- If you don't know when you are not\\\n \\ sure, ask for clarification.\\nAvoid mentioning that you obtained the\\\n \\ information from the context.\\nAnd answer according to the language\\\n \\ of the user's question.\"\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n height: 163\n id: '1711528917469'\n position:\n x: 645.5\n y: 2634.5\n positionAbsolute:\n x: 645.5\n y: 2634.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n answer: '{{#1711528917469.text#}}'\n desc: ''\n selected: false\n title: Answer\n type: answer\n variables: []\n height: 105\n id: '1711528919501'\n position:\n x: 928.5\n y: 2634.5\n positionAbsolute:\n x: 928.5\n y: 2634.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n viewport:\n x: 86.31278232100044\n y: -2276.452137533831\n zoom: 0.9753554615276419\n",+ "export_data": "app:\n icon: \"\\U0001F916\"\n icon_background: '#FFEAD5'\n mode: advanced-chat\n name: 'Knowledge Retrieval + Chatbot '\nworkflow:\n features:\n file_upload:\n image:\n enabled: false\n number_limits: 3\n transfer_methods:\n - local_file\n - remote_url\n opening_statement: ''\n retriever_resource:\n enabled: false\n sensitive_word_avoidance:\n enabled: false\n speech_to_text:\n enabled: false\n suggested_questions: []\n suggested_questions_after_answer:\n enabled: false\n text_to_speech:\n enabled: false\n language: ''\n voice: ''\n graph:\n edges:\n - data:\n sourceType: start\n targetType: knowledge-retrieval\n id: 1711528914102-1711528915811\n source: '1711528914102'\n sourceHandle: source\n target: '1711528915811'\n targetHandle: target\n type: custom\n - data:\n sourceType: knowledge-retrieval\n targetType: llm\n id: 1711528915811-1711528917469\n source: '1711528915811'\n sourceHandle: source\n target: '1711528917469'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: answer\n id: 1711528917469-1711528919501\n source: '1711528917469'\n sourceHandle: source\n target: '1711528919501'\n targetHandle: target\n type: custom\n nodes:\n - data:\n desc: ''\n selected: true\n title: Start\n type: start\n variables: []\n height: 53\n id: '1711528914102'\n position:\n x: 79.5\n y: 2634.5\n positionAbsolute:\n x: 79.5\n y: 2634.5\n selected: true\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n dataset_ids:\n - 6084ed3f-d100-4df2-a277-b40d639ea7c6\n desc: Allows you to query text content related to user questions from the\n Knowledge\n query_variable_selector:\n - '1711528914102'\n - sys.query\n retrieval_mode: single\n selected: false\n single_retrieval_config:\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n title: Knowledge Retrieval\n type: knowledge-retrieval\n dragging: false\n height: 101\n id: '1711528915811'\n position:\n x: 362.5\n y: 2634.5\n positionAbsolute:\n x: 362.5\n y: 2634.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: Invoking large language models to answer questions or process natural\n language\n memory:\n role_prefix:\n assistant: ''\n user: ''\n window:\n enabled: false\n size: 50\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: \"You are a helpful assistant. \\nUse the following context as your\\\n \\ learned knowledge, inside <context></context> XML tags.\\n<context>\\n\\\n {{#context#}}\\n</context>\\nWhen answer to user:\\n- If you don't know,\\\n \\ just say that you don't know.\\n- If you don't know when you are not\\\n \\ sure, ask for clarification.\\nAvoid mentioning that you obtained the\\\n \\ information from the context.\\nAnd answer according to the language\\\n \\ of the user's question.\"\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n height: 163\n id: '1711528917469'\n position:\n x: 645.5\n y: 2634.5\n positionAbsolute:\n x: 645.5\n y: 2634.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n answer: '{{#1711528917469.text#}}'\n desc: ''\n selected: false\n title: Answer\n type: answer\n variables: []\n height: 105\n id: '1711528919501'\n position:\n x: 928.5\n y: 2634.5\n positionAbsolute:\n x: 928.5\n y: 2634.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n viewport:\n x: 86.31278232100044\n y: -2276.452137533831\n zoom: 0.9753554615276419\n","icon": "🤖","icon_background": "#FFEAD5","id": "e9870913-dd01-4710-9f06-15d4180ca1ce","mode": "advanced-chat",- "name": "Knowledge Retreival + Chatbot "+ "name": "Knowledge Retrieval + Chatbot "},"dd5b6353-ae9b-4bce-be6a-a681a12cf709":{- "export_data": "app:\n icon: \"\\U0001F916\"\n icon_background: '#FFEAD5'\n mode: workflow\n name: 'Email Assistant Workflow '\nworkflow:\n features:\n file_upload:\n image:\n enabled: false\n number_limits: 3\n transfer_methods:\n - local_file\n - remote_url\n opening_statement: ''\n retriever_resource:\n enabled: false\n sensitive_word_avoidance:\n enabled: false\n speech_to_text:\n enabled: false\n suggested_questions: []\n suggested_questions_after_answer:\n enabled: false\n text_to_speech:\n enabled: false\n language: ''\n voice: ''\n graph:\n edges:\n - data:\n sourceType: start\n targetType: question-classifier\n id: 1711511281652-1711512802873\n source: '1711511281652'\n sourceHandle: source\n target: '1711512802873'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: question-classifier\n id: 1711512802873-1711512837494\n source: '1711512802873'\n sourceHandle: '1711512813038'\n target: '1711512837494'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: llm\n id: 1711512802873-1711512911454\n source: '1711512802873'\n sourceHandle: '1711512811520'\n target: '1711512911454'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: llm\n id: 1711512802873-1711512914870\n source: '1711512802873'\n sourceHandle: '1711512812031'\n target: '1711512914870'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: llm\n id: 1711512802873-1711512916516\n source: '1711512802873'\n sourceHandle: '1711512812510'\n target: '1711512916516'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: llm\n id: 1711512837494-1711512924231\n source: '1711512837494'\n sourceHandle: '1711512846439'\n target: '1711512924231'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: llm\n id: 1711512837494-1711512926020\n source: '1711512837494'\n sourceHandle: '1711512847112'\n target: '1711512926020'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: llm\n id: 1711512837494-1711512927569\n source: '1711512837494'\n sourceHandle: '1711512847641'\n target: '1711512927569'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: llm\n id: 1711512837494-1711512929190\n source: '1711512837494'\n sourceHandle: '1711512848120'\n target: '1711512929190'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: llm\n id: 1711512837494-1711512930700\n source: '1711512837494'\n sourceHandle: '1711512848616'\n target: '1711512930700'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: template-transform\n id: 1711512911454-1711513015189\n source: '1711512911454'\n sourceHandle: source\n target: '1711513015189'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: template-transform\n id: 1711512914870-1711513017096\n source: '1711512914870'\n sourceHandle: source\n target: '1711513017096'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: template-transform\n id: 1711512916516-1711513018759\n source: '1711512916516'\n sourceHandle: source\n target: '1711513018759'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: template-transform\n id: 1711512924231-1711513020857\n source: '1711512924231'\n sourceHandle: source\n target: '1711513020857'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: template-transform\n id: 1711512926020-1711513022516\n source: '1711512926020'\n sourceHandle: source\n target: '1711513022516'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: template-transform\n id: 1711512927569-1711513024315\n source: '1711512927569'\n sourceHandle: source\n target: '1711513024315'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: template-transform\n id: 1711512929190-1711513025732\n source: '1711512929190'\n sourceHandle: source\n target: '1711513025732'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: template-transform\n id: 1711512930700-1711513027347\n source: '1711512930700'\n sourceHandle: source\n target: '1711513027347'\n targetHandle: target\n type: custom\n - data:\n sourceType: template-transform\n targetType: end\n id: 1711513015189-1711513029058\n source: '1711513015189'\n sourceHandle: source\n target: '1711513029058'\n targetHandle: target\n type: custom\n - data:\n sourceType: template-transform\n targetType: end\n id: 1711513017096-1711513030924\n source: '1711513017096'\n sourceHandle: source\n target: '1711513030924'\n targetHandle: target\n type: custom\n - data:\n sourceType: template-transform\n targetType: end\n id: 1711513018759-1711513032459\n source: '1711513018759'\n sourceHandle: source\n target: '1711513032459'\n targetHandle: target\n type: custom\n - data:\n sourceType: template-transform\n targetType: end\n id: 1711513020857-1711513034850\n source: '1711513020857'\n sourceHandle: source\n target: '1711513034850'\n targetHandle: target\n type: custom\n - data:\n sourceType: template-transform\n targetType: end\n id: 1711513022516-1711513036356\n source: '1711513022516'\n sourceHandle: source\n target: '1711513036356'\n targetHandle: target\n type: custom\n - data:\n sourceType: template-transform\n targetType: end\n id: 1711513024315-1711513037973\n source: '1711513024315'\n sourceHandle: source\n target: '1711513037973'\n targetHandle: target\n type: custom\n - data:\n sourceType: template-transform\n targetType: end\n id: 1711513025732-1711513039350\n source: '1711513025732'\n sourceHandle: source\n target: '1711513039350'\n targetHandle: target\n type: custom\n - data:\n sourceType: template-transform\n targetType: end\n id: 1711513027347-1711513041219\n source: '1711513027347'\n sourceHandle: source\n target: '1711513041219'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: llm\n id: 1711512802873-1711513940609\n source: '1711512802873'\n sourceHandle: '1711513927279'\n target: '1711513940609'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: template-transform\n id: 1711513940609-1711513967853\n source: '1711513940609'\n sourceHandle: source\n target: '1711513967853'\n targetHandle: target\n type: custom\n - data:\n sourceType: template-transform\n targetType: end\n id: 1711513967853-1711513974643\n source: '1711513967853'\n sourceHandle: source\n target: '1711513974643'\n targetHandle: target\n type: custom\n nodes:\n - data:\n desc: ''\n selected: true\n title: Start\n type: start\n variables:\n - label: Email\n max_length: null\n options: []\n required: true\n type: paragraph\n variable: Input_Text\n - label: What do you need to do? (Summarize / Reply / Write / Improve)\n max_length: 48\n options:\n - Summarize\n - 'Reply '\n - Write a email\n - 'Improve writings '\n required: true\n type: select\n variable: user_request\n - label: 'How do you want it to be polished? (Optional) '\n max_length: 48\n options:\n - 'Imporve writing and clarity '\n - Shorten\n - 'Lengthen '\n - 'Simplify '\n - Rewrite in my voice\n required: false\n type: select\n variable: how_polish\n dragging: false\n height: 141\n id: '1711511281652'\n position:\n x: 79.5\n y: 409.5\n positionAbsolute:\n x: 79.5\n y: 409.5\n selected: true\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n classes:\n - id: '1711512811520'\n name: Summarize\n - id: '1711512812031'\n name: Reply to emails\n - id: '1711512812510'\n name: Help me write the email\n - id: '1711512813038'\n name: Improve writings or polish\n - id: '1711513927279'\n name: Grammer check\n desc: 'Classify users'' demands. '\n instructions: ''\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n query_variable_selector:\n - '1711511281652'\n - user_request\n selected: false\n title: 'Question Classifier '\n topics: []\n type: question-classifier\n dragging: false\n height: 333\n id: '1711512802873'\n position:\n x: 362.5\n y: 409.5\n positionAbsolute:\n x: 362.5\n y: 409.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n classes:\n - id: '1711512846439'\n name: 'Improve writing and clarity '\n - id: '1711512847112'\n name: 'Shorten '\n - id: '1711512847641'\n name: 'Lengthen '\n - id: '1711512848120'\n name: 'Simplify '\n - id: '1711512848616'\n name: Rewrite in my voice\n desc: 'Improve writings. '\n instructions: ''\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n query_variable_selector:\n - '1711511281652'\n - how_polish\n selected: false\n title: 'Question Classifier '\n topics: []\n type: question-classifier\n dragging: false\n height: 333\n id: '1711512837494'\n position:\n x: 645.5\n y: 409.5\n positionAbsolute:\n x: 645.5\n y: 409.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: Summary\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: '<Task> Summary the email for me. <Email>{{#1711511281652.Input_Text#}}\n\n <Result>'\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n dragging: false\n height: 127\n id: '1711512911454'\n position:\n x: 645.5\n y: 1327.5\n positionAbsolute:\n x: 645.5\n y: 1327.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: Reply\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: '<Task> Rely the emails for me, in my own voice. <Email>{{#1711511281652.Input_Text#}}\n\n <Result>'\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n dragging: false\n height: 127\n id: '1711512914870'\n position:\n x: 645.5\n y: 1518.5\n positionAbsolute:\n x: 645.5\n y: 1518.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: Turn idea into email\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: '<Task> Turn my idea into email. <Email>{{#1711511281652.Input_Text#}}\n\n <Result>'\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n dragging: false\n height: 127\n id: '1711512916516'\n position:\n x: 645.5\n y: 1709.5\n positionAbsolute:\n x: 645.5\n y: 1709.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: 'Improve the clarity. '\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: \"<Task> Imporve the clarity of the email for me. \\n<Email>{{#1711511281652.Input_Text#}}\\n\\\n <Result>\"\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n dragging: false\n height: 127\n id: '1711512924231'\n position:\n x: 928.5\n y: 409.5\n positionAbsolute:\n x: 928.5\n y: 409.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: 'Shorten. '\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: '<Task> Shorten the email for me. <Email>{{#1711511281652.Input_Text#}}\n\n <Result>'\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n dragging: false\n height: 127\n id: '1711512926020'\n position:\n x: 928.5\n y: 600.5\n positionAbsolute:\n x: 928.5\n y: 600.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: 'Lengthen '\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: '<Task> Lengthen the email for me. <Email>{{#1711511281652.Input_Text#}}\n\n <Result>'\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n dragging: false\n height: 127\n id: '1711512927569'\n position:\n x: 928.5\n y: 791.5\n positionAbsolute:\n x: 928.5\n y: 791.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: Simplify\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: '<Task> Simplify the email for me. <Email>{{#1711511281652.Input_Text#}}\n\n <Result>'\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n dragging: false\n height: 127\n id: '1711512929190'\n position:\n x: 928.5\n y: 982.5\n positionAbsolute:\n x: 928.5\n y: 982.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: Rewrite in my voice\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: '<Task> Rewrite the email for me. <Email>{{#1711511281652.Input_Text#}}\n\n <Result>'\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n dragging: false\n height: 127\n id: '1711512930700'\n position:\n x: 928.5\n y: 1173.5\n positionAbsolute:\n x: 928.5\n y: 1173.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 }}'\n title: Template\n type: template-transform\n variables:\n - value_selector:\n - '1711512911454'\n - text\n variable: arg1\n dragging: false\n height: 53\n id: '1711513015189'\n position:\n x: 928.5\n y: 1327.5\n positionAbsolute:\n x: 928.5\n y: 1327.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 }}'\n title: Template 2\n type: template-transform\n variables:\n - value_selector:\n - '1711512914870'\n - text\n variable: arg1\n dragging: false\n height: 53\n id: '1711513017096'\n position:\n x: 928.5\n y: 1518.5\n positionAbsolute:\n x: 928.5\n y: 1518.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 }}'\n title: Template 3\n type: template-transform\n variables:\n - value_selector:\n - '1711512916516'\n - text\n variable: arg1\n dragging: false\n height: 53\n id: '1711513018759'\n position:\n x: 928.5\n y: 1709.5\n positionAbsolute:\n x: 928.5\n y: 1709.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 }}'\n title: Template 4\n type: template-transform\n variables:\n - value_selector:\n - '1711512924231'\n - text\n variable: arg1\n dragging: false\n height: 53\n id: '1711513020857'\n position:\n x: 1211.5\n y: 409.5\n positionAbsolute:\n x: 1211.5\n y: 409.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 }}'\n title: Template 5\n type: template-transform\n variables:\n - value_selector:\n - '1711512926020'\n - text\n variable: arg1\n dragging: false\n height: 53\n id: '1711513022516'\n position:\n x: 1211.5\n y: 600.5\n positionAbsolute:\n x: 1211.5\n y: 600.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 }}'\n title: Template 6\n type: template-transform\n variables:\n - value_selector:\n - '1711512927569'\n - text\n variable: arg1\n dragging: false\n height: 53\n id: '1711513024315'\n position:\n x: 1211.5\n y: 791.5\n positionAbsolute:\n x: 1211.5\n y: 791.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 }}'\n title: Template 7\n type: template-transform\n variables:\n - value_selector:\n - '1711512929190'\n - text\n variable: arg1\n dragging: false\n height: 53\n id: '1711513025732'\n position:\n x: 1211.5\n y: 982.5\n positionAbsolute:\n x: 1211.5\n y: 982.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 }}'\n title: Template 8\n type: template-transform\n variables:\n - value_selector:\n - '1711512930700'\n - text\n variable: arg1\n dragging: false\n height: 53\n id: '1711513027347'\n position:\n x: 1211.5\n y: 1173.5\n positionAbsolute:\n x: 1211.5\n y: 1173.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1711512911454'\n - text\n variable: text\n selected: false\n title: End\n type: end\n dragging: false\n height: 89\n id: '1711513029058'\n position:\n x: 1211.5\n y: 1327.5\n positionAbsolute:\n x: 1211.5\n y: 1327.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1711512914870'\n - text\n variable: text\n selected: false\n title: End 2\n type: end\n dragging: false\n height: 89\n id: '1711513030924'\n position:\n x: 1211.5\n y: 1518.5\n positionAbsolute:\n x: 1211.5\n y: 1518.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1711512916516'\n - text\n variable: text\n selected: false\n title: End 3\n type: end\n dragging: false\n height: 89\n id: '1711513032459'\n position:\n x: 1211.5\n y: 1709.5\n positionAbsolute:\n x: 1211.5\n y: 1709.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1711512924231'\n - text\n variable: text\n selected: false\n title: End 4\n type: end\n dragging: false\n height: 89\n id: '1711513034850'\n position:\n x: 1494.5\n y: 409.5\n positionAbsolute:\n x: 1494.5\n y: 409.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1711512926020'\n - text\n variable: text\n selected: false\n title: End 5\n type: end\n dragging: false\n height: 89\n id: '1711513036356'\n position:\n x: 1494.5\n y: 600.5\n positionAbsolute:\n x: 1494.5\n y: 600.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1711512927569'\n - text\n variable: text\n selected: false\n title: End 6\n type: end\n dragging: false\n height: 89\n id: '1711513037973'\n position:\n x: 1494.5\n y: 791.5\n positionAbsolute:\n x: 1494.5\n y: 791.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1711512929190'\n - text\n variable: text\n selected: false\n title: End 7\n type: end\n dragging: false\n height: 89\n id: '1711513039350'\n position:\n x: 1494.5\n y: 982.5\n positionAbsolute:\n x: 1494.5\n y: 982.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1711512930700'\n - text\n variable: text\n selected: false\n title: End 8\n type: end\n dragging: false\n height: 89\n id: '1711513041219'\n position:\n x: 1494.5\n y: 1173.5\n positionAbsolute:\n x: 1494.5\n y: 1173.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: Grammer Check\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: 'Please check grammer of my email and comment on the grammer. <Email>{{#1711511281652.Input_Text#}}\n\n <Result>'\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n dragging: false\n height: 127\n id: '1711513940609'\n position:\n x: 645.5\n y: 1900.5\n positionAbsolute:\n x: 645.5\n y: 1900.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 }}'\n title: Template 9\n type: template-transform\n variables:\n - value_selector:\n - '1711513940609'\n - text\n variable: arg1\n height: 53\n id: '1711513967853'\n position:\n x: 928.5\n y: 1900.5\n positionAbsolute:\n x: 928.5\n y: 1900.5\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1711513940609'\n - text\n variable: text\n selected: false\n title: End 9\n type: end\n height: 89\n id: '1711513974643'\n position:\n x: 1211.5\n y: 1900.5\n positionAbsolute:\n x: 1211.5\n y: 1900.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n viewport:\n x: 0\n y: 0\n zoom: 0.7\n",+ "export_data": "app:\n icon: \"\\U0001F916\"\n icon_background: '#FFEAD5'\n mode: workflow\n name: 'Email Assistant Workflow '\nworkflow:\n features:\n file_upload:\n image:\n enabled: false\n number_limits: 3\n transfer_methods:\n - local_file\n - remote_url\n opening_statement: ''\n retriever_resource:\n enabled: false\n sensitive_word_avoidance:\n enabled: false\n speech_to_text:\n enabled: false\n suggested_questions: []\n suggested_questions_after_answer:\n enabled: false\n text_to_speech:\n enabled: false\n language: ''\n voice: ''\n graph:\n edges:\n - data:\n sourceType: start\n targetType: question-classifier\n id: 1711511281652-1711512802873\n source: '1711511281652'\n sourceHandle: source\n target: '1711512802873'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: question-classifier\n id: 1711512802873-1711512837494\n source: '1711512802873'\n sourceHandle: '1711512813038'\n target: '1711512837494'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: llm\n id: 1711512802873-1711512911454\n source: '1711512802873'\n sourceHandle: '1711512811520'\n target: '1711512911454'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: llm\n id: 1711512802873-1711512914870\n source: '1711512802873'\n sourceHandle: '1711512812031'\n target: '1711512914870'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: llm\n id: 1711512802873-1711512916516\n source: '1711512802873'\n sourceHandle: '1711512812510'\n target: '1711512916516'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: llm\n id: 1711512837494-1711512924231\n source: '1711512837494'\n sourceHandle: '1711512846439'\n target: '1711512924231'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: llm\n id: 1711512837494-1711512926020\n source: '1711512837494'\n sourceHandle: '1711512847112'\n target: '1711512926020'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: llm\n id: 1711512837494-1711512927569\n source: '1711512837494'\n sourceHandle: '1711512847641'\n target: '1711512927569'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: llm\n id: 1711512837494-1711512929190\n source: '1711512837494'\n sourceHandle: '1711512848120'\n target: '1711512929190'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: llm\n id: 1711512837494-1711512930700\n source: '1711512837494'\n sourceHandle: '1711512848616'\n target: '1711512930700'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: template-transform\n id: 1711512911454-1711513015189\n source: '1711512911454'\n sourceHandle: source\n target: '1711513015189'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: template-transform\n id: 1711512914870-1711513017096\n source: '1711512914870'\n sourceHandle: source\n target: '1711513017096'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: template-transform\n id: 1711512916516-1711513018759\n source: '1711512916516'\n sourceHandle: source\n target: '1711513018759'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: template-transform\n id: 1711512924231-1711513020857\n source: '1711512924231'\n sourceHandle: source\n target: '1711513020857'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: template-transform\n id: 1711512926020-1711513022516\n source: '1711512926020'\n sourceHandle: source\n target: '1711513022516'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: template-transform\n id: 1711512927569-1711513024315\n source: '1711512927569'\n sourceHandle: source\n target: '1711513024315'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: template-transform\n id: 1711512929190-1711513025732\n source: '1711512929190'\n sourceHandle: source\n target: '1711513025732'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: template-transform\n id: 1711512930700-1711513027347\n source: '1711512930700'\n sourceHandle: source\n target: '1711513027347'\n targetHandle: target\n type: custom\n - data:\n sourceType: template-transform\n targetType: end\n id: 1711513015189-1711513029058\n source: '1711513015189'\n sourceHandle: source\n target: '1711513029058'\n targetHandle: target\n type: custom\n - data:\n sourceType: template-transform\n targetType: end\n id: 1711513017096-1711513030924\n source: '1711513017096'\n sourceHandle: source\n target: '1711513030924'\n targetHandle: target\n type: custom\n - data:\n sourceType: template-transform\n targetType: end\n id: 1711513018759-1711513032459\n source: '1711513018759'\n sourceHandle: source\n target: '1711513032459'\n targetHandle: target\n type: custom\n - data:\n sourceType: template-transform\n targetType: end\n id: 1711513020857-1711513034850\n source: '1711513020857'\n sourceHandle: source\n target: '1711513034850'\n targetHandle: target\n type: custom\n - data:\n sourceType: template-transform\n targetType: end\n id: 1711513022516-1711513036356\n source: '1711513022516'\n sourceHandle: source\n target: '1711513036356'\n targetHandle: target\n type: custom\n - data:\n sourceType: template-transform\n targetType: end\n id: 1711513024315-1711513037973\n source: '1711513024315'\n sourceHandle: source\n target: '1711513037973'\n targetHandle: target\n type: custom\n - data:\n sourceType: template-transform\n targetType: end\n id: 1711513025732-1711513039350\n source: '1711513025732'\n sourceHandle: source\n target: '1711513039350'\n targetHandle: target\n type: custom\n - data:\n sourceType: template-transform\n targetType: end\n id: 1711513027347-1711513041219\n source: '1711513027347'\n sourceHandle: source\n target: '1711513041219'\n targetHandle: target\n type: custom\n - data:\n sourceType: question-classifier\n targetType: llm\n id: 1711512802873-1711513940609\n source: '1711512802873'\n sourceHandle: '1711513927279'\n target: '1711513940609'\n targetHandle: target\n type: custom\n - data:\n sourceType: llm\n targetType: template-transform\n id: 1711513940609-1711513967853\n source: '1711513940609'\n sourceHandle: source\n target: '1711513967853'\n targetHandle: target\n type: custom\n - data:\n sourceType: template-transform\n targetType: end\n id: 1711513967853-1711513974643\n source: '1711513967853'\n sourceHandle: source\n target: '1711513974643'\n targetHandle: target\n type: custom\n nodes:\n - data:\n desc: ''\n selected: true\n title: Start\n type: start\n variables:\n - label: Email\n max_length: null\n options: []\n required: true\n type: paragraph\n variable: Input_Text\n - label: What do you need to do? (Summarize / Reply / Write / Improve)\n max_length: 48\n options:\n - Summarize\n - 'Reply '\n - Write a email\n - 'Improve writings '\n required: true\n type: select\n variable: user_request\n - label: 'How do you want it to be polished? (Optional) '\n max_length: 48\n options:\n - 'Imporve writing and clarity '\n - Shorten\n - 'Lengthen '\n - 'Simplify '\n - Rewrite in my voice\n required: false\n type: select\n variable: how_polish\n dragging: false\n height: 141\n id: '1711511281652'\n position:\n x: 79.5\n y: 409.5\n positionAbsolute:\n x: 79.5\n y: 409.5\n selected: true\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n classes:\n - id: '1711512811520'\n name: Summarize\n - id: '1711512812031'\n name: Reply to emails\n - id: '1711512812510'\n name: Help me write the email\n - id: '1711512813038'\n name: Improve writings or polish\n - id: '1711513927279'\n name: Grammar check\n desc: 'Classify users'' demands. '\n instructions: ''\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n query_variable_selector:\n - '1711511281652'\n - user_request\n selected: false\n title: 'Question Classifier '\n topics: []\n type: question-classifier\n dragging: false\n height: 333\n id: '1711512802873'\n position:\n x: 362.5\n y: 409.5\n positionAbsolute:\n x: 362.5\n y: 409.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n classes:\n - id: '1711512846439'\n name: 'Improve writing and clarity '\n - id: '1711512847112'\n name: 'Shorten '\n - id: '1711512847641'\n name: 'Lengthen '\n - id: '1711512848120'\n name: 'Simplify '\n - id: '1711512848616'\n name: Rewrite in my voice\n desc: 'Improve writings. '\n instructions: ''\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n query_variable_selector:\n - '1711511281652'\n - how_polish\n selected: false\n title: 'Question Classifier '\n topics: []\n type: question-classifier\n dragging: false\n height: 333\n id: '1711512837494'\n position:\n x: 645.5\n y: 409.5\n positionAbsolute:\n x: 645.5\n y: 409.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: Summary\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: '<Task> Summary the email for me. <Email>{{#1711511281652.Input_Text#}}\n\n <Result>'\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n dragging: false\n height: 127\n id: '1711512911454'\n position:\n x: 645.5\n y: 1327.5\n positionAbsolute:\n x: 645.5\n y: 1327.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: Reply\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: '<Task> Rely the emails for me, in my own voice. <Email>{{#1711511281652.Input_Text#}}\n\n <Result>'\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n dragging: false\n height: 127\n id: '1711512914870'\n position:\n x: 645.5\n y: 1518.5\n positionAbsolute:\n x: 645.5\n y: 1518.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: Turn idea into email\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: '<Task> Turn my idea into email. <Email>{{#1711511281652.Input_Text#}}\n\n <Result>'\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n dragging: false\n height: 127\n id: '1711512916516'\n position:\n x: 645.5\n y: 1709.5\n positionAbsolute:\n x: 645.5\n y: 1709.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: 'Improve the clarity. '\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: \"<Task> Imporve the clarity of the email for me. \\n<Email>{{#1711511281652.Input_Text#}}\\n\\\n <Result>\"\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n dragging: false\n height: 127\n id: '1711512924231'\n position:\n x: 928.5\n y: 409.5\n positionAbsolute:\n x: 928.5\n y: 409.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: 'Shorten. '\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: '<Task> Shorten the email for me. <Email>{{#1711511281652.Input_Text#}}\n\n <Result>'\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n dragging: false\n height: 127\n id: '1711512926020'\n position:\n x: 928.5\n y: 600.5\n positionAbsolute:\n x: 928.5\n y: 600.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: 'Lengthen '\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: '<Task> Lengthen the email for me. <Email>{{#1711511281652.Input_Text#}}\n\n <Result>'\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n dragging: false\n height: 127\n id: '1711512927569'\n position:\n x: 928.5\n y: 791.5\n positionAbsolute:\n x: 928.5\n y: 791.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: Simplify\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: '<Task> Simplify the email for me. <Email>{{#1711511281652.Input_Text#}}\n\n <Result>'\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n dragging: false\n height: 127\n id: '1711512929190'\n position:\n x: 928.5\n y: 982.5\n positionAbsolute:\n x: 928.5\n y: 982.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: Rewrite in my voice\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: '<Task> Rewrite the email for me. <Email>{{#1711511281652.Input_Text#}}\n\n <Result>'\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n dragging: false\n height: 127\n id: '1711512930700'\n position:\n x: 928.5\n y: 1173.5\n positionAbsolute:\n x: 928.5\n y: 1173.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 }}'\n title: Template\n type: template-transform\n variables:\n - value_selector:\n - '1711512911454'\n - text\n variable: arg1\n dragging: false\n height: 53\n id: '1711513015189'\n position:\n x: 928.5\n y: 1327.5\n positionAbsolute:\n x: 928.5\n y: 1327.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 }}'\n title: Template 2\n type: template-transform\n variables:\n - value_selector:\n - '1711512914870'\n - text\n variable: arg1\n dragging: false\n height: 53\n id: '1711513017096'\n position:\n x: 928.5\n y: 1518.5\n positionAbsolute:\n x: 928.5\n y: 1518.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 }}'\n title: Template 3\n type: template-transform\n variables:\n - value_selector:\n - '1711512916516'\n - text\n variable: arg1\n dragging: false\n height: 53\n id: '1711513018759'\n position:\n x: 928.5\n y: 1709.5\n positionAbsolute:\n x: 928.5\n y: 1709.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 }}'\n title: Template 4\n type: template-transform\n variables:\n - value_selector:\n - '1711512924231'\n - text\n variable: arg1\n dragging: false\n height: 53\n id: '1711513020857'\n position:\n x: 1211.5\n y: 409.5\n positionAbsolute:\n x: 1211.5\n y: 409.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 }}'\n title: Template 5\n type: template-transform\n variables:\n - value_selector:\n - '1711512926020'\n - text\n variable: arg1\n dragging: false\n height: 53\n id: '1711513022516'\n position:\n x: 1211.5\n y: 600.5\n positionAbsolute:\n x: 1211.5\n y: 600.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 }}'\n title: Template 6\n type: template-transform\n variables:\n - value_selector:\n - '1711512927569'\n - text\n variable: arg1\n dragging: false\n height: 53\n id: '1711513024315'\n position:\n x: 1211.5\n y: 791.5\n positionAbsolute:\n x: 1211.5\n y: 791.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 }}'\n title: Template 7\n type: template-transform\n variables:\n - value_selector:\n - '1711512929190'\n - text\n variable: arg1\n dragging: false\n height: 53\n id: '1711513025732'\n position:\n x: 1211.5\n y: 982.5\n positionAbsolute:\n x: 1211.5\n y: 982.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 }}'\n title: Template 8\n type: template-transform\n variables:\n - value_selector:\n - '1711512930700'\n - text\n variable: arg1\n dragging: false\n height: 53\n id: '1711513027347'\n position:\n x: 1211.5\n y: 1173.5\n positionAbsolute:\n x: 1211.5\n y: 1173.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1711512911454'\n - text\n variable: text\n selected: false\n title: End\n type: end\n dragging: false\n height: 89\n id: '1711513029058'\n position:\n x: 1211.5\n y: 1327.5\n positionAbsolute:\n x: 1211.5\n y: 1327.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1711512914870'\n - text\n variable: text\n selected: false\n title: End 2\n type: end\n dragging: false\n height: 89\n id: '1711513030924'\n position:\n x: 1211.5\n y: 1518.5\n positionAbsolute:\n x: 1211.5\n y: 1518.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1711512916516'\n - text\n variable: text\n selected: false\n title: End 3\n type: end\n dragging: false\n height: 89\n id: '1711513032459'\n position:\n x: 1211.5\n y: 1709.5\n positionAbsolute:\n x: 1211.5\n y: 1709.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1711512924231'\n - text\n variable: text\n selected: false\n title: End 4\n type: end\n dragging: false\n height: 89\n id: '1711513034850'\n position:\n x: 1494.5\n y: 409.5\n positionAbsolute:\n x: 1494.5\n y: 409.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1711512926020'\n - text\n variable: text\n selected: false\n title: End 5\n type: end\n dragging: false\n height: 89\n id: '1711513036356'\n position:\n x: 1494.5\n y: 600.5\n positionAbsolute:\n x: 1494.5\n y: 600.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1711512927569'\n - text\n variable: text\n selected: false\n title: End 6\n type: end\n dragging: false\n height: 89\n id: '1711513037973'\n position:\n x: 1494.5\n y: 791.5\n positionAbsolute:\n x: 1494.5\n y: 791.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1711512929190'\n - text\n variable: text\n selected: false\n title: End 7\n type: end\n dragging: false\n height: 89\n id: '1711513039350'\n position:\n x: 1494.5\n y: 982.5\n positionAbsolute:\n x: 1494.5\n y: 982.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1711512930700'\n - text\n variable: text\n selected: false\n title: End 8\n type: end\n dragging: false\n height: 89\n id: '1711513041219'\n position:\n x: 1494.5\n y: 1173.5\n positionAbsolute:\n x: 1494.5\n y: 1173.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n context:\n enabled: false\n variable_selector: []\n desc: Grammar Check\n model:\n completion_params:\n frequency_penalty: 0\n max_tokens: 512\n presence_penalty: 0\n temperature: 0.7\n top_p: 1\n mode: chat\n name: gpt-3.5-turbo\n provider: openai\n prompt_template:\n - role: system\n text: 'Please check grammar of my email and comment on the grammar. <Email>{{#1711511281652.Input_Text#}}\n\n <Result>'\n selected: false\n title: LLM\n type: llm\n variables: []\n vision:\n enabled: false\n dragging: false\n height: 127\n id: '1711513940609'\n position:\n x: 645.5\n y: 1900.5\n positionAbsolute:\n x: 645.5\n y: 1900.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n selected: false\n template: '{{ arg1 }}'\n title: Template 9\n type: template-transform\n variables:\n - value_selector:\n - '1711513940609'\n - text\n variable: arg1\n height: 53\n id: '1711513967853'\n position:\n x: 928.5\n y: 1900.5\n positionAbsolute:\n x: 928.5\n y: 1900.5\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n - data:\n desc: ''\n outputs:\n - value_selector:\n - '1711513940609'\n - text\n variable: text\n selected: false\n title: End 9\n type: end\n height: 89\n id: '1711513974643'\n position:\n x: 1211.5\n y: 1900.5\n positionAbsolute:\n x: 1211.5\n y: 1900.5\n selected: false\n sourcePosition: right\n targetPosition: left\n type: custom\n width: 243\n viewport:\n x: 0\n y: 0\n zoom: 0.7\n","icon": "🤖","icon_background": "#FFEAD5","id": "dd5b6353-ae9b-4bce-be6a-a681a12cf709",diff --git a/api/controllers/console/datasets/datasets.py b/api/controllers/console/datasets/datasets.pyindex 44c1390c14f..6ccacc78eeb 100644--- a/api/controllers/console/datasets/datasets.py+++ b/api/controllers/console/datasets/datasets.py@@ -18,7 +18,7 @@ from core.model_runtime.entities.model_entities import ModelTypefrom core.provider_manager import ProviderManagerfrom core.rag.datasource.vdb.vector_type import VectorTypefrom core.rag.extractor.entity.extract_setting import ExtractSetting-from core.rag.retrieval.retrival_methods import RetrievalMethod+from core.rag.retrieval.retrieval_methods import RetrievalMethodfrom extensions.ext_database import dbfrom fields.app_fields import related_app_listfrom fields.dataset_fields import dataset_detail_fields, dataset_query_detail_fieldsdiff --git a/api/controllers/service_api/dataset/segment.py b/api/controllers/service_api/dataset/segment.pyindex e69db29fdce..e68f6b4dc40 100644--- a/api/controllers/service_api/dataset/segment.py+++ b/api/controllers/service_api/dataset/segment.py@@ -67,7 +67,7 @@ class SegmentApi(DatasetApiResource):segments = SegmentService.multi_create_segment(args["segments"], document, dataset)return {"data": marshal(segments, segment_fields), "doc_form": document.doc_form}, 200else:- return {"error": "Segemtns is required"}, 400+ return {"error": "Segments is required"}, 400def get(self, tenant_id, dataset_id, document_id):"""Create single segment."""diff --git a/api/core/helper/position_helper.py b/api/core/helper/position_helper.pyindex 8cf184ac44c..32e38062318 100644--- a/api/core/helper/position_helper.py+++ b/api/core/helper/position_helper.py@@ -79,7 +79,7 @@ def is_filtered(name_func: Callable[[Any], str],) -> bool:"""- Chcek if the object should be filtered out.+ Check if the object should be filtered out.Overall logic: exclude > include > pin:param include_set: the set of names to be included:param exclude_set: the set of names to be excludeddiff --git a/api/core/indexing_runner.py b/api/core/indexing_runner.pyindex 7a1c5e760b4..df563f609b3 100644--- a/api/core/indexing_runner.py+++ b/api/core/indexing_runner.py@@ -494,7 +494,7 @@ class IndexingRunner:hash = helper.generate_text_hash(document_node.page_content)document_node.metadata['doc_id'] = doc_iddocument_node.metadata['doc_hash'] = hash- # delete Spliter character+ # delete Splitter characterpage_content = document_node.page_contentif page_content.startswith(".") or page_content.startswith("。"):page_content = page_content[1:]diff --git a/api/core/llm_generator/prompts.py b/api/core/llm_generator/prompts.pyindex 87361b385ab..dbd6e26c7c2 100644--- a/api/core/llm_generator/prompts.py+++ b/api/core/llm_generator/prompts.py@@ -87,7 +87,7 @@ Here is a task description for which I would like you to create a high-quality p{{TASK_DESCRIPTION}}</task_description>Based on task description, please create a well-structured prompt template that another AI could use to consistently complete the task. The prompt template should include:-- Do not inlcude <input> or <output> section and variables in the prompt, assume user will add them at their own will.+- Do not include <input> or <output> section and variables in the prompt, assume user will add them at their own will.- Clear instructions for the AI that will be using this prompt, demarcated with <instructions> tags. The instructions should provide step-by-step directions on how to complete the task using the input variables. Also Specifies in the instructions that the output should not contain any xml tag.- Relevant examples if needed to clarify the task further, demarcated with <example> tags. Do not include variables in the prompt. Give three pairs of input and output examples.- Include other relevant sections demarcated with appropriate XML tags like <examples>, <instructions>.diff --git a/api/core/model_runtime/docs/en_US/schema.md b/api/core/model_runtime/docs/en_US/schema.mdindex 67f4e0879dc..f819a4dbdcf 100644--- a/api/core/model_runtime/docs/en_US/schema.md+++ b/api/core/model_runtime/docs/en_US/schema.md@@ -52,7 +52,7 @@- `mode` (string) voice model.(available for model type `tts`)- `name` (string) voice model display name.(available for model type `tts`)- `language` (string) the voice model supports languages.(available for model type `tts`)- - `word_limit` (int) Single conversion word limit, paragraphwise by default(available for model type `tts`)+ - `word_limit` (int) Single conversion word limit, paragraph-wise by default(available for model type `tts`)- `audio_type` (string) Support audio file extension format, e.g.:mp3,wav(available for model type `tts`)- `max_workers` (int) Number of concurrent workers supporting text and audio conversion(available for model type`tts`)- `max_characters_per_chunk` (int) Maximum characters per chunk (available for model type `moderation`)@@ -150,7 +150,7 @@- `input` (float) Input price, i.e., Prompt price- `output` (float) Output price, i.e., returned content price-- `unit` (float) Pricing unit, e.g., if the price is meausred in 1M tokens, the corresponding token amount for the unit price is `0.000001`.+- `unit` (float) Pricing unit, e.g., if the price is measured in 1M tokens, the corresponding token amount for the unit price is `0.000001`.- `currency` (string) Currency unit### ProviderCredentialSchemadiff --git a/api/core/model_runtime/model_providers/__base/tts_model.py b/api/core/model_runtime/model_providers/__base/tts_model.pyindex 64e85d2c119..2dfd323a47a 100644--- a/api/core/model_runtime/model_providers/__base/tts_model.py+++ b/api/core/model_runtime/model_providers/__base/tts_model.py@@ -13,7 +13,7 @@ logger = logging.getLogger(__name__)class TTSModel(AIModel):"""- Model class for ttstext model.+ Model class for TTS model."""model_type: ModelType = ModelType.TTSdiff --git a/api/core/model_runtime/model_providers/azure_openai/llm/llm.py b/api/core/model_runtime/model_providers/azure_openai/llm/llm.pyindex 483bad0b845..c0c782e42b4 100644--- a/api/core/model_runtime/model_providers/azure_openai/llm/llm.py+++ b/api/core/model_runtime/model_providers/azure_openai/llm/llm.py@@ -284,7 +284,7 @@ class AzureOpenAILargeLanguageModel(_CommonAzureOpenAI, LargeLanguageModel):try:schema = json.loads(json_schema)except:- raise ValueError(f"not currect json_schema format: {json_schema}")+ raise ValueError(f"not correct json_schema format: {json_schema}")model_parameters.pop("json_schema")model_parameters["response_format"] = {"type": "json_schema", "json_schema": schema}else:diff --git a/api/core/model_runtime/model_providers/baichuan/llm/llm.py b/api/core/model_runtime/model_providers/baichuan/llm/llm.pyindex 4f44682e9f4..36c7003d1b1 100644--- a/api/core/model_runtime/model_providers/baichuan/llm/llm.py+++ b/api/core/model_runtime/model_providers/baichuan/llm/llm.py@@ -37,7 +37,7 @@ from core.model_runtime.model_providers.baichuan.llm.baichuan_turbo_errors impor)-class BaichuanLarguageModel(LargeLanguageModel):+class BaichuanLanguageModel(LargeLanguageModel):def _invoke(self,diff --git a/api/core/model_runtime/model_providers/baichuan/text_embedding/text_embedding.py b/api/core/model_runtime/model_providers/baichuan/text_embedding/text_embedding.pyindex 5ae90d54b5e..81bd58e3ce1 100644--- a/api/core/model_runtime/model_providers/baichuan/text_embedding/text_embedding.py+++ b/api/core/model_runtime/model_providers/baichuan/text_embedding/text_embedding.py@@ -60,7 +60,7 @@ class BaichuanTextEmbeddingModel(TextEmbeddingModel):token_usage = 0for chunk in chunks:- # embeding chunk+ # embedding chunkchunk_embeddings, chunk_usage = self.embedding(model=model,api_key=api_key,diff --git a/api/core/model_runtime/model_providers/bedrock/llm/llm.py b/api/core/model_runtime/model_providers/bedrock/llm/llm.pyindex 3f7266f6002..c325ac3cecb 100644--- a/api/core/model_runtime/model_providers/bedrock/llm/llm.py+++ b/api/core/model_runtime/model_providers/bedrock/llm/llm.py@@ -793,11 +793,11 @@ class BedrockLargeLanguageModel(LargeLanguageModel):def _invoke_error_mapping(self) -> dict[type[InvokeError], list[type[Exception]]]:"""Map model invoke error to unified error- The key is the ermd = genai.GenerativeModel(model)ror type thrown to the caller- The value is the md = genai.GenerativeModel(model)error type thrown by the model,+ The key is the ermd = genai.GenerativeModel(model) error type thrown to the caller+ The value is the md = genai.GenerativeModel(model) error type thrown by the model,which needs to be converted into a unified error type for the caller.- :return: Invoke emd = genai.GenerativeModel(model)rror mapping+ :return: Invoke emd = genai.GenerativeModel(model) error mapping"""return {InvokeConnectionError: [],diff --git a/api/core/model_runtime/model_providers/bedrock/text_embedding/text_embedding.py b/api/core/model_runtime/model_providers/bedrock/text_embedding/text_embedding.pyindex 993416cdc8a..ef22a9c8682 100644--- a/api/core/model_runtime/model_providers/bedrock/text_embedding/text_embedding.py+++ b/api/core/model_runtime/model_providers/bedrock/text_embedding/text_embedding.py@@ -130,11 +130,11 @@ class BedrockTextEmbeddingModel(TextEmbeddingModel):def _invoke_error_mapping(self) -> dict[type[InvokeError], list[type[Exception]]]:"""Map model invoke error to unified error- The key is the ermd = genai.GenerativeModel(model)ror type thrown to the caller- The value is the md = genai.GenerativeModel(model)error type thrown by the model,+ The key is the ermd = genai.GenerativeModel(model) error type thrown to the caller+ The value is the md = genai.GenerativeModel(model) error type thrown by the model,which needs to be converted into a unified error type for the caller.- :return: Invoke emd = genai.GenerativeModel(model)rror mapping+ :return: Invoke emd = genai.GenerativeModel(model) error mapping"""return {InvokeConnectionError: [],diff --git a/api/core/model_runtime/model_providers/google/llm/llm.py b/api/core/model_runtime/model_providers/google/llm/llm.pyindex 84241fb6c87..11f9f32f96d 100644--- a/api/core/model_runtime/model_providers/google/llm/llm.py+++ b/api/core/model_runtime/model_providers/google/llm/llm.py@@ -416,11 +416,11 @@ class GoogleLargeLanguageModel(LargeLanguageModel):def _invoke_error_mapping(self) -> dict[type[InvokeError], list[type[Exception]]]:"""Map model invoke error to unified error- The key is the ermd = genai.GenerativeModel(model)ror type thrown to the caller- The value is the md = genai.GenerativeModel(model)error type thrown by the model,+ The key is the ermd = genai.GenerativeModel(model) error type thrown to the caller+ The value is the md = genai.GenerativeModel(model) error type thrown by the model,which needs to be converted into a unified error type for the caller.- :return: Invoke emd = genai.GenerativeModel(model)rror mapping+ :return: Invoke emd = genai.GenerativeModel(model) error mapping"""return {InvokeConnectionError: [diff --git a/api/core/model_runtime/model_providers/minimax/llm/llm.py b/api/core/model_runtime/model_providers/minimax/llm/llm.pyindex 1fab20ebbc4..feeba75f498 100644--- a/api/core/model_runtime/model_providers/minimax/llm/llm.py+++ b/api/core/model_runtime/model_providers/minimax/llm/llm.py@@ -86,7 +86,7 @@ class MinimaxLargeLanguageModel(LargeLanguageModel):Calculate num tokens for minimax modelnot like ChatGLM, Minimax has a special prompt structure, we could not find a proper way- to caculate the num tokens, so we use str() to convert the prompt to string+ to calculate the num tokens, so we use str() to convert the prompt to stringMinimax does not provide their own tokenizer of adab5.5 and abab5 modeltherefore, we use gpt2 tokenizer insteaddiff --git a/api/core/model_runtime/model_providers/novita/llm/llm.py b/api/core/model_runtime/model_providers/novita/llm/llm.pyindex c7b223d1b7b..7662bf914a1 100644--- a/api/core/model_runtime/model_providers/novita/llm/llm.py+++ b/api/core/model_runtime/model_providers/novita/llm/llm.py@@ -10,6 +10,7 @@ from core.model_runtime.model_providers.openai_api_compatible.llm.llm import OAIclass NovitaLargeLanguageModel(OAIAPICompatLargeLanguageModel):def _update_endpoint_url(self, credentials: dict):+credentials['endpoint_url'] = "https://api.novita.ai/v3/openai"credentials['extra_headers'] = { 'X-Novita-Source': 'dify.ai' }return credentialsdiff --git a/api/core/model_runtime/model_providers/oci/llm/llm.py b/api/core/model_runtime/model_providers/oci/llm/llm.pyindex 937513a58ba..37787c459d8 100644--- a/api/core/model_runtime/model_providers/oci/llm/llm.py+++ b/api/core/model_runtime/model_providers/oci/llm/llm.py@@ -243,7 +243,7 @@ class OCILargeLanguageModel(LargeLanguageModel):request_args["compartmentId"] = compartment_idrequest_args["servingMode"]["modelId"] = model- chathistory = []+ chat_history = []system_prompts = []#if "meta.llama" in model:# request_args["chatRequest"]["apiFormat"] = "GENERIC"@@ -273,16 +273,16 @@ class OCILargeLanguageModel(LargeLanguageModel):if isinstance(message.content, str):text = message.contentif isinstance(message, UserPromptMessage):- chathistory.append({"role": "USER", "message": text})+ chat_history.append({"role": "USER", "message": text})else:- chathistory.append({"role": "CHATBOT", "message": text})+ chat_history.append({"role": "CHATBOT", "message": text})if isinstance(message, SystemPromptMessage):if isinstance(message.content, str):system_prompts.append(message.content)args = {"apiFormat": "COHERE","preambleOverride": ' '.join(system_prompts),"message": prompt_messages[-1].content,- "chatHistory": chathistory, }+ "chatHistory": chat_history, }request_args["chatRequest"].update(args)elif model.startswith("meta"):#print("run meta " * 10)diff --git a/api/core/model_runtime/model_providers/openai/llm/llm.py b/api/core/model_runtime/model_providers/openai/llm/llm.pyindex 06135c95846..dc85f7c9f2a 100644--- a/api/core/model_runtime/model_providers/openai/llm/llm.py+++ b/api/core/model_runtime/model_providers/openai/llm/llm.py@@ -552,7 +552,7 @@ class OpenAILargeLanguageModel(_CommonOpenAI, LargeLanguageModel):try:schema = json.loads(json_schema)except:- raise ValueError(f"not currect json_schema format: {json_schema}")+ raise ValueError(f"not correct json_schema format: {json_schema}")model_parameters.pop("json_schema")model_parameters["response_format"] = {"type": "json_schema", "json_schema": schema}else:diff --git a/api/core/model_runtime/model_providers/tencent/speech2text/flash_recognizer.py b/api/core/model_runtime/model_providers/tencent/speech2text/flash_recognizer.pyindex c3e3b7c2580..b62b9860cb3 100644--- a/api/core/model_runtime/model_providers/tencent/speech2text/flash_recognizer.py+++ b/api/core/model_runtime/model_providers/tencent/speech2text/flash_recognizer.py@@ -67,7 +67,7 @@ class FlashRecognitionRequest:class FlashRecognizer:"""- reponse:+ response:request_id stringstatus Integermessage String@@ -132,9 +132,9 @@ class FlashRecognizer:signstr = self._format_sign_string(query)signature = self._sign(signstr, secret_key)header["Authorization"] = signature- requrl = "https://"- requrl += signstr[4::]- return requrl+ req_url = "https://"+ req_url += signstr[4::]+ return req_urldef _create_query_arr(self, req):return {diff --git a/api/core/model_runtime/model_providers/vertex_ai/llm/llm.py b/api/core/model_runtime/model_providers/vertex_ai/llm/llm.pyindex 1a7368a2cf8..af6ec3937c8 100644--- a/api/core/model_runtime/model_providers/vertex_ai/llm/llm.py+++ b/api/core/model_runtime/model_providers/vertex_ai/llm/llm.py@@ -695,11 +695,11 @@ class VertexAiLargeLanguageModel(LargeLanguageModel):def _invoke_error_mapping(self) -> dict[type[InvokeError], list[type[Exception]]]:"""Map model invoke error to unified error- The key is the ermd = gml.GenerativeModel(model)ror type thrown to the caller- The value is the md = gml.GenerativeModel(model)error type thrown by the model,+ The key is the ermd = gml.GenerativeModel(model) error type thrown to the caller+ The value is the md = gml.GenerativeModel(model) error type thrown by the model,which needs to be converted into a unified error type for the caller.- :return: Invoke emd = gml.GenerativeModel(model)rror mapping+ :return: Invoke emd = gml.GenerativeModel(model) error mapping"""return {InvokeConnectionError: [diff --git a/api/core/model_runtime/model_providers/zhipuai/zhipuai_sdk/core/_http_client.py b/api/core/model_runtime/model_providers/zhipuai/zhipuai_sdk/core/_http_client.pyindex 263fe829901..65401f6c1cd 100644--- a/api/core/model_runtime/model_providers/zhipuai/zhipuai_sdk/core/_http_client.py+++ b/api/core/model_runtime/model_providers/zhipuai/zhipuai_sdk/core/_http_client.py@@ -135,16 +135,16 @@ class HttpClient:**kwargs,)- def _object_to_formfata(self, key: str, value: Data | Mapping[object, object]) -> list[tuple[str, str]]:+ def _object_to_formdata(self, key: str, value: Data | Mapping[object, object]) -> list[tuple[str, str]]:items = []if isinstance(value, Mapping):for k, v in value.items():- items.extend(self._object_to_formfata(f"{key}[{k}]", v))+ items.extend(self._object_to_formdata(f"{key}[{k}]", v))return itemsif isinstance(value, list | tuple):for v in value:- items.extend(self._object_to_formfata(key + "[]", v))+ items.extend(self._object_to_formdata(key + "[]", v))return itemsdef _primitive_value_to_str(val) -> str:@@ -165,7 +165,7 @@ class HttpClient:def _make_multipartform(self, data: Mapping[object, object]) -> dict[str, object]:- items = flatten([self._object_to_formfata(k, v) for k, v in data.items()])+ items = flatten([self._object_to_formdata(k, v) for k, v in data.items()])serialized: dict[str, object] = {}for key, value in items:diff --git a/api/core/rag/cleaner/unstructured/unstructured_non_ascii_chars_cleaner.py b/api/core/rag/cleaner/unstructured/unstructured_non_ascii_chars_cleaner.pyindex ca1ae8dfd11..87dc2d49faa 100644--- a/api/core/rag/cleaner/unstructured/unstructured_non_ascii_chars_cleaner.py+++ b/api/core/rag/cleaner/unstructured/unstructured_non_ascii_chars_cleaner.py@@ -8,5 +8,5 @@ class UnstructuredNonAsciiCharsCleaner(BaseCleaner):"""clean document content."""from unstructured.cleaners.core import clean_non_ascii_chars- # Returns "This text containsnon-ascii characters!"+ # Returns "This text contains non-ascii characters!"return clean_non_ascii_chars(content)diff --git a/api/core/rag/datasource/retrieval_service.py b/api/core/rag/datasource/retrieval_service.pyindex 9f457717949..0dac9bfae64 100644--- a/api/core/rag/datasource/retrieval_service.py+++ b/api/core/rag/datasource/retrieval_service.py@@ -7,7 +7,7 @@ from core.rag.data_post_processor.data_post_processor import DataPostProcessorfrom core.rag.datasource.keyword.keyword_factory import Keywordfrom core.rag.datasource.vdb.vector_factory import Vectorfrom core.rag.rerank.constants.rerank_mode import RerankMode-from core.rag.retrieval.retrival_methods import RetrievalMethod+from core.rag.retrieval.retrieval_methods import RetrievalMethodfrom extensions.ext_database import dbfrom models.dataset import Dataset@@ -26,7 +26,7 @@ default_retrieval_model = {class RetrievalService:@classmethod- def retrieve(cls, retrival_method: str, dataset_id: str, query: str,+ def retrieve(cls, retrieval_method: str, dataset_id: str, query: str,top_k: int, score_threshold: Optional[float] = .0,reranking_model: Optional[dict] = None, reranking_mode: Optional[str] = 'reranking_model',weights: Optional[dict] = None):@@ -39,7 +39,7 @@ class RetrievalService:threads = []exceptions = []# retrieval_model source with keyword- if retrival_method == 'keyword_search':+ if retrieval_method == 'keyword_search':keyword_thread = threading.Thread(target=RetrievalService.keyword_search, kwargs={'flask_app': current_app._get_current_object(),'dataset_id': dataset_id,@@ -51,7 +51,7 @@ class RetrievalService:threads.append(keyword_thread)keyword_thread.start()# retrieval_model source with semantic- if RetrievalMethod.is_support_semantic_search(retrival_method):+ if RetrievalMethod.is_support_semantic_search(retrieval_method):embedding_thread = threading.Thread(target=RetrievalService.embedding_search, kwargs={'flask_app': current_app._get_current_object(),'dataset_id': dataset_id,@@ -60,19 +60,19 @@ class RetrievalService:'score_threshold': score_threshold,'reranking_model': reranking_model,'all_documents': all_documents,- 'retrival_method': retrival_method,+ 'retrieval_method': retrieval_method,'exceptions': exceptions,})threads.append(embedding_thread)embedding_thread.start()# retrieval source with full text- if RetrievalMethod.is_support_fulltext_search(retrival_method):+ if RetrievalMethod.is_support_fulltext_search(retrieval_method):full_text_index_thread = threading.Thread(target=RetrievalService.full_text_index_search, kwargs={'flask_app': current_app._get_current_object(),'dataset_id': dataset_id,'query': query,- 'retrival_method': retrival_method,+ 'retrieval_method': retrieval_method,'score_threshold': score_threshold,'top_k': top_k,'reranking_model': reranking_model,@@ -89,7 +89,7 @@ class RetrievalService:exception_message = ';\n'.join(exceptions)raise Exception(exception_message)- if retrival_method == RetrievalMethod.HYBRID_SEARCH.value:+ if retrieval_method == RetrievalMethod.HYBRID_SEARCH.value:data_post_processor = DataPostProcessor(str(dataset.tenant_id), reranking_mode,reranking_model, weights, False)all_documents = data_post_processor.invoke(@@ -124,7 +124,7 @@ class RetrievalService:@classmethoddef embedding_search(cls, flask_app: Flask, dataset_id: str, query: str,top_k: int, score_threshold: Optional[float], reranking_model: Optional[dict],- all_documents: list, retrival_method: str, exceptions: list):+ all_documents: list, retrieval_method: str, exceptions: list):with flask_app.app_context():try:dataset = db.session.query(Dataset).filter(@@ -146,7 +146,7 @@ class RetrievalService:)if documents:- if reranking_model and reranking_model.get('reranking_model_name') and reranking_model.get('reranking_provider_name') and retrival_method == RetrievalMethod.SEMANTIC_SEARCH.value:+ if reranking_model and reranking_model.get('reranking_model_name') and reranking_model.get('reranking_provider_name') and retrieval_method == RetrievalMethod.SEMANTIC_SEARCH.value:data_post_processor = DataPostProcessor(str(dataset.tenant_id),RerankMode.RERANKING_MODEL.value,reranking_model, None, False)@@ -164,7 +164,7 @@ class RetrievalService:@classmethoddef full_text_index_search(cls, flask_app: Flask, dataset_id: str, query: str,top_k: int, score_threshold: Optional[float], reranking_model: Optional[dict],- all_documents: list, retrival_method: str, exceptions: list):+ all_documents: list, retrieval_method: str, exceptions: list):with flask_app.app_context():try:dataset = db.session.query(Dataset).filter(@@ -180,7 +180,7 @@ class RetrievalService:top_k=top_k)if documents:- if reranking_model and reranking_model.get('reranking_model_name') and reranking_model.get('reranking_provider_name') and retrival_method == RetrievalMethod.FULL_TEXT_SEARCH.value:+ if reranking_model and reranking_model.get('reranking_model_name') and reranking_model.get('reranking_provider_name') and retrieval_method == RetrievalMethod.FULL_TEXT_SEARCH.value:data_post_processor = DataPostProcessor(str(dataset.tenant_id),RerankMode.RERANKING_MODEL.value,reranking_model, None, False)diff --git a/api/core/rag/extractor/blod/blod.py b/api/core/rag/extractor/blob/blob.pysimilarity index 100%rename from api/core/rag/extractor/blod/blod.pyrename to api/core/rag/extractor/blob/blob.pydiff --git a/api/core/rag/extractor/notion_extractor.py b/api/core/rag/extractor/notion_extractor.pyindex 2b12b8a4b2e..7e839804c8c 100644--- a/api/core/rag/extractor/notion_extractor.py+++ b/api/core/rag/extractor/notion_extractor.py@@ -275,10 +275,10 @@ class NotionExtractor(BaseExtractor):data = res.json()# get table headers texttable_header_cell_texts = []- tabel_header_cells = data["results"][0]['table_row']['cells']- for tabel_header_cell in tabel_header_cells:- if tabel_header_cell:- for table_header_cell_text in tabel_header_cell:+ table_header_cells = data["results"][0]['table_row']['cells']+ for table_header_cell in table_header_cells:+ if table_header_cell:+ for table_header_cell_text in table_header_cell:text = table_header_cell_text["text"]["content"]table_header_cell_texts.append(text)else:diff --git a/api/core/rag/extractor/pdf_extractor.py b/api/core/rag/extractor/pdf_extractor.pyindex cbb2655390b..0864fec6c8b 100644--- a/api/core/rag/extractor/pdf_extractor.py+++ b/api/core/rag/extractor/pdf_extractor.py@@ -2,7 +2,7 @@from collections.abc import Iteratorfrom typing import Optional-from core.rag.extractor.blod.blod import Blob+from core.rag.extractor.blob.blob import Blobfrom core.rag.extractor.extractor_base import BaseExtractorfrom core.rag.models.document import Documentfrom extensions.ext_storage import storagediff --git a/api/core/rag/index_processor/index_processor_base.py b/api/core/rag/index_processor/index_processor_base.pyindex 176d0c1ed65..630387fe3a8 100644--- a/api/core/rag/index_processor/index_processor_base.py+++ b/api/core/rag/index_processor/index_processor_base.py@@ -34,7 +34,7 @@ class BaseIndexProcessor(ABC):raise NotImplementedError@abstractmethod- def retrieve(self, retrival_method: str, query: str, dataset: Dataset, top_k: int,+ def retrieve(self, retrieval_method: str, query: str, dataset: Dataset, top_k: int,score_threshold: float, reranking_model: dict) -> list[Document]:raise NotImplementedErrordiff --git a/api/core/rag/index_processor/processor/paragraph_index_processor.py b/api/core/rag/index_processor/processor/paragraph_index_processor.pyindex 5fbc319fd63..bd7f6093bd1 100644--- a/api/core/rag/index_processor/processor/paragraph_index_processor.py+++ b/api/core/rag/index_processor/processor/paragraph_index_processor.py@@ -42,7 +42,7 @@ class ParagraphIndexProcessor(BaseIndexProcessor):hash = helper.generate_text_hash(document_node.page_content)document_node.metadata['doc_id'] = doc_iddocument_node.metadata['doc_hash'] = hash- # delete Spliter character+ # delete Splitter characterpage_content = document_node.page_contentif page_content.startswith(".") or page_content.startswith("。"):page_content = page_content[1:].strip()@@ -76,10 +76,10 @@ class ParagraphIndexProcessor(BaseIndexProcessor):else:keyword.delete()- def retrieve(self, retrival_method: str, query: str, dataset: Dataset, top_k: int,+ def retrieve(self, retrieval_method: str, query: str, dataset: Dataset, top_k: int,score_threshold: float, reranking_model: dict) -> list[Document]:# Set search parameters.- results = RetrievalService.retrieve(retrival_method=retrival_method, dataset_id=dataset.id, query=query,+ results = RetrievalService.retrieve(retrieval_method=retrieval_method, dataset_id=dataset.id, query=query,top_k=top_k, score_threshold=score_threshold,reranking_model=reranking_model)# Organize results.diff --git a/api/core/rag/index_processor/processor/qa_index_processor.py b/api/core/rag/index_processor/processor/qa_index_processor.pyindex 139bfe15f32..a44fd980368 100644--- a/api/core/rag/index_processor/processor/qa_index_processor.py+++ b/api/core/rag/index_processor/processor/qa_index_processor.py@@ -50,7 +50,7 @@ class QAIndexProcessor(BaseIndexProcessor):hash = helper.generate_text_hash(document_node.page_content)document_node.metadata['doc_id'] = doc_iddocument_node.metadata['doc_hash'] = hash- # delete Spliter character+ # delete Splitter characterpage_content = document_node.page_contentif page_content.startswith(".") or page_content.startswith("。"):page_content = page_content[1:]@@ -107,10 +107,10 @@ class QAIndexProcessor(BaseIndexProcessor):else:vector.delete()- def retrieve(self, retrival_method: str, query: str, dataset: Dataset, top_k: int,+ def retrieve(self, retrieval_method: str, query: str, dataset: Dataset, top_k: int,score_threshold: float, reranking_model: dict):# Set search parameters.- results = RetrievalService.retrieve(retrival_method=retrival_method, dataset_id=dataset.id, query=query,+ results = RetrievalService.retrieve(retrieval_method=retrieval_method, dataset_id=dataset.id, query=query,top_k=top_k, score_threshold=score_threshold,reranking_model=reranking_model)# Organize results.diff --git a/api/core/rag/retrieval/dataset_retrieval.py b/api/core/rag/retrieval/dataset_retrieval.pyindex c970e3dafaa..db01652f896 100644--- a/api/core/rag/retrieval/dataset_retrieval.py+++ b/api/core/rag/retrieval/dataset_retrieval.py@@ -21,7 +21,7 @@ from core.rag.data_post_processor.data_post_processor import DataPostProcessorfrom core.rag.datasource.keyword.jieba.jieba_keyword_table_handler import JiebaKeywordTableHandlerfrom core.rag.datasource.retrieval_service import RetrievalServicefrom core.rag.models.document import Document-from core.rag.retrieval.retrival_methods import RetrievalMethod+from core.rag.retrieval.retrieval_methods import RetrievalMethodfrom core.rag.retrieval.router.multi_dataset_function_call_router import FunctionCallMultiDatasetRouterfrom core.rag.retrieval.router.multi_dataset_react_route import ReactMultiDatasetRouterfrom core.tools.tool.dataset_retriever.dataset_multi_retriever_tool import DatasetMultiRetrieverTool@@ -261,9 +261,9 @@ class DatasetRetrieval:top_k = retrieval_model_config['top_k']# get retrieval methodif dataset.indexing_technique == "economy":- retrival_method = 'keyword_search'+ retrieval_method = 'keyword_search'else:- retrival_method = retrieval_model_config['search_method']+ retrieval_method = retrieval_model_config['search_method']# get reranking modelreranking_model = retrieval_model_config['reranking_model'] \if retrieval_model_config['reranking_enable'] else None@@ -275,7 +275,7 @@ class DatasetRetrieval:with measure_time() as timer:results = RetrievalService.retrieve(- retrival_method=retrival_method, dataset_id=dataset.id,+ retrieval_method=retrieval_method, dataset_id=dataset.id,query=query,top_k=top_k, score_threshold=score_threshold,reranking_model=reranking_model,@@ -285,7 +285,7 @@ class DatasetRetrieval:self._on_query(query, [dataset_id], app_id, user_from, user_id)if results:- self._on_retrival_end(results, message_id, timer)+ self._on_retrieval_end(results, message_id, timer)return resultsreturn []@@ -347,14 +347,14 @@ class DatasetRetrieval:self._on_query(query, dataset_ids, app_id, user_from, user_id)if all_documents:- self._on_retrival_end(all_documents, message_id, timer)+ self._on_retrieval_end(all_documents, message_id, timer)return all_documents- def _on_retrival_end(+ def _on_retrieval_end(self, documents: list[Document], message_id: Optional[str] = None, timer: Optional[dict] = None) -> None:- """Handle retrival end."""+ """Handle retrieval end."""for document in documents:query = db.session.query(DocumentSegment).filter(DocumentSegment.index_node_id == document.metadata['doc_id']@@ -419,7 +419,7 @@ class DatasetRetrieval:if dataset.indexing_technique == "economy":# use keyword table query- documents = RetrievalService.retrieve(retrival_method='keyword_search',+ documents = RetrievalService.retrieve(retrieval_method='keyword_search',dataset_id=dataset.id,query=query,top_k=top_k@@ -429,7 +429,7 @@ class DatasetRetrieval:else:if top_k > 0:# retrieval source- documents = RetrievalService.retrieve(retrival_method=retrieval_model['search_method'],+ documents = RetrievalService.retrieve(retrieval_method=retrieval_model['search_method'],dataset_id=dataset.id,query=query,top_k=top_k,diff --git a/api/core/rag/retrieval/retrival_methods.py b/api/core/rag/retrieval/retrieval_methods.pysimilarity index 100%rename from api/core/rag/retrieval/retrival_methods.pyrename to api/core/rag/retrieval/retrieval_methods.pydiff --git a/api/core/tools/provider/builtin/dalle/dalle.yaml b/api/core/tools/provider/builtin/dalle/dalle.yamlindex f09a9177f22..37cf93c28aa 100644--- a/api/core/tools/provider/builtin/dalle/dalle.yaml+++ b/api/core/tools/provider/builtin/dalle/dalle.yaml@@ -29,7 +29,7 @@ credentials_for_provider:en_US: Please input your OpenAI API keyzh_Hans: 请输入你的 OpenAI API keypt_BR: Please input your OpenAI API key- openai_organizaion_id:+ openai_organization_id:type: text-inputrequired: falselabel:diff --git a/api/core/tools/provider/builtin/dalle/tools/dalle2.py b/api/core/tools/provider/builtin/dalle/tools/dalle2.pyindex 450e7822813..9e9f32d4297 100644--- a/api/core/tools/provider/builtin/dalle/tools/dalle2.py+++ b/api/core/tools/provider/builtin/dalle/tools/dalle2.py@@ -16,7 +16,7 @@ class DallE2Tool(BuiltinTool):"""invoke tools"""- openai_organization = self.runtime.credentials.get('openai_organizaion_id', None)+ openai_organization = self.runtime.credentials.get('openai_organization_id', None)if not openai_organization:openai_organization = Noneopenai_base_url = self.runtime.credentials.get('openai_base_url', None)diff --git a/api/core/tools/provider/builtin/dalle/tools/dalle3.py b/api/core/tools/provider/builtin/dalle/tools/dalle3.pyindex f985deade55..4f5033dd7fe 100644--- a/api/core/tools/provider/builtin/dalle/tools/dalle3.py+++ b/api/core/tools/provider/builtin/dalle/tools/dalle3.py@@ -17,7 +17,7 @@ class DallE3Tool(BuiltinTool):"""invoke tools"""- openai_organization = self.runtime.credentials.get('openai_organizaion_id', None)+ openai_organization = self.runtime.credentials.get('openai_organization_id', None)if not openai_organization:openai_organization = Noneopenai_base_url = self.runtime.credentials.get('openai_base_url', None)diff --git a/api/core/tools/provider/builtin/github/github.py b/api/core/tools/provider/builtin/github/github.pyindex 9275504208c..b19f0896f8e 100644--- a/api/core/tools/provider/builtin/github/github.py+++ b/api/core/tools/provider/builtin/github/github.py@@ -4,7 +4,7 @@ from core.tools.errors import ToolProviderCredentialValidationErrorfrom core.tools.provider.builtin_tool_provider import BuiltinToolProviderController-class GihubProvider(BuiltinToolProviderController):+class GithubProvider(BuiltinToolProviderController):def _validate_credentials(self, credentials: dict) -> None:try:if 'access_tokens' not in credentials or not credentials.get('access_tokens'):diff --git a/api/core/tools/provider/builtin/github/tools/github_repositories.py b/api/core/tools/provider/builtin/github/tools/github_repositories.pyindex a2f1e07fd49..305bf08ce8e 100644--- a/api/core/tools/provider/builtin/github/tools/github_repositories.py+++ b/api/core/tools/provider/builtin/github/tools/github_repositories.py@@ -9,7 +9,7 @@ from core.tools.entities.tool_entities import ToolInvokeMessagefrom core.tools.tool.builtin_tool import BuiltinTool-class GihubRepositoriesTool(BuiltinTool):+class GithubRepositoriesTool(BuiltinTool):def _invoke(self, user_id: str, tool_parameters: dict[str, Any]) -> Union[ToolInvokeMessage, list[ToolInvokeMessage]]:"""invoke toolsdiff --git a/api/core/tools/provider/builtin/gitlab/tools/gitlab_commits.py b/api/core/tools/provider/builtin/gitlab/tools/gitlab_commits.pyindex 880d722bda8..0824eb3a263 100644--- a/api/core/tools/provider/builtin/gitlab/tools/gitlab_commits.py+++ b/api/core/tools/provider/builtin/gitlab/tools/gitlab_commits.py@@ -60,7 +60,7 @@ class GitlabCommitsTool(BuiltinTool):project_name = project['name']print(f"Project: {project_name}")- # Get all of proejct commits+ # Get all of project commitscommits_url = f"{domain}/api/v4/projects/{project_id}/repository/commits"params = {'since': start_time,@@ -83,7 +83,7 @@ class GitlabCommitsTool(BuiltinTool):diffs = diff_response.json()for diff in diffs:- # Caculate code lines of changed+ # Calculate code lines of changedadded_lines = diff['diff'].count('\n+')removed_lines = diff['diff'].count('\n-')total_changes = added_lines + removed_linesdiff --git a/api/core/tools/provider/builtin/gitlab/tools/gitlab_commits.yaml b/api/core/tools/provider/builtin/gitlab/tools/gitlab_commits.yamlindex dd4e31d6633..d38d943958c 100644--- a/api/core/tools/provider/builtin/gitlab/tools/gitlab_commits.yaml+++ b/api/core/tools/provider/builtin/gitlab/tools/gitlab_commits.yaml@@ -6,7 +6,7 @@ identity:zh_Hans: GitLab 提交内容查询description:human:- en_US: A tool for query GitLab commits, Input should be a exists username or projec.+ en_US: A tool for query GitLab commits, Input should be a exists username or project.zh_Hans: 一个用于查询 GitLab 代码提交内容的工具,输入的内容应该是一个已存在的用户名或者项目名。llm: A tool for query GitLab commits, Input should be a exists username or project.parameters:diff --git a/api/core/tools/provider/builtin/openweather/tools/weather.py b/api/core/tools/provider/builtin/openweather/tools/weather.pyindex 536a3511f46..d6c49a230f9 100644--- a/api/core/tools/provider/builtin/openweather/tools/weather.py+++ b/api/core/tools/provider/builtin/openweather/tools/weather.py@@ -29,7 +29,7 @@ class OpenweatherTool(BuiltinTool):# request URLurl = "https://api.openweathermap.org/data/2.5/weather"- # request parmas+ # request paramsparams = {"q": city,"appid": self.runtime.credentials.get("api_key"),diff --git a/api/core/tools/provider/builtin/spark/tools/spark_img_generation.py b/api/core/tools/provider/builtin/spark/tools/spark_img_generation.pyindex a977af2b765..c7b0de014f9 100644--- a/api/core/tools/provider/builtin/spark/tools/spark_img_generation.py+++ b/api/core/tools/provider/builtin/spark/tools/spark_img_generation.py@@ -35,20 +35,20 @@ def sha256base64(data):return digest-def parse_url(requset_url):- stidx = requset_url.index("://")- host = requset_url[stidx + 3 :]- schema = requset_url[: stidx + 3]+def parse_url(request_url):+ stidx = request_url.index("://")+ host = request_url[stidx + 3 :]+ schema = request_url[: stidx + 3]edidx = host.index("/")if edidx <= 0:- raise AssembleHeaderException("invalid request url:" + requset_url)+ raise AssembleHeaderException("invalid request url:" + request_url)path = host[edidx:]host = host[:edidx]u = Url(host, path, schema)return u-def assemble_ws_auth_url(requset_url, method="GET", api_key="", api_secret=""):- u = parse_url(requset_url)+def assemble_ws_auth_url(request_url, method="GET", api_key="", api_secret=""):+ u = parse_url(request_url)host = u.hostpath = u.pathnow = datetime.now()@@ -69,7 +69,7 @@ def assemble_ws_auth_url(requset_url, method="GET", api_key="", api_secret=""):)values = {"host": host, "date": date, "authorization": authorization}- return requset_url + "?" + urlencode(values)+ return request_url + "?" + urlencode(values)def get_body(appid, text):diff --git a/api/core/tools/provider/builtin/spider/tools/scraper_crawler.py b/api/core/tools/provider/builtin/spider/tools/scraper_crawler.pyindex 64bbcc10ccc..40736cd4021 100644--- a/api/core/tools/provider/builtin/spider/tools/scraper_crawler.py+++ b/api/core/tools/provider/builtin/spider/tools/scraper_crawler.py@@ -42,6 +42,6 @@ class ScrapeTool(BuiltinTool):result += "URL: " + i.get('url', '') + "\n"result += "CONTENT: " + i.get('content', '') + "\n\n"except Exception as e:- return self.create_text_message("An error occured", str(e))+ return self.create_text_message("An error occurred", str(e))return self.create_text_message(result)diff --git a/api/core/tools/tool/dataset_retriever/dataset_multi_retriever_tool.py b/api/core/tools/tool/dataset_retriever/dataset_multi_retriever_tool.pyindex 7cb7c033bbe..d6ecc9257bc 100644--- a/api/core/tools/tool/dataset_retriever/dataset_multi_retriever_tool.py+++ b/api/core/tools/tool/dataset_retriever/dataset_multi_retriever_tool.py@@ -8,7 +8,7 @@ from core.model_manager import ModelManagerfrom core.model_runtime.entities.model_entities import ModelTypefrom core.rag.datasource.retrieval_service import RetrievalServicefrom core.rag.rerank.rerank_model import RerankModelRunner-from core.rag.retrieval.retrival_methods import RetrievalMethod+from core.rag.retrieval.retrieval_methods import RetrievalMethodfrom core.tools.tool.dataset_retriever.dataset_retriever_base_tool import DatasetRetrieverBaseToolfrom extensions.ext_database import dbfrom models.dataset import Dataset, Document, DocumentSegment@@ -163,7 +163,7 @@ class DatasetMultiRetrieverTool(DatasetRetrieverBaseTool):if dataset.indexing_technique == "economy":# use keyword table query- documents = RetrievalService.retrieve(retrival_method='keyword_search',+ documents = RetrievalService.retrieve(retrieval_method='keyword_search',dataset_id=dataset.id,query=query,top_k=self.top_k@@ -173,7 +173,7 @@ class DatasetMultiRetrieverTool(DatasetRetrieverBaseTool):else:if self.top_k > 0:# retrieval source- documents = RetrievalService.retrieve(retrival_method=retrieval_model['search_method'],+ documents = RetrievalService.retrieve(retrieval_method=retrieval_model['search_method'],dataset_id=dataset.id,query=query,top_k=self.top_k,diff --git a/api/core/tools/tool/dataset_retriever/dataset_retriever_tool.py b/api/core/tools/tool/dataset_retriever/dataset_retriever_tool.pyindex a7e70af6286..220e4baa855 100644--- a/api/core/tools/tool/dataset_retriever/dataset_retriever_tool.py+++ b/api/core/tools/tool/dataset_retriever/dataset_retriever_tool.py@@ -2,7 +2,7 @@from pydantic import BaseModel, Fieldfrom core.rag.datasource.retrieval_service import RetrievalService-from core.rag.retrieval.retrival_methods import RetrievalMethod+from core.rag.retrieval.retrieval_methods import RetrievalMethodfrom core.tools.tool.dataset_retriever.dataset_retriever_base_tool import DatasetRetrieverBaseToolfrom extensions.ext_database import dbfrom models.dataset import Dataset, Document, DocumentSegment@@ -63,7 +63,7 @@ class DatasetRetrieverTool(DatasetRetrieverBaseTool):retrieval_model = dataset.retrieval_model if dataset.retrieval_model else default_retrieval_modelif dataset.indexing_technique == "economy":# use keyword table query- documents = RetrievalService.retrieve(retrival_method='keyword_search',+ documents = RetrievalService.retrieve(retrieval_method='keyword_search',dataset_id=dataset.id,query=query,top_k=self.top_k@@ -72,7 +72,7 @@ class DatasetRetrieverTool(DatasetRetrieverBaseTool):else:if self.top_k > 0:# retrieval source- documents = RetrievalService.retrieve(retrival_method=retrieval_model.get('search_method', 'semantic_search'),+ documents = RetrievalService.retrieve(retrieval_method=retrieval_model.get('search_method', 'semantic_search'),dataset_id=dataset.id,query=query,top_k=self.top_k,diff --git a/api/core/tools/tool/dataset_retriever_tool.py b/api/core/tools/tool/dataset_retriever_tool.pyindex 1170e1b7a5f..b5698ad2304 100644--- a/api/core/tools/tool/dataset_retriever_tool.py+++ b/api/core/tools/tool/dataset_retriever_tool.py@@ -17,7 +17,7 @@ from core.tools.tool.tool import Toolclass DatasetRetrieverTool(Tool):- retrival_tool: DatasetRetrieverBaseTool+ retrieval_tool: DatasetRetrieverBaseTool@staticmethoddef get_dataset_tools(tenant_id: str,@@ -42,7 +42,7 @@ class DatasetRetrieverTool(Tool):# Agent only support SINGLE modeoriginal_retriever_mode = retrieve_config.retrieve_strategyretrieve_config.retrieve_strategy = DatasetRetrieveConfigEntity.RetrieveStrategy.SINGLE- retrival_tools = feature.to_dataset_retriever_tool(+ retrieval_tools = feature.to_dataset_retriever_tool(tenant_id=tenant_id,dataset_ids=dataset_ids,retrieve_config=retrieve_config,@@ -53,17 +53,17 @@ class DatasetRetrieverTool(Tool):# restore retrieve strategyretrieve_config.retrieve_strategy = original_retriever_mode- # convert retrival tools to Tools+ # convert retrieval tools to Toolstools = []- for retrival_tool in retrival_tools:+ for retrieval_tool in retrieval_tools:tool = DatasetRetrieverTool(- retrival_tool=retrival_tool,- identity=ToolIdentity(provider='', author='', name=retrival_tool.name, label=I18nObject(en_US='', zh_Hans='')),+ retrieval_tool=retrieval_tool,+ identity=ToolIdentity(provider='', author='', name=retrieval_tool.name, label=I18nObject(en_US='', zh_Hans='')),parameters=[],is_team_authorization=True,description=ToolDescription(human=I18nObject(en_US='', zh_Hans=''),- llm=retrival_tool.description),+ llm=retrieval_tool.description),runtime=DatasetRetrieverTool.Runtime())@@ -95,7 +95,7 @@ class DatasetRetrieverTool(Tool):return self.create_text_message(text='please input query')# invoke dataset retriever tool- result = self.retrival_tool._run(query=query)+ result = self.retrieval_tool._run(query=query)return self.create_text_message(text=result)diff --git a/api/core/tools/utils/web_reader_tool.py b/api/core/tools/utils/web_reader_tool.pyindex a461328ae6f..150941924d7 100644--- a/api/core/tools/utils/web_reader_tool.py+++ b/api/core/tools/utils/web_reader_tool.py@@ -189,8 +189,8 @@ def extract_text_blocks_as_plain_text(paragraph_html):def plain_text_leaf_node(element):- # Extract all text, stripped of any child HTML elements and normalise it- plain_text = normalise_text(element.get_text())+ # Extract all text, stripped of any child HTML elements and normalize it+ plain_text = normalize_text(element.get_text())if plain_text != "" and element.name == "li":plain_text = "* {}, ".format(plain_text)if plain_text == "":@@ -231,8 +231,8 @@ def plain_element(element, content_digests, node_indexes):# For leaf node elements, extract the text content, discarding any HTML tags# 1. Get element contents as textplain_text = element.get_text()- # 2. Normalise the extracted text string to a canonical representation- plain_text = normalise_text(plain_text)+ # 2. Normalize the extracted text string to a canonical representation+ plain_text = normalize_text(plain_text)# 3. Update element content to be plain textelement.string = plain_textelif is_text(element):@@ -243,7 +243,7 @@ def plain_element(element, content_digests, node_indexes):element = type(element)("")else:plain_text = element.string- plain_text = normalise_text(plain_text)+ plain_text = normalize_text(plain_text)element = type(element)(plain_text)else:# If not a leaf node or leaf type call recursively on child nodes, replacing@@ -267,12 +267,12 @@ def add_node_indexes(element, node_index="0"):return element-def normalise_text(text):- """Normalise unicode and whitespace."""- # Normalise unicode first to try and standardise whitespace characters as much as possible before normalising them+def normalize_text(text):+ """Normalize unicode and whitespace."""+ # Normalize unicode first to try and standardize whitespace characters as much as possible before normalizing themtext = strip_control_characters(text)- text = normalise_unicode(text)- text = normalise_whitespace(text)+ text = normalize_unicode(text)+ text = normalize_whitespace(text)return text@@ -291,14 +291,14 @@ def strip_control_characters(text):return "".join(["" if (unicodedata.category(char) in control_chars) and (char not in retained_chars) else char for char in text])-def normalise_unicode(text):- """Normalise unicode such that things that are visually equivalent map to the same unicode string where possible."""+def normalize_unicode(text):+ """Normalize unicode such that things that are visually equivalent map to the same unicode string where possible."""normal_form = "NFKC"text = unicodedata.normalize(normal_form, text)return text-def normalise_whitespace(text):+def normalize_whitespace(text):"""Replace runs of whitespace characters with a single space as this is what happens when HTML text is displayed."""text = regex.sub(r"\s+", " ", text)# Remove leading and trailing whitespacediff --git a/api/core/workflow/entities/variable_pool.py b/api/core/workflow/entities/variable_pool.pyindex 8120b2ac780..27d0b672f66 100644--- a/api/core/workflow/entities/variable_pool.py+++ b/api/core/workflow/entities/variable_pool.py@@ -31,7 +31,7 @@ class VariablePool:# 'files': []# }- # Varaible dictionary is a dictionary for looking up variables by their selector.+ # Variable dictionary is a dictionary for looking up variables by their selector.# The first element of the selector is the node id, it's the first-level key in the dictionary.# Other elements of the selector are the keys in the second-level dictionary. To get the key, we hash the# elements of the selector except the first one.diff --git a/api/core/workflow/nodes/knowledge_retrieval/knowledge_retrieval_node.py b/api/core/workflow/nodes/knowledge_retrieval/knowledge_retrieval_node.pyindex 5bfdd038971..6c052c0d6bb 100644--- a/api/core/workflow/nodes/knowledge_retrieval/knowledge_retrieval_node.py+++ b/api/core/workflow/nodes/knowledge_retrieval/knowledge_retrieval_node.py@@ -11,7 +11,7 @@ from core.model_manager import ModelInstance, ModelManagerfrom core.model_runtime.entities.model_entities import ModelFeature, ModelTypefrom core.model_runtime.model_providers.__base.large_language_model import LargeLanguageModelfrom core.rag.retrieval.dataset_retrieval import DatasetRetrieval-from core.rag.retrieval.retrival_methods import RetrievalMethod+from core.rag.retrieval.retrieval_methods import RetrievalMethodfrom core.workflow.entities.base_node_data_entities import BaseNodeDatafrom core.workflow.entities.node_entities import NodeRunResult, NodeTypefrom core.workflow.entities.variable_pool import VariablePooldiff --git a/api/events/event_handlers/__init__.py b/api/events/event_handlers/__init__.pyindex 7ee7146d098..1d6ad35333c 100644--- a/api/events/event_handlers/__init__.py+++ b/api/events/event_handlers/__init__.py@@ -3,8 +3,8 @@ from .clean_when_document_deleted import handlefrom .create_document_index import handlefrom .create_installed_app_when_app_created import handlefrom .create_site_record_when_app_created import handle-from .deduct_quota_when_messaeg_created import handle+from .deduct_quota_when_message_created import handlefrom .delete_tool_parameters_cache_when_sync_draft_workflow import handlefrom .update_app_dataset_join_when_app_model_config_updated import handlefrom .update_app_dataset_join_when_app_published_workflow_updated import handle-from .update_provider_last_used_at_when_messaeg_created import handle+from .update_provider_last_used_at_when_message_created import handlediff --git a/api/events/event_handlers/deduct_quota_when_messaeg_created.py b/api/events/event_handlers/deduct_quota_when_message_created.pysimilarity index 100%rename from api/events/event_handlers/deduct_quota_when_messaeg_created.pyrename to api/events/event_handlers/deduct_quota_when_message_created.pydiff --git a/api/events/event_handlers/update_provider_last_used_at_when_messaeg_created.py b/api/events/event_handlers/update_provider_last_used_at_when_message_created.pysimilarity index 100%rename from api/events/event_handlers/update_provider_last_used_at_when_messaeg_created.pyrename to api/events/event_handlers/update_provider_last_used_at_when_message_created.pydiff --git a/api/models/dataset.py b/api/models/dataset.pyindex 203031c7b98..bf3f12a2c56 100644--- a/api/models/dataset.py+++ b/api/models/dataset.py@@ -14,7 +14,7 @@ from sqlalchemy import funcfrom sqlalchemy.dialects.postgresql import JSONBfrom configs import dify_config-from core.rag.retrieval.retrival_methods import RetrievalMethod+from core.rag.retrieval.retrieval_methods import RetrievalMethodfrom extensions.ext_database import dbfrom extensions.ext_storage import storagediff --git a/api/services/dataset_service.py b/api/services/dataset_service.pyindex ad552e1babd..4a11de281c9 100644--- a/api/services/dataset_service.py+++ b/api/services/dataset_service.py@@ -15,7 +15,7 @@ from core.model_manager import ModelManagerfrom core.model_runtime.entities.model_entities import ModelTypefrom core.rag.datasource.keyword.keyword_factory import Keywordfrom core.rag.models.document import Document as RAGDocument-from core.rag.retrieval.retrival_methods import RetrievalMethod+from core.rag.retrieval.retrieval_methods import RetrievalMethodfrom events.dataset_event import dataset_was_deletedfrom events.document_event import document_was_deletedfrom extensions.ext_database import dbdiff --git a/api/services/hit_testing_service.py b/api/services/hit_testing_service.pyindex db990648140..2f911f50366 100644--- a/api/services/hit_testing_service.py+++ b/api/services/hit_testing_service.py@@ -3,7 +3,7 @@ import timefrom core.rag.datasource.retrieval_service import RetrievalServicefrom core.rag.models.document import Document-from core.rag.retrieval.retrival_methods import RetrievalMethod+from core.rag.retrieval.retrieval_methods import RetrievalMethodfrom extensions.ext_database import dbfrom models.account import Accountfrom models.dataset import Dataset, DatasetQuery, DocumentSegment@@ -36,7 +36,7 @@ class HitTestingService:retrieval_model = dataset.retrieval_model if dataset.retrieval_model else default_retrieval_modelall_documents = RetrievalService.retrieve(- retrival_method=retrieval_model.get("search_method", "semantic_search"),+ retrieval_method=retrieval_model.get("search_method", "semantic_search"),dataset_id=dataset.id,query=cls.escape_query_for_search(query),top_k=retrieval_model.get("top_k", 2),diff --git a/api/tasks/sync_website_document_indexing_task.py b/api/tasks/sync_website_document_indexing_task.pyindex 99fb66e1f3d..1d2a338c831 100644--- a/api/tasks/sync_website_document_indexing_task.py+++ b/api/tasks/sync_website_document_indexing_task.py@@ -20,7 +20,7 @@ def sync_website_document_indexing_task(dataset_id: str, document_id: str)::param dataset_id::param document_id:- Usage: sunc_website_document_indexing_task.delay(dataset_id, document_id)+ Usage: sync_website_document_indexing_task.delay(dataset_id, document_id)"""start_at = time.perf_counter()diff --git a/api/tests/integration_tests/model_runtime/baichuan/test_llm.py b/api/tests/integration_tests/model_runtime/baichuan/test_llm.pyindex ad586102879..fe7fe968911 100644--- a/api/tests/integration_tests/model_runtime/baichuan/test_llm.py+++ b/api/tests/integration_tests/model_runtime/baichuan/test_llm.py@@ -8,11 +8,11 @@ from core.model_runtime.entities.llm_entities import LLMResult, LLMResultChunk,from core.model_runtime.entities.message_entities import AssistantPromptMessage, SystemPromptMessage, UserPromptMessagefrom core.model_runtime.entities.model_entities import AIModelEntityfrom core.model_runtime.errors.validate import CredentialsValidateFailedError-from core.model_runtime.model_providers.baichuan.llm.llm import BaichuanLarguageModel+from core.model_runtime.model_providers.baichuan.llm.llm import BaichuanLanguageModeldef test_predefined_models():- model = BaichuanLarguageModel()+ model = BaichuanLanguageModel()model_schemas = model.predefined_models()assert len(model_schemas) >= 1assert isinstance(model_schemas[0], AIModelEntity)@@ -20,7 +20,7 @@ def test_predefined_models():def test_validate_credentials_for_chat_model():sleep(3)- model = BaichuanLarguageModel()+ model = BaichuanLanguageModel()with pytest.raises(CredentialsValidateFailedError):model.validate_credentials(@@ -38,7 +38,7 @@ def test_validate_credentials_for_chat_model():def test_invoke_model():sleep(3)- model = BaichuanLarguageModel()+ model = BaichuanLanguageModel()response = model.invoke(model="baichuan2-turbo",@@ -64,7 +64,7 @@ def test_invoke_model():def test_invoke_model_with_system_message():sleep(3)- model = BaichuanLarguageModel()+ model = BaichuanLanguageModel()response = model.invoke(model="baichuan2-turbo",@@ -93,7 +93,7 @@ def test_invoke_model_with_system_message():def test_invoke_stream_model():sleep(3)- model = BaichuanLarguageModel()+ model = BaichuanLanguageModel()response = model.invoke(model="baichuan2-turbo",@@ -122,7 +122,7 @@ def test_invoke_stream_model():def test_invoke_with_search():sleep(3)- model = BaichuanLarguageModel()+ model = BaichuanLanguageModel()response = model.invoke(model="baichuan2-turbo",@@ -156,7 +156,7 @@ def test_invoke_with_search():def test_get_num_tokens():sleep(3)- model = BaichuanLarguageModel()+ model = BaichuanLanguageModel()response = model.get_num_tokens(model="baichuan2-turbo",diff --git a/api/tests/integration_tests/model_runtime/google/test_llm.py b/api/tests/integration_tests/model_runtime/google/test_llm.pyindex 4d9d490a872..34d08f270af 100644--- a/api/tests/integration_tests/model_runtime/google/test_llm.py+++ b/api/tests/integration_tests/model_runtime/google/test_llm.py@@ -155,7 +155,7 @@ def test_invoke_chat_model_with_vision_multi_pics(setup_google_mock):user="abc-123",)- print(f"resultz: {result.message.content}")+ print(f"result: {result.message.content}")assert isinstance(result, LLMResult)assert len(result.message.content) > 0diff --git a/api/tests/integration_tests/model_runtime/xinference/test_llm.py b/api/tests/integration_tests/model_runtime/xinference/test_llm.pyindex 48d1ae323d6..7db59fddeff 100644--- a/api/tests/integration_tests/model_runtime/xinference/test_llm.py+++ b/api/tests/integration_tests/model_runtime/xinference/test_llm.py@@ -109,7 +109,7 @@ def test_invoke_stream_chat_model(setup_openai_mock, setup_xinference_mock):"""- Funtion calling of xinference does not support stream mode currently+ Function calling of xinference does not support stream mode currently"""# def test_invoke_stream_chat_model_with_functions():# model = XinferenceAILargeLanguageModel()diff --git a/api/tests/integration_tests/vdb/pgvecto_rs/test_pgvecto_rs.py b/api/tests/integration_tests/vdb/pgvecto_rs/test_pgvecto_rs.pyindex 6b33217d157..6497f47deb9 100644--- a/api/tests/integration_tests/vdb/pgvecto_rs/test_pgvecto_rs.py+++ b/api/tests/integration_tests/vdb/pgvecto_rs/test_pgvecto_rs.py@@ -31,5 +31,5 @@ class PGVectoRSVectorTest(AbstractVectorTest):assert len(ids) == 1-def test_pgvecot_rs(setup_mock_redis):+def test_pgvecto_rs(setup_mock_redis):PGVectoRSVectorTest().run_all_tests()diff --git a/docker/startupscripts/init.sh b/docker/startupscripts/init.shindex ee7600850a0..c6e6e1966f9 100755--- a/docker/startupscripts/init.sh+++ b/docker/startupscripts/init.sh@@ -1,13 +1,13 @@#!/usr/bin/env bash-DB_INITIALISED="/opt/oracle/oradata/dbinit"-#[ -f ${DB_INITIALISED} ] && exit-#touch ${DB_INITIALISED}-if [ -f ${DB_INITIALISED} ]; then+DB_INITIALIZED="/opt/oracle/oradata/dbinit"+#[ -f ${DB_INITIALIZED} ] && exit+#touch ${DB_INITIALIZED}+if [ -f ${DB_INITIALIZED} ]; thenecho 'File exists. Standards for have been Init'exitelse- echo 'File does not exist. Standards for first time Strart up this DB'+ echo 'File does not exist. Standards for first time Start up this DB'"$ORACLE_HOME"/bin/sqlplus -s "/ as sysdba" @"/opt/oracle/scripts/startup/init_user.script";- touch ${DB_INITIALISED}+ touch ${DB_INITIALIZED}fidiff --git a/sdks/nodejs-client/README.md b/sdks/nodejs-client/README.mdindex 50303b48675..37b5ca2d0a9 100644--- a/sdks/nodejs-client/README.md+++ b/sdks/nodejs-client/README.md@@ -18,7 +18,7 @@ const query = 'Please tell me a short story in 10 words or less.'const remote_url_files = [{type: 'image',transfer_method: 'remote_url',- url: 'your_url_addresss'+ url: 'your_url_address'}]// Create a completion clientdiff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/layout.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/layout.tsxindex 8723420d849..e728749b852 100644--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/layout.tsx+++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/layout.tsx@@ -108,7 +108,7 @@ const AppDetailLayout: FC<IAppDetailLayoutProps> = (props) => {useEffect(() => {setAppDetail()fetchAppDetail({ url: '/apps', id: appId }).then((res) => {- // redirections+ // redirectionif ((res.mode === 'workflow' || res.mode === 'advanced-chat') && (pathname).endsWith('configuration')) {router.replace(`/app/${appId}/workflow`)}diff --git a/web/app/(commonLayout)/apps/AppCard.tsx b/web/app/(commonLayout)/apps/AppCard.tsxindex fb39dee5a35..1ffb132cf8c 100644--- a/web/app/(commonLayout)/apps/AppCard.tsx+++ b/web/app/(commonLayout)/apps/AppCard.tsx@@ -21,7 +21,7 @@ import Divider from '@/app/components/base/divider'import { getRedirection } from '@/utils/app-redirection'import { useProviderContext } from '@/context/provider-context'import { NEED_REFRESH_APP_LIST_KEY } from '@/config'-import { AiText, ChatBot, CuteRobote } from '@/app/components/base/icons/src/vender/solid/communication'+import { AiText, ChatBot, CuteRobot } from '@/app/components/base/icons/src/vender/solid/communication'import { Route } from '@/app/components/base/icons/src/vender/solid/mapsAndTravel'import type { CreateAppModalProps } from '@/app/components/explore/create-app-modal'import EditAppModal from '@/app/components/explore/create-app-modal'@@ -273,7 +273,7 @@ const AppCard = ({ app, onRefresh }: AppCardProps) => {<ChatBot className='w-3 h-3 text-[#1570EF]' />)}{app.mode === 'agent-chat' && (- <CuteRobote className='w-3 h-3 text-indigo-600' />+ <CuteRobot className='w-3 h-3 text-indigo-600' />)}{app.mode === 'chat' && (<ChatBot className='w-3 h-3 text-[#1570EF]' />diff --git a/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout.tsx b/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout.tsxindex 7cd083d11b2..e691cc05f63 100644--- a/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout.tsx+++ b/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout.tsx@@ -35,7 +35,7 @@ import { DataSourceType } from '@/models/datasets'import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'import { LanguagesSupported } from '@/i18n/language'import { useStore } from '@/app/components/app/store'-import { AiText, ChatBot, CuteRobote } from '@/app/components/base/icons/src/vender/solid/communication'+import { AiText, ChatBot, CuteRobot } from '@/app/components/base/icons/src/vender/solid/communication'import { Route } from '@/app/components/base/icons/src/vender/solid/mapsAndTravel'import { getLocaleOnClient } from '@/i18n'import { useAppContext } from '@/context/app-context'@@ -67,7 +67,7 @@ const LikedItem = ({<ChatBot className='w-2.5 h-2.5 text-[#1570EF]' />)}{detail.mode === 'agent-chat' && (- <CuteRobote className='w-2.5 h-2.5 text-indigo-600' />+ <CuteRobot className='w-2.5 h-2.5 text-indigo-600' />)}{detail.mode === 'chat' && (<ChatBot className='w-2.5 h-2.5 text-[#1570EF]' />diff --git a/web/app/(commonLayout)/datasets/template/template.en.mdx b/web/app/(commonLayout)/datasets/template/template.en.mdxindex 511f61c737b..99fab1ed8b7 100644--- a/web/app/(commonLayout)/datasets/template/template.en.mdx+++ b/web/app/(commonLayout)/datasets/template/template.en.mdx@@ -148,7 +148,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from- original_document_id Source document ID (optional)- Used to re-upload the document or modify the document cleaning and segmentation configuration. The missing information is copied from the source document- The source document cannot be an archived document- - When original_document_id is passed in, the update operation is performed on behalf of the document. process_rule is a fillable item. If not filled in, the segmentation method of the source document will be used by defaul+ - When original_document_id is passed in, the update operation is performed on behalf of the document. process_rule is a fillable item. If not filled in, the segmentation method of the source document will be used by default- When original_document_id is not passed in, the new operation is performed on behalf of the document, and process_rule is required- indexing_technique Index modediff --git a/web/app/(commonLayout)/datasets/template/template.zh.mdx b/web/app/(commonLayout)/datasets/template/template.zh.mdxindex 93ce146857d..2f8c7e99dc8 100644--- a/web/app/(commonLayout)/datasets/template/template.zh.mdx+++ b/web/app/(commonLayout)/datasets/template/template.zh.mdx@@ -142,7 +142,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from</Property></Properties>- ### Request Bodys+ ### Request Body<Properties><Property name='data' type='multipart/form-data json string' key='data'>- original_document_id 源文档 ID (选填)diff --git a/web/app/components/app-sidebar/app-info.tsx b/web/app/components/app-sidebar/app-info.tsxindex b4a7a8a6199..12fe5cba468 100644--- a/web/app/components/app-sidebar/app-info.tsx+++ b/web/app/components/app-sidebar/app-info.tsx@@ -22,7 +22,7 @@ import { copyApp, deleteApp, exportAppConfig, updateAppInfo } from '@/service/apimport DuplicateAppModal from '@/app/components/app/duplicate-modal'import type { DuplicateAppModalProps } from '@/app/components/app/duplicate-modal'import CreateAppModal from '@/app/components/explore/create-app-modal'-import { AiText, ChatBot, CuteRobote } from '@/app/components/base/icons/src/vender/solid/communication'+import { AiText, ChatBot, CuteRobot } from '@/app/components/base/icons/src/vender/solid/communication'import { Route } from '@/app/components/base/icons/src/vender/solid/mapsAndTravel'import type { CreateAppModalProps } from '@/app/components/explore/create-app-modal'import { NEED_REFRESH_APP_LIST_KEY } from '@/config'@@ -214,7 +214,7 @@ const AppInfo = ({ expand }: IAppInfoProps) => {<ChatBot className={cn('w-3 h-3 text-[#1570EF]', !expand && '!w-2.5 !h-2.5')} />)}{appDetail.mode === 'agent-chat' && (- <CuteRobote className={cn('w-3 h-3 text-indigo-600', !expand && '!w-2.5 !h-2.5')} />+ <CuteRobot className={cn('w-3 h-3 text-indigo-600', !expand && '!w-2.5 !h-2.5')} />)}{appDetail.mode === 'chat' && (<ChatBot className={cn('w-3 h-3 text-[#1570EF]', !expand && '!w-2.5 !h-2.5')} />@@ -280,7 +280,7 @@ const AppInfo = ({ expand }: IAppInfoProps) => {<ChatBot className='w-3 h-3 text-[#1570EF]' />)}{appDetail.mode === 'agent-chat' && (- <CuteRobote className='w-3 h-3 text-indigo-600' />+ <CuteRobot className='w-3 h-3 text-indigo-600' />)}{appDetail.mode === 'chat' && (<ChatBot className='w-3 h-3 text-[#1570EF]' />@@ -323,7 +323,7 @@ const AppInfo = ({ expand }: IAppInfoProps) => {</div></div></div>- {/* desscription */}+ {/* description */}{appDetail.description && (<div className='px-4 py-2 text-gray-500 text-xs leading-[18px]'>{appDetail.description}</div>)}diff --git a/web/app/components/app/annotation/index.tsx b/web/app/components/app/annotation/index.tsxindex 0f54f5bfc32..c66aaef6ce4 100644--- a/web/app/components/app/annotation/index.tsx+++ b/web/app/components/app/annotation/index.tsx@@ -232,8 +232,8 @@ const Annotation: FC<Props> = ({middlePagesSiblingCount={1}setCurrentPage={setCurrPage}totalPages={Math.ceil(total / APP_PAGE_LIMIT)}- truncableClassName="w-8 px-0.5 text-center"- truncableText="..."+ truncatableClassName="w-8 px-0.5 text-center"+ truncatableText="..."><Pagination.PrevButtondisabled={currPage === 0}diff --git a/web/app/components/app/annotation/view-annotation-modal/index.tsx b/web/app/components/app/annotation/view-annotation-modal/index.tsxindex 7b96ad134e6..daa8434ff7c 100644--- a/web/app/components/app/annotation/view-annotation-modal/index.tsx+++ b/web/app/components/app/annotation/view-annotation-modal/index.tsx@@ -156,8 +156,8 @@ const ViewAnnotationModal: FC<Props> = ({middlePagesSiblingCount={1}setCurrentPage={setCurrPage}totalPages={Math.ceil(total / APP_PAGE_LIMIT)}- truncableClassName="w-8 px-0.5 text-center"- truncableText="..."+ truncatableClassName="w-8 px-0.5 text-center"+ truncatableText="..."><Pagination.PrevButtondisabled={currPage === 0}diff --git a/web/app/components/app/configuration/config-prompt/advanced-prompt-input.tsx b/web/app/components/app/configuration/config-prompt/advanced-prompt-input.tsxindex a07fe698215..afa2bf8e277 100644--- a/web/app/components/app/configuration/config-prompt/advanced-prompt-input.tsx+++ b/web/app/components/app/configuration/config-prompt/advanced-prompt-input.tsx@@ -262,7 +262,7 @@ const AdvancedPromptInput: FC<Props> = ({{isShowConfirmAddVar && (<ConfirmAddVarvarNameArr={newPromptVariables.map(v => v.name)}- onConfrim={handleAutoAdd(true)}+ onConfirm={handleAutoAdd(true)}onCancel={handleAutoAdd(false)}onHide={hideConfirmAddVar}/>diff --git a/web/app/components/app/configuration/config-prompt/confirm-add-var/index.tsx b/web/app/components/app/configuration/config-prompt/confirm-add-var/index.tsxindex f08f2ffc696..922f8bb36af 100644--- a/web/app/components/app/configuration/config-prompt/confirm-add-var/index.tsx+++ b/web/app/components/app/configuration/config-prompt/confirm-add-var/index.tsx@@ -7,7 +7,7 @@ import Button from '@/app/components/base/button'export type IConfirmAddVarProps = {varNameArr: string[]- onConfrim: () => void+ onConfirm: () => voidonCancel: () => voidonHide: () => void}@@ -22,7 +22,7 @@ const VarIcon = (const ConfirmAddVar: FC<IConfirmAddVarProps> = ({varNameArr,- onConfrim,+ onConfirm,onCancel,// onHide,}) => {@@ -63,7 +63,7 @@ const ConfirmAddVar: FC<IConfirmAddVarProps> = ({</div><div className='mt-7 flex justify-end space-x-2'><Button onClick={onCancel}>{t('common.operation.cancel')}</Button>- <Button variant='primary' onClick={onConfrim}>{t('common.operation.add')}</Button>+ <Button variant='primary' onClick={onConfirm}>{t('common.operation.add')}</Button></div></div>diff --git a/web/app/components/app/configuration/config-prompt/conversation-histroy/edit-modal.tsx b/web/app/components/app/configuration/config-prompt/conversation-history/edit-modal.tsxsimilarity index 100%rename from web/app/components/app/configuration/config-prompt/conversation-histroy/edit-modal.tsxrename to web/app/components/app/configuration/config-prompt/conversation-history/edit-modal.tsxdiff --git a/web/app/components/app/configuration/config-prompt/conversation-histroy/history-panel.tsx b/web/app/components/app/configuration/config-prompt/conversation-history/history-panel.tsxsimilarity index 100%rename from web/app/components/app/configuration/config-prompt/conversation-histroy/history-panel.tsxrename to web/app/components/app/configuration/config-prompt/conversation-history/history-panel.tsxdiff --git a/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx b/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsxindex 69e01a8e224..d7bfe8534e6 100644--- a/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx+++ b/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx@@ -33,7 +33,7 @@ export type ISimplePromptInput = {promptTemplate: stringpromptVariables: PromptVariable[]readonly?: boolean- onChange?: (promp: string, promptVariables: PromptVariable[]) => void+ onChange?: (prompt: string, promptVariables: PromptVariable[]) => voidnoTitle?: booleangradientBorder?: booleaneditorHeight?: number@@ -239,7 +239,7 @@ const Prompt: FC<ISimplePromptInput> = ({{isShowConfirmAddVar && (<ConfirmAddVarvarNameArr={newPromptVariables.map(v => v.name)}- onConfrim={handleAutoAdd(true)}+ onConfirm={handleAutoAdd(true)}onCancel={handleAutoAdd(false)}onHide={hideConfirmAddVar}/>diff --git a/web/app/components/app/configuration/config/agent/agent-setting/index.tsx b/web/app/components/app/configuration/config/agent/agent-setting/index.tsxindex b295a4e709b..959336457fc 100644--- a/web/app/components/app/configuration/config/agent/agent-setting/index.tsx+++ b/web/app/components/app/configuration/config/agent/agent-setting/index.tsx@@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next'import { RiCloseLine } from '@remixicon/react'import ItemPanel from './item-panel'import Button from '@/app/components/base/button'-import { CuteRobote } from '@/app/components/base/icons/src/vender/solid/communication'+import { CuteRobot } from '@/app/components/base/icons/src/vender/solid/communication'import { Unblur } from '@/app/components/base/icons/src/vender/solid/education'import Slider from '@/app/components/base/slider'import type { AgentConfig } from '@/models/debug'@@ -65,7 +65,7 @@ const AgentSetting: FC<Props> = ({<ItemPanelclassName='mb-4'icon={- <CuteRobote className='w-4 h-4 text-indigo-600' />+ <CuteRobot className='w-4 h-4 text-indigo-600' />}name={t('appDebug.agent.agentMode')}description={t('appDebug.agent.agentModeDes')}diff --git a/web/app/components/app/configuration/config/assistant-type-picker/index.tsx b/web/app/components/app/configuration/config/assistant-type-picker/index.tsxindex 6bdf678f85f..336d736e3b4 100644--- a/web/app/components/app/configuration/config/assistant-type-picker/index.tsx+++ b/web/app/components/app/configuration/config/assistant-type-picker/index.tsx@@ -12,7 +12,7 @@ import {} from '@/app/components/base/portal-to-follow-elem'import { BubbleText } from '@/app/components/base/icons/src/vender/solid/education'import Radio from '@/app/components/base/radio/ui'-import { CuteRobote } from '@/app/components/base/icons/src/vender/solid/communication'+import { CuteRobot } from '@/app/components/base/icons/src/vender/solid/communication'import { Settings04 } from '@/app/components/base/icons/src/vender/line/general'import { ArrowUpRight } from '@/app/components/base/icons/src/vender/line/arrows'import type { AgentConfig } from '@/models/debug'@@ -117,7 +117,7 @@ const AssistantTypePicker: FC<Props> = ({><PortalToFollowElemTrigger onClick={() => setOpen(v => !v)}><div className={cn(open && 'bg-gray-50', 'flex items-center h-8 px-3 border border-black/5 rounded-lg cursor-pointer select-none space-x-1 text-indigo-600')}>- {isAgent ? <BubbleText className='w-3 h-3' /> : <CuteRobote className='w-3 h-3' />}+ {isAgent ? <BubbleText className='w-3 h-3' /> : <CuteRobot className='w-3 h-3' />}<div className='text-xs font-medium'>{t(`appDebug.assistantType.${isAgent ? 'agentAssistant' : 'chatAssistant'}.name`)}</div><RiArrowDownSLine className='w-3 h-3' /></div>@@ -135,7 +135,7 @@ const AssistantTypePicker: FC<Props> = ({onClick={handleChange}/><SelectItem- Icon={CuteRobote}+ Icon={CuteRobot}value='agent'disabled={disabled}text={t('appDebug.assistantType.agentAssistant.name')}diff --git a/web/app/components/app/configuration/config/feature/use-feature.tsx b/web/app/components/app/configuration/config/feature/use-feature.tsxindex 190c50eab51..acc08dd4a42 100644--- a/web/app/components/app/configuration/config/feature/use-feature.tsx+++ b/web/app/components/app/configuration/config/feature/use-feature.tsx@@ -35,7 +35,7 @@ function useFeature({moderation: booleansetModeration: (moderation: boolean) => void}) {- const [tempshowOpeningStatement, setTempShowOpeningStatement] = React.useState(!!introduction)+ const [tempShowOpeningStatement, setTempShowOpeningStatement] = React.useState(!!introduction)useEffect(() => {// wait to api data backif (introduction)@@ -48,7 +48,7 @@ function useFeature({// }, [moreLikeThis])const featureConfig = {- openingStatement: tempshowOpeningStatement,+ openingStatement: tempShowOpeningStatement,moreLikeThis,suggestedQuestionsAfterAnswer,speechToText,diff --git a/web/app/components/app/configuration/config/index.tsx b/web/app/components/app/configuration/config/index.tsxindex b8bedba20ba..12551f508eb 100644--- a/web/app/components/app/configuration/config/index.tsx+++ b/web/app/components/app/configuration/config/index.tsx@@ -7,9 +7,9 @@ import { useBoolean, useScroll } from 'ahooks'import { useFormattingChangedDispatcher } from '../debug/hooks'import DatasetConfig from '../dataset-config'import ChatGroup from '../features/chat-group'-import ExperienceEnchanceGroup from '../features/experience-enchance-group'+import ExperienceEnhanceGroup from '../features/experience-enhance-group'import Toolbox from '../toolbox'-import HistoryPanel from '../config-prompt/conversation-histroy/history-panel'+import HistoryPanel from '../config-prompt/conversation-history/history-panel'import ConfigVision from '../config-vision'import useAnnotationConfig from '../toolbox/annotation/use-annotation-config'import AddFeatureBtn from './feature/add-feature-btn'@@ -254,7 +254,7 @@ const Config: FC = () => {/>)}- {/* ChatConifig */}+ {/* ChatConfig */}{hasChatConfig && (<ChatGroup@@ -277,7 +277,7 @@ const Config: FC = () => {{/* Text Generation config */}{hasCompletionConfig && (- <ExperienceEnchanceGroup+ <ExperienceEnhanceGroupisShowMoreLike={moreLikeThisConfig.enabled}isShowTextToSpeech={featureConfig.textToSpeech && !!text2speechDefaultModel}/>diff --git a/web/app/components/app/configuration/dataset-config/params-config/index.tsx b/web/app/components/app/configuration/dataset-config/params-config/index.tsxindex 5cb76e32b21..656cbfea656 100644--- a/web/app/components/app/configuration/dataset-config/params-config/index.tsx+++ b/web/app/components/app/configuration/dataset-config/params-config/index.tsx@@ -70,13 +70,13 @@ const ParamsConfig = ({const {defaultModel: rerankDefaultModel,- currentModel: isRerankDefaultModelVaild,+ currentModel: isRerankDefaultModelValid,} = useModelListAndDefaultModelAndCurrentProviderAndModel(ModelTypeEnum.rerank)const isValid = () => {let errMsg = ''if (tempDataSetConfigs.retrieval_model === RETRIEVE_TYPE.multiWay) {- if (!tempDataSetConfigs.reranking_model?.reranking_model_name && (!rerankDefaultModel && isRerankDefaultModelVaild))+ if (!tempDataSetConfigs.reranking_model?.reranking_model_name && (!rerankDefaultModel && isRerankDefaultModelValid))errMsg = t('appDebug.datasetConfig.rerankModelRequired')}if (errMsg) {diff --git a/web/app/components/app/configuration/dataset-config/select-dataset/index.tsx b/web/app/components/app/configuration/dataset-config/select-dataset/index.tsxindex f9117a51c38..4493755ba01 100644--- a/web/app/components/app/configuration/dataset-config/select-dataset/index.tsx+++ b/web/app/components/app/configuration/dataset-config/select-dataset/index.tsx@@ -135,7 +135,7 @@ const SelectDataSet: FC<ISelectDataSetProps> = ({</div><div className={cn('max-w-[200px] text-[13px] font-medium text-gray-800 overflow-hidden text-ellipsis whitespace-nowrap', !item.embedding_available && 'opacity-50 !max-w-[120px]')}>{item.name}</div>{!item.embedding_available && (- <span className='ml-1 shrink-0 px-1 border boder-gray-200 rounded-md text-gray-500 text-xs font-normal leading-[18px]'>{t('dataset.unavailable')}</span>+ <span className='ml-1 shrink-0 px-1 border border-gray-200 rounded-md text-gray-500 text-xs font-normal leading-[18px]'>{t('dataset.unavailable')}</span>)}</div>{diff --git a/web/app/components/app/configuration/dataset-config/settings-modal/index.tsx b/web/app/components/app/configuration/dataset-config/settings-modal/index.tsxindex eec5979dd51..65858ce8cfd 100644--- a/web/app/components/app/configuration/dataset-config/settings-modal/index.tsx+++ b/web/app/components/app/configuration/dataset-config/settings-modal/index.tsx@@ -51,7 +51,7 @@ const SettingsModal: FC<SettingsModalProps> = ({const {modelList: rerankModelList,defaultModel: rerankDefaultModel,- currentModel: isRerankDefaultModelVaild,+ currentModel: isRerankDefaultModelValid,} = useModelListAndDefaultModelAndCurrentProviderAndModel(ModelTypeEnum.rerank)const { t } = useTranslation()const { notify } = useToastContext()@@ -83,7 +83,7 @@ const SettingsModal: FC<SettingsModalProps> = ({if (!isReRankModelSelected({rerankDefaultModel,- isRerankDefaultModelVaild: !!isRerankDefaultModelVaild,+ isRerankDefaultModelValid: !!isRerankDefaultModelValid,rerankModelList,retrievalConfig,indexMethod,diff --git a/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsx b/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsxindex e79cdf47939..d4a15603246 100644--- a/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsx+++ b/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsx@@ -89,7 +89,7 @@ const ChatItem: FC<ChatItemProps> = ({`apps/${appId}/chat-messages`,data,{- onGetConvesationMessages: (conversationId, getAbortController) => fetchConversationMessages(appId, conversationId, getAbortController),+ onGetConversationMessages: (conversationId, getAbortController) => fetchConversationMessages(appId, conversationId, getAbortController),onGetSuggestedQuestions: (responseItemId, getAbortController) => fetchSuggestedQuestions(appId, responseItemId, getAbortController),},)diff --git a/web/app/components/app/configuration/debug/debug-with-single-model/index.tsx b/web/app/components/app/configuration/debug/debug-with-single-model/index.tsxindex ea15c1a4ce6..0f09a232425 100644--- a/web/app/components/app/configuration/debug/debug-with-single-model/index.tsx+++ b/web/app/components/app/configuration/debug/debug-with-single-model/index.tsx@@ -94,7 +94,7 @@ const DebugWithSingleModel = forwardRef<DebugWithSingleModelRefType, DebugWithSi`apps/${appId}/chat-messages`,data,{- onGetConvesationMessages: (conversationId, getAbortController) => fetchConversationMessages(appId, conversationId, getAbortController),+ onGetConversationMessages: (conversationId, getAbortController) => fetchConversationMessages(appId, conversationId, getAbortController),onGetSuggestedQuestions: (responseItemId, getAbortController) => fetchSuggestedQuestions(appId, responseItemId, getAbortController),},)diff --git a/web/app/components/app/configuration/features/chat-group/opening-statement/index.tsx b/web/app/components/app/configuration/features/chat-group/opening-statement/index.tsxindex c6e934c6836..e652579cfcb 100644--- a/web/app/components/app/configuration/features/chat-group/opening-statement/index.tsx+++ b/web/app/components/app/configuration/features/chat-group/opening-statement/index.tsx@@ -287,7 +287,7 @@ const OpeningStatement: FC<IOpeningStatementProps> = ({{isShowConfirmAddVar && (<ConfirmAddVarvarNameArr={notIncludeKeys}- onConfrim={autoAddVar}+ onConfirm={autoAddVar}onCancel={cancelAutoAddVar}onHide={hideConfirmAddVar}/>diff --git a/web/app/components/app/configuration/features/experience-enchance-group/index.tsx b/web/app/components/app/configuration/features/experience-enhance-group/index.tsxsimilarity index 88%rename from web/app/components/app/configuration/features/experience-enchance-group/index.tsxrename to web/app/components/app/configuration/features/experience-enhance-group/index.tsxindex 6902a17468c..4a629a6b0e4 100644--- a/web/app/components/app/configuration/features/experience-enchance-group/index.tsx+++ b/web/app/components/app/configuration/features/experience-enhance-group/index.tsx@@ -16,7 +16,7 @@ type ExperienceGroupProps = {isShowMoreLike: boolean}-const ExperienceEnchanceGroup: FC<ExperienceGroupProps> = ({+const ExperienceEnhanceGroup: FC<ExperienceGroupProps> = ({isShowTextToSpeech,isShowMoreLike,}) => {@@ -40,4 +40,4 @@ const ExperienceEnchanceGroup: FC<ExperienceGroupProps> = ({</div>)}-export default React.memo(ExperienceEnchanceGroup)+export default React.memo(ExperienceEnhanceGroup)diff --git a/web/app/components/app/configuration/features/experience-enchance-group/more-like-this/index.tsx b/web/app/components/app/configuration/features/experience-enhance-group/more-like-this/index.tsxsimilarity index 100%rename from web/app/components/app/configuration/features/experience-enchance-group/more-like-this/index.tsxrename to web/app/components/app/configuration/features/experience-enhance-group/more-like-this/index.tsxdiff --git a/web/app/components/app/configuration/index.tsx b/web/app/components/app/configuration/index.tsxindex 432accb0d21..357dc84b7a4 100644--- a/web/app/components/app/configuration/index.tsx+++ b/web/app/components/app/configuration/index.tsx@@ -14,7 +14,7 @@ import Loading from '../../base/loading'import AppPublisher from '../app-publisher'import AgentSettingButton from './config/agent-setting-button'import useAdvancedPromptConfig from './hooks/use-advanced-prompt-config'-import EditHistoryModal from './config-prompt/conversation-histroy/edit-modal'+import EditHistoryModal from './config-prompt/conversation-history/edit-modal'import {useDebugWithSingleOrMultipleModel,useFormattingChangedDispatcher,diff --git a/web/app/components/app/configuration/toolbox/moderation/moderation-setting-modal.tsx b/web/app/components/app/configuration/toolbox/moderation/moderation-setting-modal.tsxindex 64b2dd222a8..589eb42ab33 100644--- a/web/app/components/app/configuration/toolbox/moderation/moderation-setting-modal.tsx+++ b/web/app/components/app/configuration/toolbox/moderation/moderation-setting-modal.tsx@@ -64,7 +64,7 @@ const ModerationSettingModal: FC<ModerationSettingModalProps> = ({const systemOpenaiProviderQuota = systemOpenaiProviderEnabled ? openaiProvider?.system_configuration.quota_configurations.find(item => item.quota_type === openaiProvider.system_configuration.current_quota_type) : undefinedconst systemOpenaiProviderCanUse = systemOpenaiProviderQuota?.is_validconst customOpenaiProvidersCanUse = openaiProvider?.custom_configuration.status === CustomConfigurationStatusEnum.active- const openaiProviderConfiged = customOpenaiProvidersCanUse || systemOpenaiProviderCanUse+ const isOpenAIProviderConfigured = customOpenaiProvidersCanUse || systemOpenaiProviderCanUseconst providers: Provider[] = [{key: 'openai_moderation',@@ -190,7 +190,7 @@ const ModerationSettingModal: FC<ModerationSettingModalProps> = ({}const handleSave = () => {- if (localeData.type === 'openai_moderation' && !openaiProviderConfiged)+ if (localeData.type === 'openai_moderation' && !isOpenAIProviderConfigured)returnif (!localeData.config?.inputs_config?.enabled && !localeData.config?.outputs_config?.enabled) {@@ -254,7 +254,7 @@ const ModerationSettingModal: FC<ModerationSettingModalProps> = ({className={`flex items-center px-3 py-2 rounded-lg text-sm text-gray-900 cursor-pointer${localeData.type === provider.key ? 'bg-white border-[1.5px] border-primary-400 shadow-sm' : 'border border-gray-100 bg-gray-25'}- ${localeData.type === 'openai_moderation' && provider.key === 'openai_moderation' && !openaiProviderConfiged && 'opacity-50'}+ ${localeData.type === 'openai_moderation' && provider.key === 'openai_moderation' && !isOpenAIProviderConfigured && 'opacity-50'}`}onClick={() => handleDataTypeChange(provider.key)}>@@ -267,7 +267,7 @@ const ModerationSettingModal: FC<ModerationSettingModalProps> = ({}</div>{- !isLoading && !openaiProviderConfiged && localeData.type === 'openai_moderation' && (+ !isLoading && !isOpenAIProviderConfigured && localeData.type === 'openai_moderation' && (<div className='flex items-center mt-2 px-3 py-2 bg-[#FFFAEB] rounded-lg border border-[#FEF0C7]'><InfoCircle className='mr-1 w-4 h-4 text-[#F79009]' /><div className='flex items-center text-xs font-medium text-gray-700'>@@ -361,7 +361,7 @@ const ModerationSettingModal: FC<ModerationSettingModalProps> = ({<Buttonvariant='primary'onClick={handleSave}- disabled={localeData.type === 'openai_moderation' && !openaiProviderConfiged}+ disabled={localeData.type === 'openai_moderation' && !isOpenAIProviderConfigured}>{t('common.operation.save')}</Button>diff --git a/web/app/components/app/configuration/tools/external-data-tool-modal.tsx b/web/app/components/app/configuration/tools/external-data-tool-modal.tsxindex fea1b9c91e6..2785f435e40 100644--- a/web/app/components/app/configuration/tools/external-data-tool-modal.tsx+++ b/web/app/components/app/configuration/tools/external-data-tool-modal.tsx@@ -172,12 +172,12 @@ const ExternalDataToolModal: FC<ExternalDataToolModalProps> = ({}}- const formatedData = formatData(localeData)+ const formattedData = formatData(localeData)- if (onValidateBeforeSave && !onValidateBeforeSave(formatedData))+ if (onValidateBeforeSave && !onValidateBeforeSave(formattedData))return- onSave(formatData(formatedData))+ onSave(formatData(formattedData))}const action = data.type ? t('common.operation.edit') : t('common.operation.add')diff --git a/web/app/components/app/create-app-modal/index.tsx b/web/app/components/app/create-app-modal/index.tsxindex 5fb0d7ef3fa..d503e71918f 100644--- a/web/app/components/app/create-app-modal/index.tsx+++ b/web/app/components/app/create-app-modal/index.tsx@@ -21,7 +21,7 @@ import Modal from '@/app/components/base/modal'import Button from '@/app/components/base/button'import AppIcon from '@/app/components/base/app-icon'import AppsFull from '@/app/components/billing/apps-full-in-dialog'-import { AiText, ChatBot, CuteRobote } from '@/app/components/base/icons/src/vender/solid/communication'+import { AiText, ChatBot, CuteRobot } from '@/app/components/base/icons/src/vender/solid/communication'import { Route } from '@/app/components/base/icons/src/vender/solid/mapsAndTravel'import Tooltip from '@/app/components/base/tooltip'import { NEED_REFRESH_APP_LIST_KEY } from '@/config'@@ -158,7 +158,7 @@ const CreateAppModal = ({ show, onSuccess, onClose }: CreateAppDialogProps) => {setShowChatBotType(false)}}>- <CuteRobote className='w-6 h-6 text-indigo-600' />+ <CuteRobot className='w-6 h-6 text-indigo-600' /><div className='h-5 text-[13px] font-medium leading-[18px]'>{t('app.types.agent')}</div></div></Tooltip>diff --git a/web/app/components/app/log/index.tsx b/web/app/components/app/log/index.tsxindex dd6ebd08f02..77fcb6fcf94 100644--- a/web/app/components/app/log/index.tsx+++ b/web/app/components/app/log/index.tsx@@ -119,8 +119,8 @@ const Logs: FC<ILogsProps> = ({ appDetail }) => {middlePagesSiblingCount={1}setCurrentPage={setCurrPage}totalPages={Math.ceil(total / APP_PAGE_LIMIT)}- truncableClassName="w-8 px-0.5 text-center"- truncableText="..."+ truncatableClassName="w-8 px-0.5 text-center"+ truncatableText="..."><Pagination.PrevButtondisabled={currPage === 0}diff --git a/web/app/components/app/log/list.tsx b/web/app/components/app/log/list.tsxindex 0bc118c46fd..18e46ef53b3 100644--- a/web/app/components/app/log/list.tsx+++ b/web/app/components/app/log/list.tsx@@ -19,7 +19,7 @@ import { useTranslation } from 'react-i18next'import s from './style.module.css'import VarPanel from './var-panel'import cn from '@/utils/classnames'-import type { FeedbackFunc, Feedbacktype, IChatItem, SubmitAnnotationFunc } from '@/app/components/base/chat/chat/type'+import type { FeedbackFunc, FeedbackType, IChatItem, SubmitAnnotationFunc } from '@/app/components/base/chat/chat/type'import type { Annotation, ChatConversationFullDetailResponse, ChatConversationGeneralDetail, ChatConversationsResponse, ChatMessage, ChatMessagesRequest, CompletionConversationFullDetailResponse, CompletionConversationGeneralDetail, CompletionConversationsResponse, LogAnnotation } from '@/models/log'import type { App } from '@/types/app'import Loading from '@/app/components/base/loading'@@ -541,7 +541,7 @@ const CompletionConversationDetailComp: FC<{ appId?: string; conversationId?: stconst { notify } = useContext(ToastContext)const { t } = useTranslation()- const handleFeedback = async (mid: string, { rating }: Feedbacktype): Promise<boolean> => {+ const handleFeedback = async (mid: string, { rating }: FeedbackType): Promise<boolean> => {try {await updateLogMessageFeedbacks({ url: `/apps/${appId}/feedbacks`, body: { message_id: mid, rating } })conversationDetailMutate()@@ -586,7 +586,7 @@ const ChatConversationDetailComp: FC<{ appId?: string; conversationId?: string }const { notify } = useContext(ToastContext)const { t } = useTranslation()- const handleFeedback = async (mid: string, { rating }: Feedbacktype): Promise<boolean> => {+ const handleFeedback = async (mid: string, { rating }: FeedbackType): Promise<boolean> => {try {await updateLogMessageFeedbacks({ url: `/apps/${appId}/feedbacks`, body: { message_id: mid, rating } })notify({ type: 'success', message: t('common.actionMsg.modifiedSuccessfully') })diff --git a/web/app/components/app/text-generate/item/index.tsx b/web/app/components/app/text-generate/item/index.tsxindex 9794967d9d1..e3bd8eadc53 100644--- a/web/app/components/app/text-generate/item/index.tsx+++ b/web/app/components/app/text-generate/item/index.tsx@@ -16,13 +16,13 @@ import { Markdown } from '@/app/components/base/markdown'import Loading from '@/app/components/base/loading'import Toast from '@/app/components/base/toast'import AudioBtn from '@/app/components/base/audio-btn'-import type { Feedbacktype } from '@/app/components/base/chat/chat/type'+import type { FeedbackType } from '@/app/components/base/chat/chat/type'import { fetchMoreLikeThis, updateFeedback } from '@/service/share'import { File02 } from '@/app/components/base/icons/src/vender/line/files'import { Bookmark } from '@/app/components/base/icons/src/vender/line/general'import { Stars02 } from '@/app/components/base/icons/src/vender/line/weather'import { RefreshCcw01 } from '@/app/components/base/icons/src/vender/line/arrows'-import { fetchTextGenerationMessge } from '@/service/debug'+import { fetchTextGenerationMessage } from '@/service/debug'import AnnotationCtrlBtn from '@/app/components/app/configuration/toolbox/annotation/annotation-ctrl-btn'import EditReplyModal from '@/app/components/app/annotation/edit-annotation-modal'import { useStore as useAppStore } from '@/app/components/app/store'@@ -47,8 +47,8 @@ export type IGenerationItemProps = {isInWebApp?: booleanmoreLikeThis?: booleandepth?: number- feedback?: Feedbacktype- onFeedback?: (feedback: Feedbacktype) => void+ feedback?: FeedbackType+ onFeedback?: (feedback: FeedbackType) => voidonSave?: (messageId: string) => voidisMobile?: booleanisInstalledApp: boolean@@ -125,7 +125,7 @@ const GenerationItem: FC<IGenerationItemProps> = ({const [completionRes, setCompletionRes] = useState('')const [childMessageId, setChildMessageId] = useState<string | null>(null)const hasChild = !!childMessageId- const [childFeedback, setChildFeedback] = useState<Feedbacktype>({+ const [childFeedback, setChildFeedback] = useState<FeedbackType>({rating: null,})const {@@ -135,7 +135,7 @@ const GenerationItem: FC<IGenerationItemProps> = ({const setCurrentLogItem = useAppStore(s => s.setCurrentLogItem)const setShowPromptLogModal = useAppStore(s => s.setShowPromptLogModal)- const handleFeedback = async (childFeedback: Feedbacktype) => {+ const handleFeedback = async (childFeedback: FeedbackType) => {await updateFeedback({ url: `/messages/${childMessageId}/feedbacks`, body: { rating: childFeedback.rating } }, isInstalledApp, installedAppId)setChildFeedback(childFeedback)}@@ -205,7 +205,7 @@ const GenerationItem: FC<IGenerationItemProps> = ({}, [isLoading])const handleOpenLogModal = async () => {- const data = await fetchTextGenerationMessge({+ const data = await fetchTextGenerationMessage({appId: params.appId as string,messageId: messageId!,})diff --git a/web/app/components/app/type-selector/index.tsx b/web/app/components/app/type-selector/index.tsxindex 2bd4f8d0822..a09e189f502 100644--- a/web/app/components/app/type-selector/index.tsx+++ b/web/app/components/app/type-selector/index.tsx@@ -9,7 +9,7 @@ import {} from '@/app/components/base/portal-to-follow-elem'import { Check, DotsGrid } from '@/app/components/base/icons/src/vender/line/general'import { XCircle } from '@/app/components/base/icons/src/vender/solid/general'-import { ChatBot, CuteRobote } from '@/app/components/base/icons/src/vender/solid/communication'+import { ChatBot, CuteRobot } from '@/app/components/base/icons/src/vender/solid/communication'import { Route } from '@/app/components/base/icons/src/vender/solid/mapsAndTravel'export type AppSelectorProps = {value: string@@ -65,7 +65,7 @@ const AppTypeSelector = ({ value, onChange }: AppSelectorProps) => {{value === 'agent' && (<><div className='w-4 h-4 p-[1px]'>- <CuteRobote className='w-3.5 h-3.5 text-indigo-600' />+ <CuteRobot className='w-3.5 h-3.5 text-indigo-600' /></div><div className=''>{t('app.typeSelector.agent')}</div><div className='w-4 h-4 p-[1px]' onClick={(e) => {@@ -106,7 +106,7 @@ const AppTypeSelector = ({ value, onChange }: AppSelectorProps) => {onChange('agent')setOpen(false)}}>- <CuteRobote className='mr-2 w-4 h-4 text-indigo-600' />+ <CuteRobot className='mr-2 w-4 h-4 text-indigo-600' /><div className='grow text-gray-700 text-[13px] font-medium leading-[18px]'>{t('app.typeSelector.agent')}</div>{value === 'agent' && <Check className='w-4 h-4 text-primary-600' />}</div>diff --git a/web/app/components/app/workflow-log/index.tsx b/web/app/components/app/workflow-log/index.tsxindex 303c2069b2f..b7e20f0a0b5 100644--- a/web/app/components/app/workflow-log/index.tsx+++ b/web/app/components/app/workflow-log/index.tsx@@ -93,8 +93,8 @@ const Logs: FC<ILogsProps> = ({ appDetail }) => {middlePagesSiblingCount={1}setCurrentPage={setCurrPage}totalPages={Math.ceil(total / APP_PAGE_LIMIT)}- truncableClassName="w-8 px-0.5 text-center"- truncableText="..."+ truncatableClassName="w-8 px-0.5 text-center"+ truncatableText="..."><Pagination.PrevButtondisabled={currPage === 0}diff --git a/web/app/components/base/agent-log-modal/detail.tsx b/web/app/components/base/agent-log-modal/detail.tsxindex 5b34d2e464c..e90f593ad00 100644--- a/web/app/components/base/agent-log-modal/detail.tsx+++ b/web/app/components/base/agent-log-modal/detail.tsx@@ -97,7 +97,7 @@ const AgentLogDetail: FC<AgentLogDetailProps> = ({onClick={() => switchTab('TRACING')}>{t('runLog.tracing')}</div></div>- {/* panel detal */}+ {/* panel detail */}<div className={cn('grow bg-white h-0 overflow-y-auto rounded-b-2xl', currentTab !== 'DETAIL' && '!bg-gray-50')}>{loading && (<div className='flex h-full items-center justify-center bg-white'>diff --git a/web/app/components/base/block-input/index.tsx b/web/app/components/base/block-input/index.tsxindex 79ff646bd12..43c14de4c98 100644--- a/web/app/components/base/block-input/index.tsx+++ b/web/app/components/base/block-input/index.tsx@@ -53,7 +53,7 @@ const BlockInput: FC<IBlockInputProps> = ({const [isEditing, setIsEditing] = useState<boolean>(false)useEffect(() => {if (isEditing && contentEditableRef.current) {- // TODO: Focus at the click positon+ // TODO: Focus at the click positionif (currentValue)contentEditableRef.current.setSelectionRange(currentValue.length, currentValue.length)@@ -119,7 +119,7 @@ const BlockInput: FC<IBlockInputProps> = ({onBlur={() => {blur()setIsEditing(false)- // click confirm also make blur. Then outter value is change. So below code has problem.+ // click confirm also make blur. Then outer value is change. So below code has problem.// setTimeout(() => {// handleCancel()// }, 1000)diff --git a/web/app/components/base/chat/chat-with-history/hooks.tsx b/web/app/components/base/chat/chat-with-history/hooks.tsxindex fe952efc275..1e05cc39ef5 100644--- a/web/app/components/base/chat/chat-with-history/hooks.tsx+++ b/web/app/components/base/chat/chat-with-history/hooks.tsx@@ -217,12 +217,12 @@ export const useChatWithHistory = (installedAppInfo?: InstalledApp) => {}, [newConversation])const currentConversationItem = useMemo(() => {- let coversationItem = conversationList.find(item => item.id === currentConversationId)+ let conversationItem = conversationList.find(item => item.id === currentConversationId)- if (!coversationItem && pinnedConversationList.length)- coversationItem = pinnedConversationList.find(item => item.id === currentConversationId)+ if (!conversationItem && pinnedConversationList.length)+ conversationItem = pinnedConversationList.find(item => item.id === currentConversationId)- return coversationItem+ return conversationItem}, [conversationList, currentConversationId, pinnedConversationList])const { notify } = useToastContext()diff --git a/web/app/components/base/chat/chat/citation/index.tsx b/web/app/components/base/chat/chat/citation/index.tsxindex 4bed9638d36..2ca7b80ae7b 100644--- a/web/app/components/base/chat/chat/citation/index.tsx+++ b/web/app/components/base/chat/chat/citation/index.tsx@@ -24,7 +24,7 @@ const Citation: FC<CitationProps> = ({}) => {const { t } = useTranslation()const elesRef = useRef<HTMLDivElement[]>([])- const [limitNumberInOneLine, setlimitNumberInOneLine] = useState(0)+ const [limitNumberInOneLine, setLimitNumberInOneLine] = useState(0)const [showMore, setShowMore] = useState(false)const resources = useMemo(() => data.reduce((prev: Resources[], next) => {const documentId = next.document_id@@ -57,14 +57,14 @@ const Citation: FC<CitationProps> = ({totalWidth -= elesRef.current[i].clientWidthif (totalWidth + 34 > containerWidth!)- setlimitNumberInOneLine(i - 1)+ setLimitNumberInOneLine(i - 1)else- setlimitNumberInOneLine(i)+ setLimitNumberInOneLine(i)break}else {- setlimitNumberInOneLine(i + 1)+ setLimitNumberInOneLine(i + 1)}}}diff --git a/web/app/components/base/chat/chat/hooks.ts b/web/app/components/base/chat/chat/hooks.tsindex 4caa8116df3..e6638b8eeda 100644--- a/web/app/components/base/chat/chat/hooks.ts+++ b/web/app/components/base/chat/chat/hooks.ts@@ -26,7 +26,7 @@ import { AudioPlayerManager } from '@/app/components/base/audio-btn/audio.playertype GetAbortController = (abortController: AbortController) => voidtype SendCallback = {- onGetConvesationMessages?: (conversationId: string, getAbortController: GetAbortController) => Promise<any>+ onGetConversationMessages?: (conversationId: string, getAbortController: GetAbortController) => Promise<any>onGetSuggestedQuestions?: (responseItemId: string, getAbortController: GetAbortController) => Promise<any>onConversationComplete?: (conversationId: string) => voidisPublicAPI?: boolean@@ -198,7 +198,7 @@ export const useChat = (url: string,data: any,{- onGetConvesationMessages,+ onGetConversationMessages,onGetSuggestedQuestions,onConversationComplete,isPublicAPI,@@ -324,8 +324,8 @@ export const useChat = (if (onConversationComplete)onConversationComplete(conversationId.current)- if (conversationId.current && !hasStopResponded.current && onGetConvesationMessages) {- const { data }: any = await onGetConvesationMessages(+ if (conversationId.current && !hasStopResponded.current && onGetConversationMessages) {+ const { data }: any = await onGetConversationMessages(conversationId.current,newAbortController => conversationMessagesAbortControllerRef.current = newAbortController,)diff --git a/web/app/components/base/chat/chat/index.tsx b/web/app/components/base/chat/chat/index.tsxindex b3eebb95839..7540cd873b9 100644--- a/web/app/components/base/chat/chat/index.tsx+++ b/web/app/components/base/chat/chat/index.tsx@@ -106,7 +106,7 @@ const Chat: FC<ChatProps> = ({const chatFooterInnerRef = useRef<HTMLDivElement>(null)const userScrolledRef = useRef(false)- const handleScrolltoBottom = useCallback(() => {+ const handleScrollToBottom = useCallback(() => {if (chatContainerRef.current && !userScrolledRef.current)chatContainerRef.current.scrollTop = chatContainerRef.current.scrollHeight}, [])@@ -123,14 +123,14 @@ const Chat: FC<ChatProps> = ({}, [])useEffect(() => {- handleScrolltoBottom()+ handleScrollToBottom()handleWindowResize()- }, [handleScrolltoBottom, handleWindowResize])+ }, [handleScrollToBottom, handleWindowResize])useEffect(() => {if (chatContainerRef.current) {requestAnimationFrame(() => {- handleScrolltoBottom()+ handleScrollToBottom()handleWindowResize()})}@@ -148,7 +148,7 @@ const Chat: FC<ChatProps> = ({const { blockSize } = entry.borderBoxSize[0]chatContainerRef.current!.style.paddingBottom = `${blockSize}px`- handleScrolltoBottom()+ handleScrollToBottom()}})@@ -158,7 +158,7 @@ const Chat: FC<ChatProps> = ({resizeObserver.disconnect()}}- }, [handleScrolltoBottom])+ }, [handleScrollToBottom])useEffect(() => {const chatContainer = chatContainerRef.currentdiff --git a/web/app/components/base/chat/chat/loading-anim/index.tsx b/web/app/components/base/chat/chat/loading-anim/index.tsxindex 09f8a54789e..dd43ef9c147 100644--- a/web/app/components/base/chat/chat/loading-anim/index.tsx+++ b/web/app/components/base/chat/chat/loading-anim/index.tsx@@ -3,15 +3,15 @@ import type { FC } from 'react'import React from 'react'import s from './style.module.css'-export type ILoaidingAnimProps = {+export type ILoadingAnimProps = {type: 'text' | 'avatar'}-const LoaidingAnim: FC<ILoaidingAnimProps> = ({+const LoadingAnim: FC<ILoadingAnimProps> = ({type,}) => {return (<div className={`${s['dot-flashing']} ${s[type]}`}></div>)}-export default React.memo(LoaidingAnim)+export default React.memo(LoadingAnim)diff --git a/web/app/components/base/chat/chat/type.ts b/web/app/components/base/chat/chat/type.tsindex 16ccff4d4d2..b2cb18011c6 100644--- a/web/app/components/base/chat/chat/type.ts+++ b/web/app/components/base/chat/chat/type.ts@@ -8,14 +8,14 @@ export type MessageMore = {latency: number | string}-export type Feedbacktype = {+export type FeedbackType = {rating: MessageRatingcontent?: string | null}export type FeedbackFunc = (messageId: string,- feedback: Feedbacktype+ feedback: FeedbackType) => Promise<any>export type SubmitAnnotationFunc = (messageId: string,@@ -71,11 +71,11 @@ export type IChatItem = {/*** The user feedback result of this message*/- feedback?: Feedbacktype+ feedback?: FeedbackType/*** The admin feedback result of this message*/- adminFeedback?: Feedbacktype+ adminFeedback?: FeedbackType/*** Whether to hide the feedback area*/diff --git a/web/app/components/base/chat/embedded-chatbot/chat-wrapper.tsx b/web/app/components/base/chat/embedded-chatbot/chat-wrapper.tsxindex e317b67edb4..48ee4110584 100644--- a/web/app/components/base/chat/embedded-chatbot/chat-wrapper.tsx+++ b/web/app/components/base/chat/embedded-chatbot/chat-wrapper.tsx@@ -14,7 +14,7 @@ import {getUrl,stopChatMessageResponding,} from '@/service/share'-import LogoAvatar from '@/app/components/base/logo/logo-embeded-chat-avatar'+import LogoAvatar from '@/app/components/base/logo/logo-embedded-chat-avatar'import AnswerIcon from '@/app/components/base/answer-icon'const ChatWrapper = () => {diff --git a/web/app/components/base/chat/embedded-chatbot/index.tsx b/web/app/components/base/chat/embedded-chatbot/index.tsxindex 480adaae2de..407c0de6d81 100644--- a/web/app/components/base/chat/embedded-chatbot/index.tsx+++ b/web/app/components/base/chat/embedded-chatbot/index.tsx@@ -17,7 +17,7 @@ import { checkOrSetAccessToken } from '@/app/components/share/utils'import AppUnavailable from '@/app/components/base/app-unavailable'import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'import Loading from '@/app/components/base/loading'-import LogoHeader from '@/app/components/base/logo/logo-embeded-chat-header'+import LogoHeader from '@/app/components/base/logo/logo-embedded-chat-header'import Header from '@/app/components/base/chat/embedded-chatbot/header'import ConfigPanel from '@/app/components/base/chat/embedded-chatbot/config-panel'import ChatWrapper from '@/app/components/base/chat/embedded-chatbot/chat-wrapper'diff --git a/web/app/components/base/chat/types.ts b/web/app/components/base/chat/types.tsindex baffe42843f..21277fec570 100644--- a/web/app/components/base/chat/types.ts+++ b/web/app/components/base/chat/types.ts@@ -22,7 +22,7 @@ export type UserInputForm = {}export type UserInputFormTextInput = {- 'text-inpput': UserInputForm & {+ 'text-input': UserInputForm & {max_length: number}}diff --git a/web/app/components/base/features/feature-panel/moderation/moderation-setting-modal.tsx b/web/app/components/base/features/feature-panel/moderation/moderation-setting-modal.tsxindex 9acc51b5f3d..635506c053a 100644--- a/web/app/components/base/features/feature-panel/moderation/moderation-setting-modal.tsx+++ b/web/app/components/base/features/feature-panel/moderation/moderation-setting-modal.tsx@@ -67,7 +67,7 @@ const ModerationSettingModal: FC<ModerationSettingModalProps> = ({const systemOpenaiProviderQuota = systemOpenaiProviderEnabled ? openaiProvider?.system_configuration.quota_configurations.find(item => item.quota_type === openaiProvider.system_configuration.current_quota_type) : undefinedconst systemOpenaiProviderCanUse = systemOpenaiProviderQuota?.is_validconst customOpenaiProvidersCanUse = openaiProvider?.custom_configuration.status === CustomConfigurationStatusEnum.active- const openaiProviderConfiged = customOpenaiProvidersCanUse || systemOpenaiProviderCanUse+ const isOpenAIProviderConfigured = customOpenaiProvidersCanUse || systemOpenaiProviderCanUseconst providers: Provider[] = [{key: 'openai_moderation',@@ -193,7 +193,7 @@ const ModerationSettingModal: FC<ModerationSettingModalProps> = ({}const handleSave = () => {- if (localeData.type === 'openai_moderation' && !openaiProviderConfiged)+ if (localeData.type === 'openai_moderation' && !isOpenAIProviderConfigured)returnif (!localeData.config?.inputs_config?.enabled && !localeData.config?.outputs_config?.enabled) {@@ -257,7 +257,7 @@ const ModerationSettingModal: FC<ModerationSettingModalProps> = ({className={`flex items-center px-3 py-2 rounded-lg text-sm text-gray-900 cursor-pointer${localeData.type === provider.key ? 'bg-white border-[1.5px] border-primary-400 shadow-sm' : 'border border-gray-100 bg-gray-25'}- ${localeData.type === 'openai_moderation' && provider.key === 'openai_moderation' && !openaiProviderConfiged && 'opacity-50'}+ ${localeData.type === 'openai_moderation' && provider.key === 'openai_moderation' && !isOpenAIProviderConfigured && 'opacity-50'}`}onClick={() => handleDataTypeChange(provider.key)}>@@ -270,7 +270,7 @@ const ModerationSettingModal: FC<ModerationSettingModalProps> = ({}</div>{- !isLoading && !openaiProviderConfiged && localeData.type === 'openai_moderation' && (+ !isLoading && !isOpenAIProviderConfigured && localeData.type === 'openai_moderation' && (<div className='flex items-center mt-2 px-3 py-2 bg-[#FFFAEB] rounded-lg border border-[#FEF0C7]'><InfoCircle className='mr-1 w-4 h-4 text-[#F79009]' /><div className='flex items-center text-xs font-medium text-gray-700'>@@ -364,7 +364,7 @@ const ModerationSettingModal: FC<ModerationSettingModalProps> = ({<Buttonvariant='primary'onClick={handleSave}- disabled={localeData.type === 'openai_moderation' && !openaiProviderConfiged}+ disabled={localeData.type === 'openai_moderation' && !isOpenAIProviderConfigured}>{t('common.operation.save')}</Button>diff --git a/web/app/components/base/features/feature-panel/opening-statement/index.tsx b/web/app/components/base/features/feature-panel/opening-statement/index.tsxindex 4d9350e0adc..b039165c9ef 100644--- a/web/app/components/base/features/feature-panel/opening-statement/index.tsx+++ b/web/app/components/base/features/feature-panel/opening-statement/index.tsx@@ -308,7 +308,7 @@ const OpeningStatement: FC<OpeningStatementProps> = ({{isShowConfirmAddVar && (<ConfirmAddVarvarNameArr={notIncludeKeys}- onConfrim={autoAddVar}+ onConfirm={autoAddVar}onCancel={cancelAutoAddVar}onHide={hideConfirmAddVar}/>diff --git a/web/app/components/base/file-icon/index.tsx b/web/app/components/base/file-icon/index.tsxindex 874637ca7a9..21e48b3dd41 100644--- a/web/app/components/base/file-icon/index.tsx+++ b/web/app/components/base/file-icon/index.tsx@@ -8,7 +8,7 @@ import {Md,Pdf,Txt,- Unknow,+ Unknown,Xlsx,} from '@/app/components/base/icons/src/public/files'import { Notion } from '@/app/components/base/icons/src/public/common'@@ -47,7 +47,7 @@ const FileIcon: FC<FileIconProps> = ({case 'notion':return <Notion className={className} />default:- return <Unknow className={className} />+ return <Unknown className={className} />}}diff --git a/web/app/components/base/icons/assets/vender/solid/communication/cute-robote.svg b/web/app/components/base/icons/assets/vender/solid/communication/cute-robote.svgindex 5eb74760859..8fa74ce2646 100644--- a/web/app/components/base/icons/assets/vender/solid/communication/cute-robote.svg+++ b/web/app/components/base/icons/assets/vender/solid/communication/cute-robote.svg@@ -1,5 +1,5 @@<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">-<g id="cute-robote">+<g id="cute-robot"><path id="Icon" fill-rule="evenodd" clip-rule="evenodd" d="M12 1C12.5523 1 13 1.44772 13 2V3H17C18.6569 3 20 4.34315 20 6V11C20 11.8885 19.6138 12.6868 19 13.2361V14.5858L20.7071 16.2929C21.0976 16.6834 21.0976 17.3166 20.7071 17.7071C20.3166 18.0976 19.6834 18.0976 19.2929 17.7071L18.681 17.0952C17.7905 19.9377 15.1361 22 12 22C8.8639 22 6.20948 19.9377 5.31897 17.0952L4.70711 17.7071C4.31658 18.0976 3.68342 18.0976 3.29289 17.7071C2.90237 17.3166 2.90237 16.6834 3.29289 16.2929L5 14.5858V13.2361C4.38625 12.6868 4 11.8885 4 11V6C4 4.34315 5.34315 3 7 3H11V2C11 1.44772 11.4477 1 12 1ZM7 5C6.44772 5 6 5.44772 6 6V11C6 11.5523 6.44772 12 7 12H17C17.5523 12 18 11.5523 18 11V6C18 5.44772 17.5523 5 17 5H7ZM9 7C9.55228 7 10 7.44772 10 8V9C10 9.55228 9.55228 10 9 10C8.44772 10 8 9.55228 8 9V8C8 7.44772 8.44772 7 9 7ZM15 7C15.5523 7 16 7.44772 16 8V9C16 9.55228 15.5523 10 15 10C14.4477 10 14 9.55228 14 9V8C14 7.44772 14.4477 7 15 7Z" fill="black"/></g></svg>diff --git a/web/app/components/base/icons/src/public/files/Unknow.json b/web/app/components/base/icons/src/public/files/Unknown.jsonsimilarity index 99%rename from web/app/components/base/icons/src/public/files/Unknow.jsonrename to web/app/components/base/icons/src/public/files/Unknown.jsonindex 33067fa96f9..c39df990d02 100644--- a/web/app/components/base/icons/src/public/files/Unknow.json+++ b/web/app/components/base/icons/src/public/files/Unknown.json@@ -195,5 +195,5 @@}]},- "name": "Unknow"+ "name": "Unknown"}\ No newline at end of filediff --git a/web/app/components/base/icons/src/public/files/Unknow.tsx b/web/app/components/base/icons/src/public/files/Unknown.tsxsimilarity index 87%rename from web/app/components/base/icons/src/public/files/Unknow.tsxrename to web/app/components/base/icons/src/public/files/Unknown.tsxindex ce84d344bfe..de909ed65e1 100644--- a/web/app/components/base/icons/src/public/files/Unknow.tsx+++ b/web/app/components/base/icons/src/public/files/Unknown.tsx@@ -2,7 +2,7 @@// DON NOT EDIT IT MANUALLYimport * as React from 'react'-import data from './Unknow.json'+import data from './Unknown.json'import IconBase from '@/app/components/base/icons/IconBase'import type { IconBaseProps, IconData } from '@/app/components/base/icons/IconBase'@@ -11,6 +11,6 @@ const Icon = React.forwardRef<React.MutableRefObject<SVGElement>, Omit<IconBasePref,) => <IconBase {...props} ref={ref} data={data as IconData} />)-Icon.displayName = 'Unknow'+Icon.displayName = 'Unknown'export default Icondiff --git a/web/app/components/base/icons/src/public/files/index.ts b/web/app/components/base/icons/src/public/files/index.tsindex 2814c4ae396..f38c28cbdb5 100644--- a/web/app/components/base/icons/src/public/files/index.ts+++ b/web/app/components/base/icons/src/public/files/index.ts@@ -6,6 +6,6 @@ export { default as Json } from './Json'export { default as Md } from './Md'export { default as Pdf } from './Pdf'export { default as Txt } from './Txt'-export { default as Unknow } from './Unknow'+export { default as Unknown } from './Unknown'export { default as Xlsx } from './Xlsx'export { default as Yaml } from './Yaml'diff --git a/web/app/components/base/icons/src/vender/solid/communication/CuteRobote.json b/web/app/components/base/icons/src/vender/solid/communication/CuteRobot.jsonsimilarity index 96%rename from web/app/components/base/icons/src/vender/solid/communication/CuteRobote.jsonrename to web/app/components/base/icons/src/vender/solid/communication/CuteRobot.jsonindex f8c92c3174b..5b36575f560 100644--- a/web/app/components/base/icons/src/vender/solid/communication/CuteRobote.json+++ b/web/app/components/base/icons/src/vender/solid/communication/CuteRobot.json@@ -15,7 +15,7 @@"type": "element","name": "g","attributes": {- "id": "cute-robote"+ "id": "cute-robot"},"children": [{@@ -34,5 +34,5 @@}]},- "name": "CuteRobote"+ "name": "CuteRobot"}\ No newline at end of filediff --git a/web/app/components/base/icons/src/vender/solid/communication/CuteRobote.tsx b/web/app/components/base/icons/src/vender/solid/communication/CuteRobot.tsxsimilarity index 86%rename from web/app/components/base/icons/src/vender/solid/communication/CuteRobote.tsxrename to web/app/components/base/icons/src/vender/solid/communication/CuteRobot.tsxindex d416fb5b669..49994048b79 100644--- a/web/app/components/base/icons/src/vender/solid/communication/CuteRobote.tsx+++ b/web/app/components/base/icons/src/vender/solid/communication/CuteRobot.tsx@@ -2,7 +2,7 @@// DON NOT EDIT IT MANUALLYimport * as React from 'react'-import data from './CuteRobote.json'+import data from './CuteRobot.json'import IconBase from '@/app/components/base/icons/IconBase'import type { IconBaseProps, IconData } from '@/app/components/base/icons/IconBase'@@ -11,6 +11,6 @@ const Icon = React.forwardRef<React.MutableRefObject<SVGElement>, Omit<IconBasePref,) => <IconBase {...props} ref={ref} data={data as IconData} />)-Icon.displayName = 'CuteRobote'+Icon.displayName = 'CuteRobot'export default Icondiff --git a/web/app/components/base/icons/src/vender/solid/communication/index.ts b/web/app/components/base/icons/src/vender/solid/communication/index.tsindex 854953c116f..673de274631 100644--- a/web/app/components/base/icons/src/vender/solid/communication/index.ts+++ b/web/app/components/base/icons/src/vender/solid/communication/index.ts@@ -1,6 +1,6 @@export { default as AiText } from './AiText'export { default as ChatBot } from './ChatBot'-export { default as CuteRobote } from './CuteRobote'+export { default as CuteRobot } from './CuteRobot'export { default as EditList } from './EditList'export { default as MessageDotsCircle } from './MessageDotsCircle'export { default as MessageFast } from './MessageFast'diff --git a/web/app/components/base/image-uploader/hooks.ts b/web/app/components/base/image-uploader/hooks.tsindex bb929f4a40f..41074000a27 100644--- a/web/app/components/base/image-uploader/hooks.ts+++ b/web/app/components/base/image-uploader/hooks.ts@@ -199,7 +199,7 @@ export const useClipboardUploader = ({ visionConfig, onUpload, files }: useClipbconst handleClipboardPaste = useCallback((e: ClipboardEvent<HTMLTextAreaElement>) => {// reserve native text copy behaviorconst file = e.clipboardData?.files[0]- // when copyed file, prevent default action+ // when copied file, prevent default actionif (file) {e.preventDefault()handleLocalFileUpload(file)diff --git a/web/app/components/base/logo/logo-embedded-chat-avatar.tsx b/web/app/components/base/logo/logo-embedded-chat-avatar.tsxnew file mode 100644index 00000000000..7fd94827eb7--- /dev/null+++ b/web/app/components/base/logo/logo-embedded-chat-avatar.tsx@@ -0,0 +1,18 @@+import type { FC } from 'react'++type LogoEmbeddedChatAvatarProps = {+ className?: string+}+const LogoEmbeddedChatAvatar: FC<LogoEmbeddedChatAvatarProps> = ({+ className,+}) => {+ return (+ <img+ src='/logo/logo-embedded-chat-avatar.png'+ className={`block w-10 h-10 ${className}`}+ alt='logo'+ />+ )+}++export default LogoEmbeddedChatAvatardiff --git a/web/app/components/base/logo/logo-embedded-chat-header.tsx b/web/app/components/base/logo/logo-embedded-chat-header.tsxnew file mode 100644index 00000000000..976ce0c77ad--- /dev/null+++ b/web/app/components/base/logo/logo-embedded-chat-header.tsx@@ -0,0 +1,19 @@+import type { FC } from 'react'++type LogoEmbeddedChatHeaderProps = {+ className?: string+}++const LogoEmbeddedChatHeader: FC<LogoEmbeddedChatHeaderProps> = ({+ className,+}) => {+ return (+ <img+ src='/logo/logo-embedded-chat-header.png'+ className={`block w-auto h-6 ${className}`}+ alt='logo'+ />+ )+}++export default LogoEmbeddedChatHeaderdiff --git a/web/app/components/base/logo/logo-embeded-chat-avatar.tsx b/web/app/components/base/logo/logo-embeded-chat-avatar.tsxdeleted file mode 100644index c5880e7bf67..00000000000--- a/web/app/components/base/logo/logo-embeded-chat-avatar.tsx+++ /dev/null@@ -1,18 +0,0 @@-import type { FC } from 'react'--type LogoEmbededChatAvatarProps = {- className?: string-}-const LogoEmbededChatAvatar: FC<LogoEmbededChatAvatarProps> = ({- className,-}) => {- return (- <img- src='/logo/logo-embeded-chat-avatar.png'- className={`block w-10 h-10 ${className}`}- alt='logo'- />- )-}--export default LogoEmbededChatAvatardiff --git a/web/app/components/base/logo/logo-embeded-chat-header.tsx b/web/app/components/base/logo/logo-embeded-chat-header.tsxdeleted file mode 100644index f979d501c20..00000000000--- a/web/app/components/base/logo/logo-embeded-chat-header.tsx+++ /dev/null@@ -1,18 +0,0 @@-import type { FC } from 'react'--type LogoEmbededChatHeaderProps = {- className?: string-}-const LogoEmbededChatHeader: FC<LogoEmbededChatHeaderProps> = ({- className,-}) => {- return (- <img- src='/logo/logo-embeded-chat-header.png'- className={`block w-auto h-6 ${className}`}- alt='logo'- />- )-}--export default LogoEmbededChatHeaderdiff --git a/web/app/components/base/notion-page-selector/base.tsx b/web/app/components/base/notion-page-selector/base.tsxindex 63aff09a93e..e3b321b1204 100644--- a/web/app/components/base/notion-page-selector/base.tsx+++ b/web/app/components/base/notion-page-selector/base.tsx@@ -72,7 +72,7 @@ const NotionPageSelector = ({const handleSelectWorkspace = useCallback((workspaceId: string) => {setCurrentWorkspaceId(workspaceId)}, [])- const handleSelecPages = (newSelectedPagesId: Set<string>) => {+ const handleSelectPages = (newSelectedPagesId: Set<string>) => {const selectedPages = Array.from(newSelectedPagesId).map(pageId => getPagesMapAndSelectedPagesId[0][pageId])setSelectedPagesId(new Set(Array.from(newSelectedPagesId)))@@ -117,7 +117,7 @@ const NotionPageSelector = ({searchValue={searchValue}list={currentWorkspace?.pages || []}pagesMap={getPagesMapAndSelectedPagesId[0]}- onSelect={handleSelecPages}+ onSelect={handleSelectPages}canPreview={canPreview}previewPageId={previewPageId}onPreview={handlePreviewPage}diff --git a/web/app/components/base/notion-page-selector/page-selector/index.tsx b/web/app/components/base/notion-page-selector/page-selector/index.tsxindex b61fa345671..8f398790e78 100644--- a/web/app/components/base/notion-page-selector/page-selector/index.tsx+++ b/web/app/components/base/notion-page-selector/page-selector/index.tsx@@ -22,13 +22,13 @@ type PageSelectorProps = {type NotionPageTreeItem = {children: Set<string>descendants: Set<string>- deepth: number+ depth: numberancestors: string[]} & DataSourceNotionPagetype NotionPageTreeMap = Record<string, NotionPageTreeItem>type NotionPageItem = {expand: boolean- deepth: number+ depth: number} & DataSourceNotionPageconst recursivePushInParentDescendants = (@@ -51,7 +51,7 @@ const recursivePushInParentDescendants = (...pagesMap[parentId],children,descendants,- deepth: 0,+ depth: 0,ancestors: [],}}@@ -60,7 +60,7 @@ const recursivePushInParentDescendants = (listTreeMap[parentId].descendants.add(pageId)listTreeMap[parentId].descendants.add(leafItem.page_id)}- leafItem.deepth+++ leafItem.depth++leafItem.ancestors.unshift(listTreeMap[parentId].page_name)if (listTreeMap[parentId].parent_id !== 'root')@@ -95,7 +95,7 @@ const ItemComponent = ({ index, style, data }: ListChildComponentProps<{return (<divclassName={cn(s.arrow, current.expand && s['arrow-expand'], 'shrink-0 mr-1 w-5 h-5 hover:bg-gray-200 rounded-md')}- style={{ marginLeft: current.deepth * 8 }}+ style={{ marginLeft: current.depth * 8 }}onClick={() => handleToggle(index)}/>)@@ -106,7 +106,7 @@ const ItemComponent = ({ index, style, data }: ListChildComponentProps<{)}return (- <div className='shrink-0 mr-1 w-5 h-5' style={{ marginLeft: current.deepth * 8 }} />+ <div className='shrink-0 mr-1 w-5 h-5' style={{ marginLeft: current.depth * 8 }} />)}@@ -185,7 +185,7 @@ const PageSelector = ({return {...item,expand: false,- deepth: 0,+ depth: 0,}}))}@@ -195,7 +195,7 @@ const PageSelector = ({return {...item,expand: false,- deepth: 0,+ depth: 0,}})const currentDataList = searchValue ? searchDataList : dataList@@ -205,7 +205,7 @@ const PageSelector = ({return list.reduce((prev: NotionPageTreeMap, next: DataSourceNotionPage) => {const pageId = next.page_idif (!prev[pageId])- prev[pageId] = { ...next, children: new Set(), descendants: new Set(), deepth: 0, ancestors: [] }+ prev[pageId] = { ...next, children: new Set(), descendants: new Set(), depth: 0, ancestors: [] }recursivePushInParentDescendants(pagesMap, prev, prev[pageId], prev[pageId])return prev@@ -233,7 +233,7 @@ const PageSelector = ({...childrenIds.map(item => ({...pagesMap[item],expand: false,- deepth: listMapWithChildrenAndDescendants[item].deepth,+ depth: listMapWithChildrenAndDescendants[item].depth,})),...dataList.slice(index + 1)]}diff --git a/web/app/components/base/pagination/index.tsx b/web/app/components/base/pagination/index.tsxindex 98b1e266ae0..f8c5684b558 100644--- a/web/app/components/base/pagination/index.tsx+++ b/web/app/components/base/pagination/index.tsx@@ -23,8 +23,8 @@ const CustomizedPagination: FC<Props> = ({ current, onChange, total, limit = 10middlePagesSiblingCount={1}setCurrentPage={onChange}totalPages={totalPages}- truncableClassName="w-8 px-0.5 text-center"- truncableText="..."+ truncatableClassName="w-8 px-0.5 text-center"+ truncatableText="..."><Pagination.PrevButtondisabled={current === 0}diff --git a/web/app/components/base/prompt-editor/hooks.ts b/web/app/components/base/prompt-editor/hooks.tsindex 03074b9b173..c9e4cc129cc 100644--- a/web/app/components/base/prompt-editor/hooks.ts+++ b/web/app/components/base/prompt-editor/hooks.ts@@ -35,8 +35,8 @@ import { DELETE_QUERY_BLOCK_COMMAND } from './plugins/query-block'import type { CustomTextNode } from './plugins/custom-text/node'import { registerLexicalTextEntity } from './utils'-export type UseSelectOrDeleteHanlder = (nodeKey: string, command?: LexicalCommand<undefined>) => [RefObject<HTMLDivElement>, boolean]-export const useSelectOrDelete: UseSelectOrDeleteHanlder = (nodeKey: string, command?: LexicalCommand<undefined>) => {+export type UseSelectOrDeleteHandler = (nodeKey: string, command?: LexicalCommand<undefined>) => [RefObject<HTMLDivElement>, boolean]+export const useSelectOrDelete: UseSelectOrDeleteHandler = (nodeKey: string, command?: LexicalCommand<undefined>) => {const ref = useRef<HTMLDivElement>(null)const [editor] = useLexicalComposerContext()const [isSelected, setSelected, clearSelection] = useLexicalNodeSelection(nodeKey)diff --git a/web/app/components/base/search-input/index.tsx b/web/app/components/base/search-input/index.tsxindex a85bc2db8a4..4b3821da5a3 100644--- a/web/app/components/base/search-input/index.tsx+++ b/web/app/components/base/search-input/index.tsx@@ -25,9 +25,9 @@ const SearchInput: FC<SearchInputProps> = ({return (<div className={cn('group flex items-center px-2 h-8 rounded-lg bg-gray-200 hover:bg-gray-300 border border-transparent overflow-hidden',- focus && '!bg-white hover:bg-white shawdow-xs !border-gray-300',- !focus && value && 'hover:!bg-gray-200 hover:!shawdow-xs hover:!border-black/5',- white && '!bg-white hover:!bg-white shawdow-xs !border-gray-300 hover:!border-gray-300',+ focus && '!bg-white hover:bg-white shadow-xs !border-gray-300',+ !focus && value && 'hover:!bg-gray-200 hover:!shadow-xs hover:!border-black/5',+ white && '!bg-white hover:!bg-white shadow-xs !border-gray-300 hover:!border-gray-300',className,)}><div className="pointer-events-none shrink-0 flex items-center mr-1.5 justify-center w-4 h-4">diff --git a/web/app/components/base/select/locale.tsx b/web/app/components/base/select/locale.tsxindex 3066364316a..8b89c669502 100644--- a/web/app/components/base/select/locale.tsx+++ b/web/app/components/base/select/locale.tsx@@ -77,7 +77,7 @@ export function InputSelect({<div className="w-full"><Menu as="div" className="w-full"><div>- <Menu.Button className="iappearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 sm:text-sm h-[38px] text-left">+ <Menu.Button className="appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 sm:text-sm h-[38px] text-left">{item?.name}</Menu.Button></div>diff --git a/web/app/components/base/slider/index.tsx b/web/app/components/base/slider/index.tsxindex 18ef3a7a29d..2b8f1816334 100644--- a/web/app/components/base/slider/index.tsx+++ b/web/app/components/base/slider/index.tsx@@ -32,7 +32,7 @@ const Slider: React.FC<ISliderProps> = ({max={max || 100}step={step || 1}className={cn('relative slider', className)}- thumbClassName={cn('absolute top-[-9px] w-2 h-5 border-[0.5px] border-components-silder-knob-border rounded-[3px] bg-components-silder-knob shadow-sm focus:outline-none', !disabled && 'cursor-pointer', thumbClassName)}+ thumbClassName={cn('absolute top-[-9px] w-2 h-5 border-[0.5px] border-components-slider-knob-border rounded-[3px] bg-components-slider-knob shadow-sm focus:outline-none', !disabled && 'cursor-pointer', thumbClassName)}trackClassName={cn('h-0.5 rounded-full slider-track', trackClassName)}onChange={onChange}/>diff --git a/web/app/components/base/slider/style.css b/web/app/components/base/slider/style.cssindex 6b4394ed931..e215a9914e1 100644--- a/web/app/components/base/slider/style.css+++ b/web/app/components/base/slider/style.css@@ -3,9 +3,9 @@}.slider-track {- background-color: var(--color-components-silder-range);+ background-color: var(--color-components-slider-range);}.slider-track-1 {- background-color: var(--color-components-silder-track);+ background-color: var(--color-components-slider-track);}\ No newline at end of filediff --git a/web/app/components/base/tag-input/index.tsx b/web/app/components/base/tag-input/index.tsxindex 7eab355a0d4..404fd89f38f 100644--- a/web/app/components/base/tag-input/index.tsx+++ b/web/app/components/base/tag-input/index.tsx@@ -46,16 +46,16 @@ const TagInput: FC<TagInputProps> = ({if (isSpecialMode)e.preventDefault()- const valueTrimed = value.trim()- if (!valueTrimed || (items.find(item => item === valueTrimed)))+ const valueTrimmed = value.trim()+ if (!valueTrimmed || (items.find(item => item === valueTrimmed)))return- if (valueTrimed.length > 20) {+ if (valueTrimmed.length > 20) {notify({ type: 'error', message: t('datasetDocuments.segment.keywordError') })return}- onChange([...items, valueTrimed])+ onChange([...items, valueTrimmed])setTimeout(() => {setValue('')})diff --git a/web/app/components/base/text-generation/types.ts b/web/app/components/base/text-generation/types.tsindex 82a41775920..1e2c04f6e89 100644--- a/web/app/components/base/text-generation/types.ts+++ b/web/app/components/base/text-generation/types.ts@@ -15,7 +15,7 @@ export type UserInputForm = {}export type UserInputFormTextInput = {- 'text-inpput': UserInputForm & {+ 'text-input': UserInputForm & {max_length: number}}diff --git a/web/app/components/browser-initor.tsx b/web/app/components/browser-initor.tsxindex 711ff62a94b..939ddd567d3 100644--- a/web/app/components/browser-initor.tsx+++ b/web/app/components/browser-initor.tsx@@ -43,10 +43,10 @@ Object.defineProperty(globalThis, 'sessionStorage', {value: sessionStorage,})-const BrowerInitor = ({+const BrowserInitor = ({children,}: { children: React.ReactElement }) => {return children}-export default BrowerInitor+export default BrowserInitordiff --git a/web/app/components/datasets/common/check-rerank-model.ts b/web/app/components/datasets/common/check-rerank-model.tsindex 42810e4bf03..581c2bb69ac 100644--- a/web/app/components/datasets/common/check-rerank-model.ts+++ b/web/app/components/datasets/common/check-rerank-model.ts@@ -7,13 +7,13 @@ import { RerankingModeEnum } from '@/models/datasets'export const isReRankModelSelected = ({rerankDefaultModel,- isRerankDefaultModelVaild,+ isRerankDefaultModelValid,retrievalConfig,rerankModelList,indexMethod,}: {rerankDefaultModel?: DefaultModelResponse- isRerankDefaultModelVaild: boolean+ isRerankDefaultModelValid: booleanretrievalConfig: RetrievalConfigrerankModelList: Model[]indexMethod?: string@@ -25,7 +25,7 @@ export const isReRankModelSelected = ({return provider?.models.find(({ model }) => model === retrievalConfig.reranking_model?.reranking_model_name)}- if (isRerankDefaultModelVaild)+ if (isRerankDefaultModelValid)return !!rerankDefaultModelreturn falsediff --git a/web/app/components/datasets/create/assets/unknow.svg b/web/app/components/datasets/create/assets/unknown.svgsimilarity index 100%rename from web/app/components/datasets/create/assets/unknow.svgrename to web/app/components/datasets/create/assets/unknown.svgdiff --git a/web/app/components/datasets/create/embedding-process/index.module.css b/web/app/components/datasets/create/embedding-process/index.module.cssindex a15b1310b4c..1ebb006b543 100644--- a/web/app/components/datasets/create/embedding-process/index.module.css+++ b/web/app/components/datasets/create/embedding-process/index.module.css@@ -83,7 +83,7 @@.fileIcon {@apply w-4 h-4 mr-1 bg-center bg-no-repeat;- background-image: url(../assets/unknow.svg);+ background-image: url(../assets/unknown.svg);background-size: 16px;}.fileIcon.csv {diff --git a/web/app/components/datasets/create/empty-dataset-creation-modal/index.tsx b/web/app/components/datasets/create/empty-dataset-creation-modal/index.tsxindex c490d50b888..23c3f0314a3 100644--- a/web/app/components/datasets/create/empty-dataset-creation-modal/index.tsx+++ b/web/app/components/datasets/create/empty-dataset-creation-modal/index.tsx@@ -32,7 +32,7 @@ const EmptyDatasetCreationModal = ({return}if (inputValue.length > 40) {- notify({ type: 'error', message: t('datasetCreation.stepOne.modal.nameLengthInvaild') })+ notify({ type: 'error', message: t('datasetCreation.stepOne.modal.nameLengthInvalid') })return}try {diff --git a/web/app/components/datasets/create/file-uploader/index.module.css b/web/app/components/datasets/create/file-uploader/index.module.cssindex d141815c5a5..bf5b7dcaf5b 100644--- a/web/app/components/datasets/create/file-uploader/index.module.css+++ b/web/app/components/datasets/create/file-uploader/index.module.css@@ -104,7 +104,7 @@.fileIcon {@apply shrink-0 w-6 h-6 mr-2 bg-center bg-no-repeat;- background-image: url(../assets/unknow.svg);+ background-image: url(../assets/unknown.svg);background-size: 24px;}diff --git a/web/app/components/datasets/create/step-two/index.tsx b/web/app/components/datasets/create/step-two/index.tsxindex 382684a9852..15332b944de 100644--- a/web/app/components/datasets/create/step-two/index.tsx+++ b/web/app/components/datasets/create/step-two/index.tsx@@ -306,7 +306,7 @@ const StepTwo = ({const {modelList: rerankModelList,defaultModel: rerankDefaultModel,- currentModel: isRerankDefaultModelVaild,+ currentModel: isRerankDefaultModelValid,} = useModelListAndDefaultModelAndCurrentProviderAndModel(ModelTypeEnum.rerank)const { data: embeddingModelList } = useModelList(ModelTypeEnum.textEmbedding)const { data: defaultEmbeddingModel } = useDefaultModel(ModelTypeEnum.textEmbedding)@@ -344,7 +344,7 @@ const StepTwo = ({if (!isReRankModelSelected({rerankDefaultModel,- isRerankDefaultModelVaild: !!isRerankDefaultModelVaild,+ isRerankDefaultModelValid: !!isRerankDefaultModelValid,rerankModelList,// eslint-disable-next-line @typescript-eslint/no-use-before-defineretrievalConfig,diff --git a/web/app/components/datasets/create/step-two/preview-item/index.tsx b/web/app/components/datasets/create/step-two/preview-item/index.tsxindex fdec6c734d0..56102b65406 100644--- a/web/app/components/datasets/create/step-two/preview-item/index.tsx+++ b/web/app/components/datasets/create/step-two/preview-item/index.tsx@@ -41,14 +41,14 @@ const PreviewItem: FC<IPreviewItemProps> = ({const charNums = type === PreviewType.TEXT? (content || '').length: (qa?.answer || '').length + (qa?.question || '').length- const formatedIndex = (() => String(index).padStart(3, '0'))()+ const formattedIndex = (() => String(index).padStart(3, '0'))()return (<div className='p-4 rounded-xl bg-gray-50'><div className='flex items-center justify-between h-5 text-xs text-gray-500'><div className='flex items-center h-[18px] space-x-1 border border-gray-200 box-border rounded-md italic pl-1 pr-1.5 font-medium'>{sharpIcon}- <span>{formatedIndex}</span>+ <span>{formattedIndex}</span></div><div className='flex items-center space-x-1'>{textIcon}diff --git a/web/app/components/datasets/documents/detail/completed/index.tsx b/web/app/components/datasets/documents/detail/completed/index.tsxindex 195b75b0a22..0251dfa54e7 100644--- a/web/app/components/datasets/documents/detail/completed/index.tsx+++ b/web/app/components/datasets/documents/detail/completed/index.tsx@@ -24,7 +24,7 @@ import { ToastContext } from '@/app/components/base/toast'import type { Item } from '@/app/components/base/select'import { SimpleSelect } from '@/app/components/base/select'import { deleteSegment, disableSegment, enableSegment, fetchSegments, updateSegment } from '@/service/datasets'-import type { SegmentDetailModel, SegmentUpdator, SegmentsQuery, SegmentsResponse } from '@/models/datasets'+import type { SegmentDetailModel, SegmentUpdater, SegmentsQuery, SegmentsResponse } from '@/models/datasets'import { asyncRunSafe } from '@/utils'import type { CommonResponse } from '@/models/common'import AutoHeightTextarea from '@/app/components/base/auto-height-textarea/common'@@ -322,7 +322,7 @@ const Completed: FC<ICompletedProps> = ({}const handleUpdateSegment = async (segmentId: string, question: string, answer: string, keywords: string[]) => {- const params: SegmentUpdator = { content: '' }+ const params: SegmentUpdater = { content: '' }if (docForm === 'qa_model') {if (!question.trim())return notify({ type: 'error', message: t('datasetDocuments.segment.questionEmpty') })diff --git a/web/app/components/datasets/documents/detail/new-segment-modal.tsx b/web/app/components/datasets/documents/detail/new-segment-modal.tsxindex 24e0ba3cdcf..dae9cf19fbc 100644--- a/web/app/components/datasets/documents/detail/new-segment-modal.tsx+++ b/web/app/components/datasets/documents/detail/new-segment-modal.tsx@@ -9,7 +9,7 @@ import Button from '@/app/components/base/button'import AutoHeightTextarea from '@/app/components/base/auto-height-textarea/common'import { Hash02 } from '@/app/components/base/icons/src/vender/line/general'import { ToastContext } from '@/app/components/base/toast'-import type { SegmentUpdator } from '@/models/datasets'+import type { SegmentUpdater } from '@/models/datasets'import { addSegment } from '@/service/datasets'import TagInput from '@/app/components/base/tag-input'@@ -42,7 +42,7 @@ const NewSegmentModal: FC<NewSegmentModalProps> = ({}const handleSave = async () => {- const params: SegmentUpdator = { content: '' }+ const params: SegmentUpdater = { content: '' }if (docForm === 'qa_model') {if (!question.trim())return notify({ type: 'error', message: t('datasetDocuments.segment.questionEmpty') })diff --git a/web/app/components/datasets/documents/index.tsx b/web/app/components/datasets/documents/index.tsxindex 590828830d6..81b85c82204 100644--- a/web/app/components/datasets/documents/index.tsx+++ b/web/app/components/datasets/documents/index.tsx@@ -109,15 +109,15 @@ const Documents: FC<IDocumentsProps> = ({ datasetId }) => {let percent = 0const documentsData = documentsRes?.data?.map((documentItem) => {const { indexing_status, completed_segments, total_segments } = documentItem- const isEmbeddinged = indexing_status === 'completed' || indexing_status === 'paused' || indexing_status === 'error'+ const isEmbedded = indexing_status === 'completed' || indexing_status === 'paused' || indexing_status === 'error'- if (isEmbeddinged)+ if (isEmbedded)completedNum++const completedCount = completed_segments || 0const totalCount = total_segments || 0if (totalCount === 0 && completedCount === 0) {- percent = isEmbeddinged ? 100 : 0+ percent = isEmbedded ? 100 : 0}else {const per = Math.round(completedCount * 100 / totalCount)diff --git a/web/app/components/datasets/hit-testing/modify-retrieval-modal.tsx b/web/app/components/datasets/hit-testing/modify-retrieval-modal.tsxindex be5c1be2e71..999f1cdf0d2 100644--- a/web/app/components/datasets/hit-testing/modify-retrieval-modal.tsx+++ b/web/app/components/datasets/hit-testing/modify-retrieval-modal.tsx@@ -39,14 +39,14 @@ const ModifyRetrievalModal: FC<Props> = ({const {modelList: rerankModelList,defaultModel: rerankDefaultModel,- currentModel: isRerankDefaultModelVaild,+ currentModel: isRerankDefaultModelValid,} = useModelListAndDefaultModelAndCurrentProviderAndModel(ModelTypeEnum.rerank)const handleSave = () => {if (!isReRankModelSelected({rerankDefaultModel,- isRerankDefaultModelVaild: !!isRerankDefaultModelVaild,+ isRerankDefaultModelValid: !!isRerankDefaultModelValid,rerankModelList,retrievalConfig,indexMethod,diff --git a/web/app/components/datasets/settings/form/index.tsx b/web/app/components/datasets/settings/form/index.tsxindex 404a8ed6a0a..0f6bdd0a59e 100644--- a/web/app/components/datasets/settings/form/index.tsx+++ b/web/app/components/datasets/settings/form/index.tsx@@ -73,7 +73,7 @@ const Form = () => {const {modelList: rerankModelList,defaultModel: rerankDefaultModel,- currentModel: isRerankDefaultModelVaild,+ currentModel: isRerankDefaultModelValid,} = useModelListAndDefaultModelAndCurrentProviderAndModel(ModelTypeEnum.rerank)const { data: embeddingModelList } = useModelList(ModelTypeEnum.textEmbedding)@@ -99,7 +99,7 @@ const Form = () => {if (!isReRankModelSelected({rerankDefaultModel,- isRerankDefaultModelVaild: !!isRerankDefaultModelVaild,+ isRerankDefaultModelValid: !!isRerankDefaultModelValid,rerankModelList,retrievalConfig,indexMethod,diff --git a/web/app/components/develop/template/template_advanced_chat.en.mdx b/web/app/components/develop/template/template_advanced_chat.en.mdxindex 6487ac79d7e..655b6efce10 100644--- a/web/app/components/develop/template/template_advanced_chat.en.mdx+++ b/web/app/components/develop/template/template_advanced_chat.en.mdx@@ -3,7 +3,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from# Advanced Chat App API-Chat applications support session persistence, allowing previous chat history to be used as context for responses. This can be applicable for chatbots, customer service AI, etc.+Chat applications support session persistence, allowing previous chat history to be used as context for responses. This can be applicable for chatbot, customer service AI, etc.<div>### Base URL@@ -60,7 +60,7 @@ Chat applications support session persistence, allowing previous chat history toShould be uniquely defined by the developer within the application.</Property><Property name='conversation_id' type='string' key='conversation_id'>- Converation ID, to continue the conversation based on previous chat records, it is necessary to pass the previous message's conversation_id.+ Conversation ID, to continue the conversation based on previous chat records, it is necessary to pass the previous message's conversation_id.</Property><Property name='files' type='array[object]' key='files'>File list, suitable for inputting files (images) combined with text understanding and answering questions, available only when the model supports Vision capability.@@ -239,7 +239,7 @@ Chat applications support session persistence, allowing previous chat history to"message_id": "9da23599-e713-473b-982c-4328d4f5c78a","conversation_id": "45701982-8118-4bc5-8e9b-64562b4555f2","mode": "chat",- "answer": "iPhone 13 Pro Max specs are listed heere:...",+ "answer": "iPhone 13 Pro Max specs are listed here:...","metadata": {"usage": {"prompt_tokens": 1033,@@ -732,7 +732,7 @@ Chat applications support session persistence, allowing previous chat history to<CodeGroup title="Request" tag="DELETE" label="/conversations/:conversation_id" targetCode={`curl -X DELETE '${props.appDetail.api_base_url}/conversations/:conversation_id' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{ \n "user": "abc-123"\n}'`}>```bash {{ title: 'cURL' }}- curl -X DELETE '${props.appDetail.api_base_url}/conversations/{convsation_id}' \+ curl -X DELETE '${props.appDetail.api_base_url}/conversations/{conversation_id}' \--header 'Content-Type: application/json' \--header 'Accept: application/json' \--header 'Authorization: Bearer {api_key}' \diff --git a/web/app/components/develop/template/template_advanced_chat.zh.mdx b/web/app/components/develop/template/template_advanced_chat.zh.mdxindex 33551509e51..2aa42fbb190 100755--- a/web/app/components/develop/template/template_advanced_chat.zh.mdx+++ b/web/app/components/develop/template/template_advanced_chat.zh.mdx@@ -250,7 +250,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'"message_id": "9da23599-e713-473b-982c-4328d4f5c78a","conversation_id": "45701982-8118-4bc5-8e9b-64562b4555f2","mode": "chat",- "answer": "iPhone 13 Pro Max specs are listed heere:...",+ "answer": "iPhone 13 Pro Max specs are listed here:...","metadata": {"usage": {"prompt_tokens": 1033,@@ -767,7 +767,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'<CodeGroup title="Request" tag="DELETE" label="/conversations/:conversation_id" targetCode={`curl -X DELETE '${props.appDetail.api_base_url}/conversations/:conversation_id' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{ \n "user": "abc-123"\n}'`}>```bash {{ title: 'cURL' }}- curl -X DELETE '${props.appDetail.api_base_url}/conversations/{convsation_id}' \+ curl -X DELETE '${props.appDetail.api_base_url}/conversations/{conversation_id}' \--header 'Content-Type: application/json' \--header 'Accept: application/json' \--header 'Authorization: Bearer {api_key}' \diff --git a/web/app/components/develop/template/template_chat.en.mdx b/web/app/components/develop/template/template_chat.en.mdxindex 07840640f4d..d6dfbaaaf98 100644--- a/web/app/components/develop/template/template_chat.en.mdx+++ b/web/app/components/develop/template/template_chat.en.mdx@@ -3,7 +3,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from# Chat App API-Chat applications support session persistence, allowing previous chat history to be used as context for responses. This can be applicable for chatbots, customer service AI, etc.+Chat applications support session persistence, allowing previous chat history to be used as context for responses. This can be applicable for chatbot, customer service AI, etc.<div>### Base URL@@ -61,7 +61,7 @@ Chat applications support session persistence, allowing previous chat history toShould be uniquely defined by the developer within the application.</Property><Property name='conversation_id' type='string' key='conversation_id'>- Converation ID, to continue the conversation based on previous chat records, it is necessary to pass the previous message's conversation_id.+ Conversation ID, to continue the conversation based on previous chat records, it is necessary to pass the previous message's conversation_id.</Property><Property name='files' type='array[object]' key='files'>File list, suitable for inputting files (images) combined with text understanding and answering questions, available only when the model supports Vision capability.@@ -200,7 +200,7 @@ Chat applications support session persistence, allowing previous chat history to"message_id": "9da23599-e713-473b-982c-4328d4f5c78a","conversation_id": "45701982-8118-4bc5-8e9b-64562b4555f2","mode": "chat",- "answer": "iPhone 13 Pro Max specs are listed heere:...",+ "answer": "iPhone 13 Pro Max specs are listed here:...","metadata": {"usage": {"prompt_tokens": 1033,@@ -534,7 +534,7 @@ Chat applications support session persistence, allowing previous chat history to- `id` (string) ID- `type` (string) File type, image for images- `url` (string) Preview image URL- - `belongs_to` (string) belongs to,user orassistant+ - `belongs_to` (string) belongs to,user or assistant- `agent_thoughts` (array[object]) Agent thought(Empty if it's a Basic Assistant)- `id` (string) Agent thought ID, every iteration has a unique agent thought ID- `message_id` (string) Unique message ID@@ -772,7 +772,7 @@ Chat applications support session persistence, allowing previous chat history to<CodeGroup title="Request" tag="DELETE" label="/conversations/:conversation_id" targetCode={`curl -X DELETE '${props.appDetail.api_base_url}/conversations/:conversation_id' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{ \n "user": "abc-123"\n}'`}>```bash {{ title: 'cURL' }}- curl -X DELETE '${props.appDetail.api_base_url}/conversations/{convsation_id}' \+ curl -X DELETE '${props.appDetail.api_base_url}/conversations/{conversation_id}' \--header 'Content-Type: application/json' \--header 'Accept: application/json' \--header 'Authorization: Bearer {api_key}' \diff --git a/web/app/components/develop/template/template_chat.zh.mdx b/web/app/components/develop/template/template_chat.zh.mdxindex 727d884c1a7..a91da81a1c1 100644--- a/web/app/components/develop/template/template_chat.zh.mdx+++ b/web/app/components/develop/template/template_chat.zh.mdx@@ -213,7 +213,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'"message_id": "9da23599-e713-473b-982c-4328d4f5c78a","conversation_id": "45701982-8118-4bc5-8e9b-64562b4555f2","mode": "chat",- "answer": "iPhone 13 Pro Max specs are listed heere:...",+ "answer": "iPhone 13 Pro Max specs are listed here:...","metadata": {"usage": {"prompt_tokens": 1033,@@ -786,7 +786,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'<CodeGroup title="Request" tag="DELETE" label="/conversations/:conversation_id" targetCode={`curl -X DELETE '${props.appDetail.api_base_url}/conversations/:conversation_id' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{ \n "user": "abc-123"\n}'`}>```bash {{ title: 'cURL' }}- curl -X DELETE '${props.appDetail.api_base_url}/conversations/{convsation_id}' \+ curl -X DELETE '${props.appDetail.api_base_url}/conversations/{conversation_id}' \--header 'Content-Type: application/json' \--header 'Accept: application/json' \--header 'Authorization: Bearer {api_key}' \diff --git a/web/app/components/explore/app-card/index.tsx b/web/app/components/explore/app-card/index.tsxindex 96bb7145817..b1ea4a95bf9 100644--- a/web/app/components/explore/app-card/index.tsx+++ b/web/app/components/explore/app-card/index.tsx@@ -5,7 +5,7 @@ import Button from '../../base/button'import cn from '@/utils/classnames'import type { App } from '@/models/explore'import AppIcon from '@/app/components/base/app-icon'-import { AiText, ChatBot, CuteRobote } from '@/app/components/base/icons/src/vender/solid/communication'+import { AiText, ChatBot, CuteRobot } from '@/app/components/base/icons/src/vender/solid/communication'import { Route } from '@/app/components/base/icons/src/vender/solid/mapsAndTravel'export type AppCardProps = {app: App@@ -38,7 +38,7 @@ const AppCard = ({<ChatBot className='w-3 h-3 text-[#1570EF]' />)}{appBasicInfo.mode === 'agent-chat' && (- <CuteRobote className='w-3 h-3 text-indigo-600' />+ <CuteRobot className='w-3 h-3 text-indigo-600' />)}{appBasicInfo.mode === 'chat' && (<ChatBot className='w-3 h-3 text-[#1570EF]' />diff --git a/web/app/components/explore/category.tsx b/web/app/components/explore/category.tsxindex cf655c5333b..cbf6cd26fe7 100644--- a/web/app/components/explore/category.tsx+++ b/web/app/components/explore/category.tsx@@ -15,7 +15,7 @@ export type ICategoryProps = {value: stringonChange: (value: AppCategory | string) => void/**- * default value for searchparam 'category' in en+ * default value for search param 'category' in en*/allCategoriesEn: string}diff --git a/web/app/components/header/account-dropdown/index.tsx b/web/app/components/header/account-dropdown/index.tsxindex 1dd03e52901..03157ed7cb4 100644--- a/web/app/components/header/account-dropdown/index.tsx+++ b/web/app/components/header/account-dropdown/index.tsx@@ -22,11 +22,11 @@ import { LanguagesSupported } from '@/i18n/language'import { useProviderContext } from '@/context/provider-context'import { Plan } from '@/app/components/billing/type'-export type IAppSelecotr = {+export type IAppSelector = {isMobile: boolean}-export default function AppSelector({ isMobile }: IAppSelecotr) {+export default function AppSelector({ isMobile }: IAppSelector) {const itemClassName = `flex items-center w-full h-9 px-3 text-gray-700 text-[14px]rounded-lg font-normal hover:bg-gray-50 cursor-pointerdiff --git a/web/app/components/header/account-setting/account-page/index.tsx b/web/app/components/header/account-setting/account-page/index.tsxindex ce7f7e7e224..eecd275b355 100644--- a/web/app/components/header/account-setting/account-page/index.tsx+++ b/web/app/components/header/account-setting/account-page/index.tsx@@ -90,7 +90,7 @@ export default function AccountPage() {setPassword('')setConfirmPassword('')}- const handleSavePassowrd = async () => {+ const handleSavePassword = async () => {if (!valid())returntry {@@ -235,7 +235,7 @@ export default function AccountPage() {<Buttondisabled={editing}variant='primary'- onClick={handleSavePassowrd}+ onClick={handleSavePassword}>{userProfile.is_password_set ? t('common.operation.reset') : t('common.operation.save')}</Button>diff --git a/web/app/components/header/account-setting/members-page/index.tsx b/web/app/components/header/account-setting/members-page/index.tsxindex 711e7726842..e09e4bbc0d5 100644--- a/web/app/components/header/account-setting/members-page/index.tsx+++ b/web/app/components/header/account-setting/members-page/index.tsx@@ -15,7 +15,7 @@ import I18n from '@/context/i18n'import { useAppContext } from '@/context/app-context'import Avatar from '@/app/components/base/avatar'import type { InvitationResult } from '@/models/common'-import LogoEmbededChatHeader from '@/app/components/base/logo/logo-embeded-chat-header'+import LogoEmbeddedChatHeader from '@/app/components/base/logo/logo-embedded-chat-header'import { useProviderContext } from '@/context/provider-context'import { Plan } from '@/app/components/billing/type'import UpgradeBtn from '@/app/components/billing/upgrade-btn'@@ -49,7 +49,7 @@ const MembersPage = () => {<><div className='flex flex-col'><div className='flex items-center mb-4 p-3 bg-gray-50 rounded-2xl'>- <LogoEmbededChatHeader className='!w-10 !h-10' />+ <LogoEmbeddedChatHeader className='!w-10 !h-10' /><div className='grow mx-2'><div className='text-sm font-medium text-gray-900'>{currentWorkspace?.name}</div>{enableBilling && (diff --git a/web/app/components/header/account-setting/model-provider-page/index.tsx b/web/app/components/header/account-setting/model-provider-page/index.tsxindex 656c7b02397..a8a5a0cf420 100644--- a/web/app/components/header/account-setting/model-provider-page/index.tsx+++ b/web/app/components/header/account-setting/model-provider-page/index.tsx@@ -35,9 +35,9 @@ const ModelProviderPage = () => {const { modelProviders: providers } = useProviderContext()const setShowModelModal = useModalContextSelector(state => state.setShowModelModal)const defaultModelNotConfigured = !textGenerationDefaultModel && !embeddingsDefaultModel && !speech2textDefaultModel && !rerankDefaultModel && !ttsDefaultModel- const [configedProviders, notConfigedProviders] = useMemo(() => {- const configedProviders: ModelProvider[] = []- const notConfigedProviders: ModelProvider[] = []+ const [configuredProviders, notConfiguredProviders] = useMemo(() => {+ const configuredProviders: ModelProvider[] = []+ const notConfiguredProviders: ModelProvider[] = []providers.forEach((provider) => {if (@@ -47,12 +47,12 @@ const ModelProviderPage = () => {&& provider.system_configuration.quota_configurations.find(item => item.quota_type === provider.system_configuration.current_quota_type)))- configedProviders.push(provider)+ configuredProviders.push(provider)else- notConfigedProviders.push(provider)+ notConfiguredProviders.push(provider)})- return [configedProviders, notConfigedProviders]+ return [configuredProviders, notConfiguredProviders]}, [providers])const handleOpenModal = (@@ -110,10 +110,10 @@ const ModelProviderPage = () => {/></div>{- !!configedProviders?.length && (+ !!configuredProviders?.length && (<div className='pb-3'>{- configedProviders?.map(provider => (+ configuredProviders?.map(provider => (<ProviderAddedCardkey={provider.provider}provider={provider}@@ -125,7 +125,7 @@ const ModelProviderPage = () => {)}{- !!notConfigedProviders?.length && (+ !!notConfiguredProviders?.length && (<><div className='flex items-center mb-2 text-xs font-semibold text-gray-500'>+ {t('common.modelProvider.addMoreModelProvider')}@@ -133,7 +133,7 @@ const ModelProviderPage = () => {</div><div className='grid grid-cols-3 gap-2'>{- notConfigedProviders?.map(provider => (+ notConfiguredProviders?.map(provider => (<ProviderCardkey={provider.provider}provider={provider}diff --git a/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx b/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsxindex 57122c9ef1d..e0b28a6d732 100644--- a/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx@@ -91,7 +91,7 @@ const Form: FC<FormProps> = ({if (show_on.length && !show_on.every(showOnItem => value[showOnItem.variable] === showOnItem.value))return null- const disabed = readonly || (isEditMode && (variable === '__model_type' || variable === '__model_name'))+ const disabled = readonly || (isEditMode && (variable === '__model_type' || variable === '__model_name'))return (<div key={variable} className={cn(itemClassName, 'py-3')}><div className={cn(fieldLabelClassName, 'flex items-center py-2 text-sm text-gray-900')}>@@ -104,12 +104,12 @@ const Form: FC<FormProps> = ({{tooltipContent}</div><Input- className={cn(inputClassName, `${disabed && 'cursor-not-allowed opacity-60'}`)}+ className={cn(inputClassName, `${disabled && 'cursor-not-allowed opacity-60'}`)}value={(isShowDefaultValue && ((value[variable] as string) === '' || value[variable] === undefined || value[variable] === null)) ? formSchema.default : value[variable]}onChange={val => handleFormChange(variable, val)}validated={validatedSuccess}placeholder={placeholder?.[language] || placeholder?.en_US}- disabled={disabed}+ disabled={disabled}type={formSchema.type === FormTypeEnum.textNumber ? 'number' : 'text'}{...(formSchema.type === FormTypeEnum.textNumber ? { min: (formSchema as CredentialFormSchemaNumberInput).min, max: (formSchema as CredentialFormSchemaNumberInput).max } : {})}/>@@ -131,7 +131,7 @@ const Form: FC<FormProps> = ({if (show_on.length && !show_on.every(showOnItem => value[showOnItem.variable] === showOnItem.value))return null- const disabed = isEditMode && (variable === '__model_type' || variable === '__model_name')+ const disabled = isEditMode && (variable === '__model_type' || variable === '__model_name')return (<div key={variable} className={cn(itemClassName, 'py-3')}>@@ -156,7 +156,7 @@ const Form: FC<FormProps> = ({className={`flex items-center px-3 py-2 rounded-lg border border-gray-100 bg-gray-25 cursor-pointer${value[variable] === option.value && 'bg-white border-[1.5px] border-primary-400 shadow-sm'}- ${disabed && '!cursor-not-allowed opacity-60'}+ ${disabled && '!cursor-not-allowed opacity-60'}`}onClick={() => handleFormChange(variable, option.value)}key={`${variable}-${option.value}`}diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/credential-panel.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/credential-panel.tsxindex c25693966e6..f141e0018c9 100644--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/credential-panel.tsx+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/credential-panel.tsx@@ -36,7 +36,7 @@ const CredentialPanel: FC<CredentialPanelProps> = ({const customConfig = provider.custom_configurationconst systemConfig = provider.system_configurationconst priorityUseType = provider.preferred_provider_type- const customConfiged = customConfig.status === CustomConfigurationStatusEnum.active+ const isCustomConfigured = customConfig.status === CustomConfigurationStatusEnum.activeconst configurateMethods = provider.configurate_methodsconst handleChangePriority = async (key: PreferredProviderTypeEnum) => {@@ -69,7 +69,7 @@ const CredentialPanel: FC<CredentialPanelProps> = ({<div className='shrink-0 relative ml-1 p-1 w-[112px] rounded-lg bg-white/[0.3] border-[0.5px] border-black/5'><div className='flex items-center justify-between mb-1 pt-1 pl-2 pr-[7px] h-5 text-xs font-medium text-gray-500'>API-KEY- <Indicator color={customConfiged ? 'green' : 'gray'} />+ <Indicator color={isCustomConfigured ? 'green' : 'gray'} /></div><div className='flex items-center gap-0.5'><Button@@ -81,7 +81,7 @@ const CredentialPanel: FC<CredentialPanelProps> = ({{t('common.operation.setup')}</Button>{- systemConfig.enabled && customConfiged && (+ systemConfig.enabled && isCustomConfigured && (<PrioritySelectorvalue={priorityUseType}onSelect={handleChangePriority}@@ -98,7 +98,7 @@ const CredentialPanel: FC<CredentialPanelProps> = ({)}{- systemConfig.enabled && customConfiged && !provider.provider_credential_schema && (+ systemConfig.enabled && isCustomConfigured && !provider.provider_credential_schema && (<div className='ml-1'><PrioritySelectorvalue={priorityUseType}diff --git a/web/app/components/header/explore-nav/index.tsx b/web/app/components/header/explore-nav/index.tsxindex 032b886613b..0046fc293de 100644--- a/web/app/components/header/explore-nav/index.tsx+++ b/web/app/components/header/explore-nav/index.tsx@@ -17,16 +17,16 @@ const ExploreNav = ({}: ExploreNavProps) => {const { t } = useTranslation()const selectedSegment = useSelectedLayoutSegment()- const actived = selectedSegment === 'explore'+ const activated = selectedSegment === 'explore'return (<Link href="/explore/apps" className={classNames(className, 'group',- actived && 'bg-components-main-nav-nav-button-bg-active shadow-md',- actived ? 'text-components-main-nav-nav-button-text-active' : 'text-components-main-nav-nav-button-text hover:bg-components-main-nav-nav-button-bg-hover',+ activated && 'bg-components-main-nav-nav-button-bg-active shadow-md',+ activated ? 'text-components-main-nav-nav-button-text-active' : 'text-components-main-nav-nav-button-text hover:bg-components-main-nav-nav-button-bg-hover',)}>{- actived+ activated? <RiPlanetFill className='mr-2 w-4 h-4' />: <RiPlanetLine className='mr-2 w-4 h-4' />}diff --git a/web/app/components/header/nav/index.tsx b/web/app/components/header/nav/index.tsxindex 1ea36c51234..bfb4324320e 100644--- a/web/app/components/header/nav/index.tsx+++ b/web/app/components/header/nav/index.tsx@@ -34,21 +34,21 @@ const Nav = ({const setAppDetail = useAppStore(state => state.setAppDetail)const [hovered, setHovered] = useState(false)const segment = useSelectedLayoutSegment()- const isActived = Array.isArray(activeSegment) ? activeSegment.includes(segment!) : segment === activeSegment+ const isActivated = Array.isArray(activeSegment) ? activeSegment.includes(segment!) : segment === activeSegmentreturn (<div className={`flex items-center h-8 mr-0 sm:mr-3 px-0.5 rounded-xl text-sm shrink-0 font-medium- ${isActived && 'bg-components-main-nav-nav-button-bg-active shadow-md font-semibold'}- ${!curNav && !isActived && 'hover:bg-components-main-nav-nav-button-bg-hover'}+ ${isActivated && 'bg-components-main-nav-nav-button-bg-active shadow-md font-semibold'}+ ${!curNav && !isActivated && 'hover:bg-components-main-nav-nav-button-bg-hover'}`}><Link href={link}><divonClick={() => setAppDetail()}className={classNames(`flex items-center h-7 px-2.5 cursor-pointer rounded-[10px]- ${isActived ? 'text-components-main-nav-nav-button-text-active' : 'text-components-main-nav-nav-button-text'}- ${curNav && isActived && 'hover:bg-components-main-nav-nav-button-bg-active-hover'}+ ${isActivated ? 'text-components-main-nav-nav-button-text-active' : 'text-components-main-nav-nav-button-text'}+ ${curNav && isActivated && 'hover:bg-components-main-nav-nav-button-bg-active-hover'}`)}onMouseEnter={() => setHovered(true)}onMouseLeave={() => setHovered(false)}@@ -57,7 +57,7 @@ const Nav = ({{(hovered && curNav)? <ArrowNarrowLeft className='w-4 h-4' />- : isActived+ : isActivated? activeIcon: icon}@@ -66,7 +66,7 @@ const Nav = ({</div></Link>{- curNav && isActived && (+ curNav && isActivated && (<><div className='font-light text-gray-300 '>/</div><NavSelectordiff --git a/web/app/components/header/nav/nav-selector/index.tsx b/web/app/components/header/nav/nav-selector/index.tsxindex ab5189bf926..ba9c58fadbd 100644--- a/web/app/components/header/nav/nav-selector/index.tsx+++ b/web/app/components/header/nav/nav-selector/index.tsx@@ -11,7 +11,7 @@ import { useRouter } from 'next/navigation'import { debounce } from 'lodash-es'import cn from '@/utils/classnames'import AppIcon from '@/app/components/base/app-icon'-import { AiText, ChatBot, CuteRobote } from '@/app/components/base/icons/src/vender/solid/communication'+import { AiText, ChatBot, CuteRobot } from '@/app/components/base/icons/src/vender/solid/communication'import { Route } from '@/app/components/base/icons/src/vender/solid/mapsAndTravel'import { useAppContext } from '@/context/app-context'import { useStore as useAppStore } from '@/app/components/app/store'@@ -94,7 +94,7 @@ const NavSelector = ({ curNav, navs, createText, isApp, onCreate, onLoadmore }:<ChatBot className='w-2.5 h-2.5 text-[#1570EF]' />)}{nav.mode === 'agent-chat' && (- <CuteRobote className='w-2.5 h-2.5 text-indigo-600' />+ <CuteRobot className='w-2.5 h-2.5 text-indigo-600' />)}{nav.mode === 'chat' && (<ChatBot className='w-2.5 h-2.5 text-[#1570EF]' />diff --git a/web/app/components/header/tools-nav/index.tsx b/web/app/components/header/tools-nav/index.tsxindex 5184f5e5ce3..096a5522290 100644--- a/web/app/components/header/tools-nav/index.tsx+++ b/web/app/components/header/tools-nav/index.tsx@@ -17,16 +17,16 @@ const ToolsNav = ({}: ToolsNavProps) => {const { t } = useTranslation()const selectedSegment = useSelectedLayoutSegment()- const actived = selectedSegment === 'tools'+ const activated = selectedSegment === 'tools'return (<Link href="/tools" className={classNames(className, 'group',- actived && 'bg-white shadow-md',- actived ? 'text-primary-600' : 'text-gray-500 hover:bg-gray-200',+ activated && 'bg-white shadow-md',+ activated ? 'text-primary-600' : 'text-gray-500 hover:bg-gray-200',)}>{- actived+ activated? <RiHammerFill className='mr-2 w-4 h-4' />: <RiHammerLine className='mr-2 w-4 h-4' />}diff --git a/web/app/components/share/text-generation/index.tsx b/web/app/components/share/text-generation/index.tsxindex dd6efa86fa8..a2f68642428 100644--- a/web/app/components/share/text-generation/index.tsx+++ b/web/app/components/share/text-generation/index.tsx@@ -163,8 +163,8 @@ const TextGeneration: FC<IMainProps> = ({}const allSuccessTaskList = allTaskList.filter(task => task.status === TaskStatus.completed)const allFailedTaskList = allTaskList.filter(task => task.status === TaskStatus.failed)- const allTaskFinished = allTaskList.every(task => task.status === TaskStatus.completed)- const allTaskRuned = allTaskList.every(task => [TaskStatus.completed, TaskStatus.failed].includes(task.status))+ const allTasksFinished = allTaskList.every(task => task.status === TaskStatus.completed)+ const allTasksRun = allTaskList.every(task => [TaskStatus.completed, TaskStatus.failed].includes(task.status))const [batchCompletionRes, doSetBatchCompletionRes] = useState<Record<string, string>>({})const batchCompletionResRef = useRef<Record<string, string>>({})const setBatchCompletionRes = (res: Record<string, string>) => {@@ -286,7 +286,7 @@ const TextGeneration: FC<IMainProps> = ({const handleRunBatch = (data: string[][]) => {if (!checkBatchInputs(data))return- if (!allTaskFinished) {+ if (!allTasksFinished) {notify({ type: 'info', message: t('appDebug.errorMessage.waitForBatchResponse') })return}@@ -318,17 +318,17 @@ const TextGeneration: FC<IMainProps> = ({showResSidebar()}const handleCompleted = (completionRes: string, taskId?: number, isSuccess?: boolean) => {- const allTasklistLatest = getLatestTaskList()+ const allTaskListLatest = getLatestTaskList()const batchCompletionResLatest = getBatchCompletionRes()- const pendingTaskList = allTasklistLatest.filter(task => task.status === TaskStatus.pending)- const hadRunedTaskNum = 1 + allTasklistLatest.filter(task => [TaskStatus.completed, TaskStatus.failed].includes(task.status)).length- const needToAddNextGroupTask = (getCurrGroupNum() !== hadRunedTaskNum) && pendingTaskList.length > 0 && (hadRunedTaskNum % GROUP_SIZE === 0 || (allTasklistLatest.length - hadRunedTaskNum < GROUP_SIZE))+ const pendingTaskList = allTaskListLatest.filter(task => task.status === TaskStatus.pending)+ const runTasksCount = 1 + allTaskListLatest.filter(task => [TaskStatus.completed, TaskStatus.failed].includes(task.status)).length+ const needToAddNextGroupTask = (getCurrGroupNum() !== runTasksCount) && pendingTaskList.length > 0 && (runTasksCount % GROUP_SIZE === 0 || (allTaskListLatest.length - runTasksCount < GROUP_SIZE))// avoid add many task at the same timeif (needToAddNextGroupTask)- setCurrGroupNum(hadRunedTaskNum)+ setCurrGroupNum(runTasksCount)const nextPendingTaskIds = needToAddNextGroupTask ? pendingTaskList.slice(0, GROUP_SIZE).map(item => item.id) : []- const newAllTaskList = allTasklistLatest.map((item) => {+ const newAllTaskList = allTaskListLatest.map((item) => {if (item.id === taskId) {return {...item,@@ -393,7 +393,7 @@ const TextGeneration: FC<IMainProps> = ({})const prompt_variables = userInputsFormToPromptVariables(user_input_form)setPromptConfig({- prompt_template: '', // placeholder for feture+ prompt_template: '', // placeholder for futureprompt_variables,} as PromptConfig)setMoreLikeThisConfig(more_like_this)@@ -587,7 +587,7 @@ const TextGeneration: FC<IMainProps> = ({isRight: true,extra: savedMessages.length > 0? (- <div className='ml-1 flext items-center h-5 px-1.5 rounded-md border border-gray-200 text-gray-500 text-xs font-medium'>+ <div className='ml-1 flex items-center h-5 px-1.5 rounded-md border border-gray-200 text-gray-500 text-xs font-medium'>{savedMessages.length}</div>)@@ -614,7 +614,7 @@ const TextGeneration: FC<IMainProps> = ({<RunBatchvars={promptConfig.prompt_variables}onSend={handleRunBatch}- isAllFinished={allTaskRuned}+ isAllFinished={allTasksRun}/></div>diff --git a/web/app/components/share/text-generation/result/content.tsx b/web/app/components/share/text-generation/result/content.tsxindex 17cce0fae5b..4e39db42c82 100644--- a/web/app/components/share/text-generation/result/content.tsx+++ b/web/app/components/share/text-generation/result/content.tsx@@ -1,14 +1,14 @@import type { FC } from 'react'import React from 'react'import Header from './header'-import type { Feedbacktype } from '@/app/components/base/chat/chat/type'+import type { FeedbackType } from '@/app/components/base/chat/chat/type'import { format } from '@/service/base'export type IResultProps = {content: stringshowFeedback: boolean- feedback: Feedbacktype- onFeedback: (feedback: Feedbacktype) => void+ feedback: FeedbackType+ onFeedback: (feedback: FeedbackType) => void}const Result: FC<IResultProps> = ({content,diff --git a/web/app/components/share/text-generation/result/header.tsx b/web/app/components/share/text-generation/result/header.tsxindex bd5c3171535..0233b098d04 100644--- a/web/app/components/share/text-generation/result/header.tsx+++ b/web/app/components/share/text-generation/result/header.tsx@@ -4,7 +4,7 @@ import React from 'react'import { useTranslation } from 'react-i18next'import { ClipboardDocumentIcon, HandThumbDownIcon, HandThumbUpIcon } from '@heroicons/react/24/outline'import copy from 'copy-to-clipboard'-import type { Feedbacktype } from '@/app/components/base/chat/chat/type'+import type { FeedbackType } from '@/app/components/base/chat/chat/type'import Button from '@/app/components/base/button'import Toast from '@/app/components/base/toast'import Tooltip from '@/app/components/base/tooltip'@@ -12,8 +12,8 @@ import Tooltip from '@/app/components/base/tooltip'type IResultHeaderProps = {result: stringshowFeedback: boolean- feedback: Feedbacktype- onFeedback: (feedback: Feedbacktype) => void+ feedback: FeedbackType+ onFeedback: (feedback: FeedbackType) => void}const Header: FC<IResultHeaderProps> = ({diff --git a/web/app/components/share/text-generation/result/index.tsx b/web/app/components/share/text-generation/result/index.tsxindex caa2f9183ed..021a98d4d3b 100644--- a/web/app/components/share/text-generation/result/index.tsx+++ b/web/app/components/share/text-generation/result/index.tsx@@ -9,7 +9,7 @@ import TextGenerationRes from '@/app/components/app/text-generate/item'import NoData from '@/app/components/share/text-generation/no-data'import Toast from '@/app/components/base/toast'import { sendCompletionMessage, sendWorkflowMessage, updateFeedback } from '@/service/share'-import type { Feedbacktype } from '@/app/components/base/chat/chat/type'+import type { FeedbackType } from '@/app/components/base/chat/chat/type'import Loading from '@/app/components/base/loading'import type { PromptConfig } from '@/models/debug'import type { InstalledApp } from '@/models/explore'@@ -83,23 +83,23 @@ const Result: FC<IResultProps> = ({doSetCompletionRes(res)}const getCompletionRes = () => completionResRef.current- const [workflowProcessData, doSetWorkflowProccessData] = useState<WorkflowProcess>()+ const [workflowProcessData, doSetWorkflowProcessData] = useState<WorkflowProcess>()const workflowProcessDataRef = useRef<WorkflowProcess>()- const setWorkflowProccessData = (data: WorkflowProcess) => {+ const setWorkflowProcessData = (data: WorkflowProcess) => {workflowProcessDataRef.current = data- doSetWorkflowProccessData(data)+ doSetWorkflowProcessData(data)}- const getWorkflowProccessData = () => workflowProcessDataRef.current+ const getWorkflowProcessData = () => workflowProcessDataRef.currentconst { notify } = Toastconst isNoData = !completionResconst [messageId, setMessageId] = useState<string | null>(null)- const [feedback, setFeedback] = useState<Feedbacktype>({+ const [feedback, setFeedback] = useState<FeedbackType>({rating: null,})- const handleFeedback = async (feedback: Feedbacktype) => {+ const handleFeedback = async (feedback: FeedbackType) => {await updateFeedback({ url: `/messages/${messageId}/feedbacks`, body: { rating: feedback.rating } }, isInstalledApp, installedAppInfo?.id)setFeedback(feedback)}@@ -203,7 +203,7 @@ const Result: FC<IResultProps> = ({{onWorkflowStarted: ({ workflow_run_id }) => {tempMessageId = workflow_run_id- setWorkflowProccessData({+ setWorkflowProcessData({status: WorkflowRunningStatus.Running,tracing: [],expand: false,@@ -211,7 +211,7 @@ const Result: FC<IResultProps> = ({})},onIterationStart: ({ data }) => {- setWorkflowProccessData(produce(getWorkflowProccessData()!, (draft) => {+ setWorkflowProcessData(produce(getWorkflowProcessData()!, (draft) => {draft.expand = truedraft.tracing!.push({...data,@@ -224,7 +224,7 @@ const Result: FC<IResultProps> = ({onIterationNext: () => {},onIterationFinish: ({ data }) => {- setWorkflowProccessData(produce(getWorkflowProccessData()!, (draft) => {+ setWorkflowProcessData(produce(getWorkflowProcessData()!, (draft) => {draft.expand = true// const iteration = draft.tracing![draft.tracing!.length - 1]draft.tracing![draft.tracing!.length - 1] = {@@ -238,7 +238,7 @@ const Result: FC<IResultProps> = ({if (isInIteration)return- setWorkflowProccessData(produce(getWorkflowProccessData()!, (draft) => {+ setWorkflowProcessData(produce(getWorkflowProcessData()!, (draft) => {draft.expand = truedraft.tracing!.push({...data,@@ -251,7 +251,7 @@ const Result: FC<IResultProps> = ({if (isInIteration)return- setWorkflowProccessData(produce(getWorkflowProccessData()!, (draft) => {+ setWorkflowProcessData(produce(getWorkflowProcessData()!, (draft) => {const currentIndex = draft.tracing!.findIndex(trace => trace.node_id === data.node_id)if (currentIndex > -1 && draft.tracing) {draft.tracing[currentIndex] = {@@ -269,7 +269,7 @@ const Result: FC<IResultProps> = ({returnif (data.error) {notify({ type: 'error', message: data.error })- setWorkflowProccessData(produce(getWorkflowProccessData()!, (draft) => {+ setWorkflowProcessData(produce(getWorkflowProcessData()!, (draft) => {draft.status = WorkflowRunningStatus.Failed}))setRespondingFalse()@@ -277,7 +277,7 @@ const Result: FC<IResultProps> = ({isEnd = truereturn}- setWorkflowProccessData(produce(getWorkflowProccessData()!, (draft) => {+ setWorkflowProcessData(produce(getWorkflowProcessData()!, (draft) => {draft.status = WorkflowRunningStatus.Succeeded}))if (!data.outputs) {@@ -287,7 +287,7 @@ const Result: FC<IResultProps> = ({setCompletionRes(data.outputs)const isStringOutput = Object.keys(data.outputs).length === 1 && typeof data.outputs[Object.keys(data.outputs)[0]] === 'string'if (isStringOutput) {- setWorkflowProccessData(produce(getWorkflowProccessData()!, (draft) => {+ setWorkflowProcessData(produce(getWorkflowProcessData()!, (draft) => {draft.resultText = data.outputs[Object.keys(data.outputs)[0]]}))}@@ -299,13 +299,13 @@ const Result: FC<IResultProps> = ({},onTextChunk: (params) => {const { data: { text } } = params- setWorkflowProccessData(produce(getWorkflowProccessData()!, (draft) => {+ setWorkflowProcessData(produce(getWorkflowProcessData()!, (draft) => {draft.resultText += text}))},onTextReplace: (params) => {const { data: { text } } = params- setWorkflowProccessData(produce(getWorkflowProccessData()!, (draft) => {+ setWorkflowProcessData(produce(getWorkflowProcessData()!, (draft) => {draft.resultText = text}))},diff --git a/web/app/components/tools/add-tool-modal/category.tsx b/web/app/components/tools/add-tool-modal/category.tsxindex cc2c325410a..a18c30ad547 100644--- a/web/app/components/tools/add-tool-modal/category.tsx+++ b/web/app/components/tools/add-tool-modal/category.tsx@@ -17,7 +17,7 @@ type Props = {const Icon = ({ svgString, active }: { svgString: string; active: boolean }) => {const svgRef = useRef<SVGSVGElement | null>(null)- const SVGParsor = (svg: string) => {+ const SVGParser = (svg: string) => {if (!svg)return nullconst parser = new DOMParser()@@ -25,7 +25,7 @@ const Icon = ({ svgString, active }: { svgString: string; active: boolean }) =>return doc.documentElement}useMount(() => {- const svgElement = SVGParsor(svgString)+ const svgElement = SVGParser(svgString)if (svgRef.current && svgElement)svgRef.current.appendChild(svgElement)})diff --git a/web/app/components/workflow/custom-edge.tsx b/web/app/components/workflow/custom-edge.tsxindex 5e945790d86..68e2ef945e8 100644--- a/web/app/components/workflow/custom-edge.tsx+++ b/web/app/components/workflow/custom-edge.tsx@@ -79,7 +79,7 @@ const CustomEdge = ({id={id}path={edgePath}style={{- stroke: (selected || data?._connectedNodeIsHovering || data?._runned) ? '#2970FF' : '#D0D5DD',+ stroke: (selected || data?._connectedNodeIsHovering || data?._run) ? '#2970FF' : '#D0D5DD',strokeWidth: 2,}}/>diff --git a/web/app/components/workflow/header/view-history.tsx b/web/app/components/workflow/header/view-history.tsxindex 06eebfd329d..a18ddad65df 100644--- a/web/app/components/workflow/header/view-history.tsx+++ b/web/app/components/workflow/header/view-history.tsx@@ -32,7 +32,7 @@ import {} from '@/app/components/base/icons/src/vender/line/time'import { AlertTriangle } from '@/app/components/base/icons/src/vender/line/alertsAndFeedback'import {- fetcChatRunHistory,+ fetchChatRunHistory,fetchWorkflowRunHistory,} from '@/service/workflow'import Loading from '@/app/components/base/loading'@@ -67,7 +67,7 @@ const ViewHistory = ({const historyWorkflowData = useStore(s => s.historyWorkflowData)const { handleBackupDraft } = useWorkflowRun()const { data: runList, isLoading: runListLoading } = useSWR((appDetail && !isChatMode && open) ? `/apps/${appDetail.id}/workflow-runs` : null, fetchWorkflowRunHistory)- const { data: chatList, isLoading: chatListLoading } = useSWR((appDetail && isChatMode && open) ? `/apps/${appDetail.id}/advanced-chat/workflow-runs` : null, fetcChatRunHistory)+ const { data: chatList, isLoading: chatListLoading } = useSWR((appDetail && isChatMode && open) ? `/apps/${appDetail.id}/advanced-chat/workflow-runs` : null, fetchChatRunHistory)const data = isChatMode ? chatList : runListconst isLoading = isChatMode ? chatListLoading : runListLoadingdiff --git a/web/app/components/workflow/hooks/use-edges-interactions.ts b/web/app/components/workflow/hooks/use-edges-interactions.tsindex bc3fb0e8bf0..a97b65134fd 100644--- a/web/app/components/workflow/hooks/use-edges-interactions.ts+++ b/web/app/components/workflow/hooks/use-edges-interactions.ts@@ -155,7 +155,7 @@ export const useEdgesInteractions = () => {const newEdges = produce(edges, (draft) => {draft.forEach((edge) => {- edge.data._runned = false+ edge.data._run = false})})setEdges(newEdges)diff --git a/web/app/components/workflow/hooks/use-workflow-interactions.ts b/web/app/components/workflow/hooks/use-workflow-interactions.tsindex 47b8a30a5a3..b39a3d80144 100644--- a/web/app/components/workflow/hooks/use-workflow-interactions.ts+++ b/web/app/components/workflow/hooks/use-workflow-interactions.ts@@ -10,7 +10,7 @@ import {CUSTOM_NODE, DSL_EXPORT_CHECK,WORKFLOW_DATA_UPDATE,} from '../constants'-import type { Node, WorkflowDataUpdator } from '../types'+import type { Node, WorkflowDataUpdater } from '../types'import { ControlMode } from '../types'import {getLayoutByDagre,@@ -208,7 +208,7 @@ export const useWorkflowUpdate = () => {const workflowStore = useWorkflowStore()const { eventEmitter } = useEventEmitterContextContext()- const handleUpdateWorkflowCanvas = useCallback((payload: WorkflowDataUpdator) => {+ const handleUpdateWorkflowCanvas = useCallback((payload: WorkflowDataUpdater) => {const {nodes,edges,@@ -236,7 +236,7 @@ export const useWorkflowUpdate = () => {} = workflowStore.getState()setIsSyncingWorkflowDraft(true)fetchWorkflowDraft(`/apps/${appId}/workflows/draft`).then((response) => {- handleUpdateWorkflowCanvas(response.graph as WorkflowDataUpdator)+ handleUpdateWorkflowCanvas(response.graph as WorkflowDataUpdater)setSyncWorkflowDraftHash(response.hash)setEnvSecrets((response.environment_variables || []).filter(env => env.value_type === 'secret').reduce((acc, env) => {acc[env.id] = env.valuediff --git a/web/app/components/workflow/hooks/use-workflow-run.ts b/web/app/components/workflow/hooks/use-workflow-run.tsindex 96f6557fe08..a872aee398d 100644--- a/web/app/components/workflow/hooks/use-workflow-run.ts+++ b/web/app/components/workflow/hooks/use-workflow-run.ts@@ -186,7 +186,7 @@ export const useWorkflowRun = () => {draft.forEach((edge) => {edge.data = {...edge.data,- _runned: false,+ _run: false,}})})@@ -292,7 +292,7 @@ export const useWorkflowRun = () => {const edge = draft.find(edge => edge.target === data.node_id && edge.source === prevNodeId)if (edge)- edge.data = { ...edge.data, _runned: true } as any+ edge.data = { ...edge.data, _run: true } as any})setEdges(newEdges)}@@ -398,7 +398,7 @@ export const useWorkflowRun = () => {const edge = draft.find(edge => edge.target === data.node_id && edge.source === prevNodeId)if (edge)- edge.data = { ...edge.data, _runned: true } as any+ edge.data = { ...edge.data, _run: true } as any})setEdges(newEdges)diff --git a/web/app/components/workflow/nodes/_base/components/next-step/line.tsx b/web/app/components/workflow/nodes/_base/components/next-step/line.tsxindex ccf4e8d7308..b06a02c1587 100644--- a/web/app/components/workflow/nodes/_base/components/next-step/line.tsx+++ b/web/app/components/workflow/nodes/_base/components/next-step/line.tsx@@ -20,14 +20,14 @@ const Line = ({d='M0,18 L24,18'strokeWidth={1}fill='none'- className='stroke-divider-soild'+ className='stroke-divider-solid'/><rectx={0}y={16}width={1}height={4}- className='fill-divider-soild-alt'+ className='fill-divider-solid-alt'/></>)@@ -38,7 +38,7 @@ const Line = ({d={`M0,18 Q12,18 12,28 L12,${index * 48 + 18 - 10} Q12,${index * 48 + 18} 24,${index * 48 + 18}`}strokeWidth={1}fill='none'- className='stroke-divider-soild'+ className='stroke-divider-solid'/>)}@@ -47,7 +47,7 @@ const Line = ({y={index * 48 + 18 - 2}width={1}height={4}- className='fill-divider-soild-alt'+ className='fill-divider-solid-alt'/></g>))diff --git a/web/app/components/workflow/nodes/_base/hooks/use-resize-panel.ts b/web/app/components/workflow/nodes/_base/hooks/use-resize-panel.tsindex 1a521cd58fc..f2259a02cfe 100644--- a/web/app/components/workflow/nodes/_base/hooks/use-resize-panel.ts+++ b/web/app/components/workflow/nodes/_base/hooks/use-resize-panel.ts@@ -5,7 +5,7 @@ import {useState,} from 'react'-export type UseResizePanelPrarams = {+export type UseResizePanelParams = {direction?: 'horizontal' | 'vertical' | 'both'triggerDirection?: 'top' | 'right' | 'bottom' | 'left' | 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'minWidth?: number@@ -15,7 +15,7 @@ export type UseResizePanelPrarams = {onResized?: (width: number, height: number) => voidonResize?: (width: number, height: number) => void}-export const useResizePanel = (params?: UseResizePanelPrarams) => {+export const useResizePanel = (params?: UseResizePanelParams) => {const {direction = 'both',triggerDirection = 'bottom-right',diff --git a/web/app/components/workflow/nodes/llm/default.ts b/web/app/components/workflow/nodes/llm/default.tsindex 803add6f00e..d7597942e52 100644--- a/web/app/components/workflow/nodes/llm/default.ts+++ b/web/app/components/workflow/nodes/llm/default.ts@@ -44,7 +44,7 @@ const nodeDefault: NodeDefault<LLMNodeType> = {if (!errorMessages && !payload.memory) {const isChatModel = payload.model.mode === 'chat'- const isPromptyEmpty = isChatModel+ const isPromptEmpty = isChatModel? !(payload.prompt_template as PromptItem[]).some((t) => {if (t.edition_type === EditionType.jinja2)return t.jinja2_text !== ''@@ -52,7 +52,7 @@ const nodeDefault: NodeDefault<LLMNodeType> = {return t.text !== ''}): ((payload.prompt_template as PromptItem).edition_type === EditionType.jinja2 ? (payload.prompt_template as PromptItem).jinja2_text === '' : (payload.prompt_template as PromptItem).text === '')- if (isPromptyEmpty)+ if (isPromptEmpty)errorMessages = t(`${i18nPrefix}.fieldRequired`, { field: t('workflow.nodes.llm.prompt') })}diff --git a/web/app/components/workflow/panel/record.tsx b/web/app/components/workflow/panel/record.tsxindex 079dd2cc86b..d79f1a94392 100644--- a/web/app/components/workflow/panel/record.tsx+++ b/web/app/components/workflow/panel/record.tsx@@ -1,5 +1,5 @@import { memo, useCallback } from 'react'-import type { WorkflowDataUpdator } from '../types'+import type { WorkflowDataUpdater } from '../types'import Run from '../run'import { useStore } from '../store'import { useWorkflowUpdate } from '../hooks'@@ -9,7 +9,7 @@ const Record = () => {const { handleUpdateWorkflowCanvas } = useWorkflowUpdate()const handleResultCallback = useCallback((res: any) => {- const graph: WorkflowDataUpdator = res.graph+ const graph: WorkflowDataUpdater = res.graphhandleUpdateWorkflowCanvas({nodes: graph.nodes,edges: graph.edges,diff --git a/web/app/components/workflow/run/index.tsx b/web/app/components/workflow/run/index.tsxindex 702ce06e1ce..b9b77fc4a3b 100644--- a/web/app/components/workflow/run/index.tsx+++ b/web/app/components/workflow/run/index.tsx@@ -134,12 +134,12 @@ const RunPanel: FC<RunProps> = ({ hideResult, activeTab = 'RESULT', runID, getRegetData(appDetail.id, runID)}, [appDetail, runID])- const [height, setHieght] = useState(0)+ const [height, setHeight] = useState(0)const ref = useRef<HTMLDivElement>(null)const adjustResultHeight = () => {if (ref.current)- setHieght(ref.current?.clientHeight - 16 - 16 - 2 - 1)+ setHeight(ref.current?.clientHeight - 16 - 16 - 2 - 1)}useEffect(() => {@@ -197,7 +197,7 @@ const RunPanel: FC<RunProps> = ({ hideResult, activeTab = 'RESULT', runID, getReonClick={() => switchTab('TRACING')}>{t('runLog.tracing')}</div></div>- {/* panel detal */}+ {/* panel detail */}<div ref={ref} className={cn('grow bg-white h-0 overflow-y-auto rounded-b-2xl', currentTab !== 'DETAIL' && '!bg-gray-50')}>{loading && (<div className='flex h-full items-center justify-center bg-white'>diff --git a/web/app/components/workflow/types.ts b/web/app/components/workflow/types.tsindex 034376fed58..12957aa0dd0 100644--- a/web/app/components/workflow/types.ts+++ b/web/app/components/workflow/types.ts@@ -69,7 +69,7 @@ export type CommonEdgeType = {_hovering?: boolean_connectedNodeIsHovering?: boolean_connectedNodeIsSelected?: boolean- _runned?: boolean+ _run?: boolean_isBundled?: booleanisInIteration?: booleaniteration_id?: string@@ -86,7 +86,7 @@ export type NodePanelProps<T> = {}export type Edge = ReactFlowEdge<CommonEdgeType>-export type WorkflowDataUpdator = {+export type WorkflowDataUpdater = {nodes: Node[]edges: Edge[]viewport: Viewportdiff --git a/web/app/components/workflow/utils.ts b/web/app/components/workflow/utils.tsindex 0d07b2e568d..e73485f5462 100644--- a/web/app/components/workflow/utils.ts+++ b/web/app/components/workflow/utils.ts@@ -34,18 +34,18 @@ const WHITE = 'WHITE'const GRAY = 'GRAY'const BLACK = 'BLACK'-const isCyclicUtil = (nodeId: string, color: Record<string, string>, adjaList: Record<string, string[]>, stack: string[]) => {+const isCyclicUtil = (nodeId: string, color: Record<string, string>, adjList: Record<string, string[]>, stack: string[]) => {color[nodeId] = GRAYstack.push(nodeId)- for (let i = 0; i < adjaList[nodeId].length; ++i) {- const childId = adjaList[nodeId][i]+ for (let i = 0; i < adjList[nodeId].length; ++i) {+ const childId = adjList[nodeId][i]if (color[childId] === GRAY) {stack.push(childId)return true}- if (color[childId] === WHITE && isCyclicUtil(childId, color, adjaList, stack))+ if (color[childId] === WHITE && isCyclicUtil(childId, color, adjList, stack))return true}color[nodeId] = BLACK@@ -55,21 +55,21 @@ const isCyclicUtil = (nodeId: string, color: Record<string, string>, adjaList: R}const getCycleEdges = (nodes: Node[], edges: Edge[]) => {- const adjaList: Record<string, string[]> = {}+ const adjList: Record<string, string[]> = {}const color: Record<string, string> = {}const stack: string[] = []for (const node of nodes) {color[node.id] = WHITE- adjaList[node.id] = []+ adjList[node.id] = []}for (const edge of edges)- adjaList[edge.source]?.push(edge.target)+ adjList[edge.source]?.push(edge.target)for (let i = 0; i < nodes.length; i++) {if (color[nodes[i].id] === WHITE)- isCyclicUtil(nodes[i].id, color, adjaList, stack)+ isCyclicUtil(nodes[i].id, color, adjList, stack)}const cycleEdges = []diff --git a/web/app/layout.tsx b/web/app/layout.tsxindex 9acc131029c..008fdefa0b2 100644--- a/web/app/layout.tsx+++ b/web/app/layout.tsx@@ -1,6 +1,6 @@import type { Viewport } from 'next'import I18nServer from './components/i18n-server'-import BrowerInitor from './components/browser-initor'+import BrowserInitor from './components/browser-initor'import SentryInitor from './components/sentry-initor'import Topbar from './components/base/topbar'import { getLocaleOnServer } from '@/i18n/server'@@ -45,11 +45,11 @@ const LocaleLayout = ({data-public-site-about={process.env.NEXT_PUBLIC_SITE_ABOUT}><Topbar />- <BrowerInitor>+ <BrowserInitor><SentryInitor><I18nServer>{children}</I18nServer></SentryInitor>- </BrowerInitor>+ </BrowserInitor></body></html>)diff --git a/web/config/index.ts b/web/config/index.tsindex bb100473b14..71edf8f939f 100644--- a/web/config/index.ts+++ b/web/config/index.ts@@ -103,16 +103,16 @@ export const DEFAULT_PARAGRAPH_VALUE_MAX_LEN = 1000export const zhRegex = /^[\u4E00-\u9FA5]$/mexport const emojiRegex = /^[\uD800-\uDBFF][\uDC00-\uDFFF]$/mexport const emailRegex = /^[\w.!#$%&'*+\-/=?^{|}~]+@([\w-]+\.)+[\w-]{2,}$/m-const MAX_ZN_VAR_NAME_LENGHT = 8-const MAX_EN_VAR_VALUE_LENGHT = 30+const MAX_ZN_VAR_NAME_LENGTH = 8+const MAX_EN_VAR_VALUE_LENGTH = 30export const getMaxVarNameLength = (value: string) => {if (zhRegex.test(value))- return MAX_ZN_VAR_NAME_LENGHT+ return MAX_ZN_VAR_NAME_LENGTH- return MAX_EN_VAR_VALUE_LENGHT+ return MAX_EN_VAR_VALUE_LENGTH}-export const MAX_VAR_KEY_LENGHT = 30+export const MAX_VAR_KEY_LENGTH = 30export const MAX_PROMPT_MESSAGE_LENGTH = 10diff --git a/web/hooks/use-moderate.ts b/web/hooks/use-moderate.tsindex 0e2908ff668..11b078fbd9c 100644--- a/web/hooks/use-moderate.ts+++ b/web/hooks/use-moderate.ts@@ -13,14 +13,14 @@ export const useModerate = (content: string,stop: boolean,moderationService: (text: string) => ReturnType<ModerationService>,- seperateLength = 50,+ separateLength = 50,) => {const moderatedContentMap = useRef<Map<number, string>>(new Map())const moderatingIndex = useRef<number[]>([])const [contentArr, setContentArr] = useState<string[]>([])const handleModerate = () => {- const stringArr = splitStringByLength(content, seperateLength)+ const stringArr = splitStringByLength(content, separateLength)const lastIndex = stringArr.length - 1stringArr.forEach((item, index) => {diff --git a/web/i18n/de-DE/dataset-creation.ts b/web/i18n/de-DE/dataset-creation.tsindex 784a802e51a..8b27395049e 100644--- a/web/i18n/de-DE/dataset-creation.ts+++ b/web/i18n/de-DE/dataset-creation.ts@@ -45,7 +45,7 @@ const translation = {input: 'Wissensname',placeholder: 'Bitte eingeben',nameNotEmpty: 'Name darf nicht leer sein',- nameLengthInvaild: 'Name muss zwischen 1 bis 40 Zeichen lang sein',+ nameLengthInvalid: 'Name muss zwischen 1 bis 40 Zeichen lang sein',cancelButton: 'Abbrechen',confirmButton: 'Erstellen',failed: 'Erstellung fehlgeschlagen',diff --git a/web/i18n/en-US/dataset-creation.ts b/web/i18n/en-US/dataset-creation.tsindex 1e4f1aac229..40463593f91 100644--- a/web/i18n/en-US/dataset-creation.ts+++ b/web/i18n/en-US/dataset-creation.ts@@ -50,7 +50,7 @@ const translation = {input: 'Knowledge name',placeholder: 'Please input',nameNotEmpty: 'Name cannot be empty',- nameLengthInvaild: 'Name must be between 1 to 40 characters',+ nameLengthInvalid: 'Name must be between 1 to 40 characters',cancelButton: 'Cancel',confirmButton: 'Create',failed: 'Creation failed',diff --git a/web/i18n/es-ES/dataset-creation.ts b/web/i18n/es-ES/dataset-creation.tsindex d2f7df36a7e..132c9cbb9b8 100644--- a/web/i18n/es-ES/dataset-creation.ts+++ b/web/i18n/es-ES/dataset-creation.ts@@ -50,7 +50,7 @@ const translation = {input: 'Nombre del conocimiento',placeholder: 'Por favor ingresa',nameNotEmpty: 'El nombre no puede estar vacío',- nameLengthInvaild: 'El nombre debe tener entre 1 y 40 caracteres',+ nameLengthInvalid: 'El nombre debe tener entre 1 y 40 caracteres',cancelButton: 'Cancelar',confirmButton: 'Crear',failed: 'Error al crear',diff --git a/web/i18n/fa-IR/dataset-creation.ts b/web/i18n/fa-IR/dataset-creation.tsindex 723d470ab11..e6e6ad5bfb4 100644--- a/web/i18n/fa-IR/dataset-creation.ts+++ b/web/i18n/fa-IR/dataset-creation.ts@@ -50,7 +50,7 @@ const translation = {input: 'نام دانش',placeholder: 'لطفاً وارد کنید',nameNotEmpty: 'نام نمیتواند خالی باشد',- nameLengthInvaild: 'نام باید بین 1 تا 40 کاراکتر باشد',+ nameLengthInvalid: 'نام باید بین 1 تا 40 کاراکتر باشد',cancelButton: 'لغو',confirmButton: 'ایجاد',failed: 'ایجاد ناموفق بود',diff --git a/web/i18n/fr-FR/dataset-creation.ts b/web/i18n/fr-FR/dataset-creation.tsindex 5d76983080d..c08a3e5731b 100644--- a/web/i18n/fr-FR/dataset-creation.ts+++ b/web/i18n/fr-FR/dataset-creation.ts@@ -45,7 +45,7 @@ const translation = {input: 'Nom de la connaissance',placeholder: 'Veuillez entrer',nameNotEmpty: 'Le nom ne peut pas être vide',- nameLengthInvaild: 'Le nom doit comporter entre 1 et 40 caractères.',+ nameLengthInvalid: 'Le nom doit comporter entre 1 et 40 caractères.',cancelButton: 'Annuler',confirmButton: 'Créer',failed: 'Création échouée',diff --git a/web/i18n/hi-IN/dataset-creation.ts b/web/i18n/hi-IN/dataset-creation.tsindex 30bd3f2052f..0fa71acf4aa 100644--- a/web/i18n/hi-IN/dataset-creation.ts+++ b/web/i18n/hi-IN/dataset-creation.ts@@ -51,7 +51,7 @@ const translation = {input: 'ज्ञान का नाम',placeholder: 'कृपया दर्ज करें',nameNotEmpty: 'नाम खाली नहीं हो सकता',- nameLengthInvaild: 'नाम 1 से 40 वर्णों के बीच होना चाहिए',+ nameLengthInvalid: 'नाम 1 से 40 वर्णों के बीच होना चाहिए',cancelButton: 'रद्द करें',confirmButton: 'बनाएं',failed: 'बनाना विफल रहा',diff --git a/web/i18n/it-IT/dataset-creation.ts b/web/i18n/it-IT/dataset-creation.tsindex 917bc2d6f50..1629776bf3c 100644--- a/web/i18n/it-IT/dataset-creation.ts+++ b/web/i18n/it-IT/dataset-creation.ts@@ -52,7 +52,7 @@ const translation = {input: 'Nome della Conoscenza',placeholder: 'Per favore inserisci',nameNotEmpty: 'Il nome non può essere vuoto',- nameLengthInvaild: 'Il nome deve essere tra 1 e 40 caratteri',+ nameLengthInvalid: 'Il nome deve essere tra 1 e 40 caratteri',cancelButton: 'Annulla',confirmButton: 'Crea',failed: 'Creazione fallita',diff --git a/web/i18n/ja-JP/dataset-creation.ts b/web/i18n/ja-JP/dataset-creation.tsindex 8ba47563994..e6d204840a5 100644--- a/web/i18n/ja-JP/dataset-creation.ts+++ b/web/i18n/ja-JP/dataset-creation.ts@@ -50,7 +50,7 @@ const translation = {input: 'ナレッジ名',placeholder: '入力してください',nameNotEmpty: '名前は空にできません',- nameLengthInvaild: '名前は1〜40文字である必要があります',+ nameLengthInvalid: '名前は1〜40文字である必要があります',cancelButton: 'キャンセル',confirmButton: '作成',failed: '作成に失敗しました',diff --git a/web/i18n/ko-KR/dataset-creation.ts b/web/i18n/ko-KR/dataset-creation.tsindex 4838ac4df57..e8851acd2fd 100644--- a/web/i18n/ko-KR/dataset-creation.ts+++ b/web/i18n/ko-KR/dataset-creation.ts@@ -45,7 +45,7 @@ const translation = {input: '지식 이름',placeholder: '입력하세요',nameNotEmpty: '이름은 비워둘 수 없습니다',- nameLengthInvaild: '이름은 1~40자여야 합니다',+ nameLengthInvalid: '이름은 1~40자여야 합니다',cancelButton: '취소',confirmButton: '생성',failed: '생성에 실패했습니다',diff --git a/web/i18n/pl-PL/dataset-creation.ts b/web/i18n/pl-PL/dataset-creation.tsindex 982d7c308bd..64e50c6b33a 100644--- a/web/i18n/pl-PL/dataset-creation.ts+++ b/web/i18n/pl-PL/dataset-creation.ts@@ -46,7 +46,7 @@ const translation = {input: 'Nazwa Wiedzy',placeholder: 'Proszę wpisz',nameNotEmpty: 'Nazwa nie może być pusta',- nameLengthInvaild: 'Nazwa musi zawierać od 1 do 40 znaków',+ nameLengthInvalid: 'Nazwa musi zawierać od 1 do 40 znaków',cancelButton: 'Anuluj',confirmButton: 'Utwórz',failed: 'Utworzenie nie powiodło się',diff --git a/web/i18n/pt-BR/dataset-creation.ts b/web/i18n/pt-BR/dataset-creation.tsindex 0b08de48831..4ab78a50c77 100644--- a/web/i18n/pt-BR/dataset-creation.ts+++ b/web/i18n/pt-BR/dataset-creation.ts@@ -45,7 +45,7 @@ const translation = {input: 'Nome do Conhecimento',placeholder: 'Por favor, insira',nameNotEmpty: 'O nome não pode estar vazio',- nameLengthInvaild: 'O nome deve ter entre 1 e 40 caracteres',+ nameLengthInvalid: 'O nome deve ter entre 1 e 40 caracteres',cancelButton: 'Cancelar',confirmButton: 'Criar',failed: 'Falha na criação',diff --git a/web/i18n/ro-RO/dataset-creation.ts b/web/i18n/ro-RO/dataset-creation.tsindex 117ad412f44..efe3bb246cc 100644--- a/web/i18n/ro-RO/dataset-creation.ts+++ b/web/i18n/ro-RO/dataset-creation.ts@@ -45,7 +45,7 @@ const translation = {input: 'Numele Cunoștinței',placeholder: 'Vă rugăm să introduceți',nameNotEmpty: 'Numele nu poate fi gol',- nameLengthInvaild: 'Numele trebuie să fie între 1 și 40 de caractere',+ nameLengthInvalid: 'Numele trebuie să fie între 1 și 40 de caractere',cancelButton: 'Anulează',confirmButton: 'Creează',failed: 'Crearea a eșuat',diff --git a/web/i18n/ru-RU/dataset-creation.ts b/web/i18n/ru-RU/dataset-creation.tsindex 2b1ef37f24d..c4dce774d81 100644--- a/web/i18n/ru-RU/dataset-creation.ts+++ b/web/i18n/ru-RU/dataset-creation.ts@@ -50,7 +50,7 @@ const translation = {input: 'Название базы знаний',placeholder: 'Пожалуйста, введите',nameNotEmpty: 'Название не может быть пустым',- nameLengthInvaild: 'Название должно быть от 1 до 40 символов',+ nameLengthInvalid: 'Название должно быть от 1 до 40 символов',cancelButton: 'Отмена',confirmButton: 'Создать',failed: 'Ошибка создания',diff --git a/web/i18n/tr-TR/dataset-creation.ts b/web/i18n/tr-TR/dataset-creation.tsindex 076dcd33553..b26608c39ff 100644--- a/web/i18n/tr-TR/dataset-creation.ts+++ b/web/i18n/tr-TR/dataset-creation.ts@@ -50,7 +50,7 @@ const translation = {input: 'Bilgi adı',placeholder: 'Lütfen girin',nameNotEmpty: 'Ad boş olamaz',- nameLengthInvaild: 'Ad 1 ile 40 karakter arasında olmalıdır',+ nameLengthInvalid: 'Ad 1 ile 40 karakter arasında olmalıdır',cancelButton: 'İptal',confirmButton: 'Oluştur',failed: 'Oluşturma başarısız',diff --git a/web/i18n/uk-UA/dataset-creation.ts b/web/i18n/uk-UA/dataset-creation.tsindex ecb4dafa61c..e4a38f41f46 100644--- a/web/i18n/uk-UA/dataset-creation.ts+++ b/web/i18n/uk-UA/dataset-creation.ts@@ -45,7 +45,7 @@ const translation = {input: 'Назва Знань',placeholder: 'Введіть, будь ласка',nameNotEmpty: 'Ім’я не може бути порожнім',- nameLengthInvaild: 'Ім’я має бути від 1 до 40 символів',+ nameLengthInvalid: 'Ім’я має бути від 1 до 40 символів',cancelButton: 'Скасувати',confirmButton: 'Створити',failed: 'Створення не вдалося',diff --git a/web/i18n/vi-VN/dataset-creation.ts b/web/i18n/vi-VN/dataset-creation.tsindex 35fa03b5675..da690202873 100644--- a/web/i18n/vi-VN/dataset-creation.ts+++ b/web/i18n/vi-VN/dataset-creation.ts@@ -45,7 +45,7 @@ const translation = {input: 'Tên Kiến thức',placeholder: 'Vui lòng nhập',nameNotEmpty: 'Tên không thể để trống',- nameLengthInvaild: 'Tên phải từ 1 đến 40 ký tự',+ nameLengthInvalid: 'Tên phải từ 1 đến 40 ký tự',cancelButton: 'Hủy',confirmButton: 'Tạo',failed: 'Tạo thất bại',diff --git a/web/i18n/zh-Hans/dataset-creation.ts b/web/i18n/zh-Hans/dataset-creation.tsindex 58e5fd1c0ff..47a15921f7c 100644--- a/web/i18n/zh-Hans/dataset-creation.ts+++ b/web/i18n/zh-Hans/dataset-creation.ts@@ -50,7 +50,7 @@ const translation = {input: '知识库名称',placeholder: '请输入知识库名称',nameNotEmpty: '名称不能为空',- nameLengthInvaild: '名称长度不能超过 40 个字符',+ nameLengthInvalid: '名称长度不能超过 40 个字符',cancelButton: '取消',confirmButton: '创建',failed: '创建失败',diff --git a/web/i18n/zh-Hant/dataset-creation.ts b/web/i18n/zh-Hant/dataset-creation.tsindex 5f6c42aab8d..fd810d41c16 100644--- a/web/i18n/zh-Hant/dataset-creation.ts+++ b/web/i18n/zh-Hant/dataset-creation.ts@@ -45,7 +45,7 @@ const translation = {input: '知識庫名稱',placeholder: '請輸入知識庫名稱',nameNotEmpty: '名稱不能為空',- nameLengthInvaild: '名稱長度不能超過 40 個字元',+ nameLengthInvalid: '名稱長度不能超過 40 個字元',cancelButton: '取消',confirmButton: '建立',failed: '建立失敗',diff --git a/web/models/app.ts b/web/models/app.tsindex 82efcd5fa09..e550b82ab6e 100644--- a/web/models/app.ts+++ b/web/models/app.ts@@ -4,7 +4,7 @@ import type { App, AppSSO, AppTemplate, SiteConfig } from '@/types/app'/* export type App = {id: stringname: string- decription: string+ description: stringmode: AppModeenable_site: booleanenable_api: boolean@@ -103,15 +103,15 @@ export type AppTokenCostsResponse = {export type UpdateAppModelConfigResponse = { result: string }-export type ApikeyItemResponse = {+export type ApiKeyItemResponse = {id: stringtoken: stringlast_used_at: stringcreated_at: string}-export type ApikeysListResponse = {- data: ApikeyItemResponse[]+export type ApiKeysListResponse = {+ data: ApiKeyItemResponse[]}export type CreateApiKeyResponse = {diff --git a/web/models/datasets.ts b/web/models/datasets.tsindex f35de582545..23d1fe6136b 100644--- a/web/models/datasets.ts+++ b/web/models/datasets.ts@@ -439,7 +439,7 @@ export type RelatedAppResponse = {total: number}-export type SegmentUpdator = {+export type SegmentUpdater = {content: stringanswer?: stringkeywords?: string[]diff --git a/web/models/debug.ts b/web/models/debug.tsindex 2b2af800651..565798e5989 100644--- a/web/models/debug.ts+++ b/web/models/debug.ts@@ -215,7 +215,7 @@ export type LogSessionListResponse = {query: string // user's query questionmessage: string // prompt send to LLManswer: string- creat_at: string+ created_at: string}[]total: numberpage: number@@ -224,7 +224,7 @@ export type LogSessionListResponse = {// log session detail and debugexport type LogSessionDetailResponse = {id: string- cnversation_id: string+ conversation_id: stringmodel_provider: stringquery: stringinputs: Record<string, string | number | object>[]diff --git a/web/models/log.ts b/web/models/log.tsindex 6f8ebb1a78f..8da1c4cf4e8 100644--- a/web/models/log.ts+++ b/web/models/log.ts@@ -6,7 +6,7 @@ import type {} from '@/app/components/workflow/types'import type { Metadata } from '@/app/components/base/chat/chat/type'-// Log type contains key:string conversation_id:string created_at:string quesiton:string answer:string+// Log type contains key:string conversation_id:string created_at:string question:string answer:stringexport type Conversation = {id: stringkey: stringdiff --git a/web/public/logo/logo-embeded-chat-avatar.png b/web/public/logo/logo-embedded-chat-avatar.pngsimilarity index 100%rename from web/public/logo/logo-embeded-chat-avatar.pngrename to web/public/logo/logo-embedded-chat-avatar.pngdiff --git a/web/public/logo/logo-embeded-chat-header.png b/web/public/logo/logo-embedded-chat-header.pngsimilarity index 100%rename from web/public/logo/logo-embeded-chat-header.pngrename to web/public/logo/logo-embedded-chat-header.pngdiff --git a/web/service/apps.ts b/web/service/apps.tsindex 3cda5514745..9dd3b72ade3 100644--- a/web/service/apps.ts+++ b/web/service/apps.ts@@ -1,6 +1,6 @@import type { Fetcher } from 'swr'import { del, get, patch, post, put } from './base'-import type { ApikeysListResponse, AppDailyConversationsResponse, AppDailyEndUsersResponse, AppDailyMessagesResponse, AppDetailResponse, AppListResponse, AppSSOResponse, AppStatisticsResponse, AppTemplatesResponse, AppTokenCostsResponse, AppVoicesListResponse, CreateApiKeyResponse, GenerationIntroductionResponse, TracingConfig, TracingStatus, UpdateAppModelConfigResponse, UpdateAppSiteCodeResponse, UpdateOpenAIKeyResponse, ValidateOpenAIKeyResponse, WorkflowDailyConversationsResponse } from '@/models/app'+import type { ApiKeysListResponse, AppDailyConversationsResponse, AppDailyEndUsersResponse, AppDailyMessagesResponse, AppDetailResponse, AppListResponse, AppSSOResponse, AppStatisticsResponse, AppTemplatesResponse, AppTokenCostsResponse, AppVoicesListResponse, CreateApiKeyResponse, GenerationIntroductionResponse, TracingConfig, TracingStatus, UpdateAppModelConfigResponse, UpdateAppSiteCodeResponse, UpdateOpenAIKeyResponse, ValidateOpenAIKeyResponse, WorkflowDailyConversationsResponse } from '@/models/app'import type { CommonResponse } from '@/models/common'import type { AppIconType, AppMode, ModelConfig } from '@/types/app'import type { TracingProvider } from '@/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/type'@@ -110,8 +110,8 @@ export const fetchAppListNoMock: Fetcher<AppListResponse, { url: string; params:return get<AppListResponse>(url, params)}-export const fetchApiKeysList: Fetcher<ApikeysListResponse, { url: string; params: Record<string, any> }> = ({ url, params }) => {- return get<ApikeysListResponse>(url, params)+export const fetchApiKeysList: Fetcher<ApiKeysListResponse, { url: string; params: Record<string, any> }> = ({ url, params }) => {+ return get<ApiKeysListResponse>(url, params)}export const delApikey: Fetcher<CommonResponse, { url: string; params: Record<string, any> }> = ({ url, params }) => {diff --git a/web/service/base.ts b/web/service/base.tsindex bda83f1c8eb..8f1b22bc1b3 100644--- a/web/service/base.ts+++ b/web/service/base.ts@@ -4,7 +4,7 @@ import type { AnnotationReply, MessageEnd, MessageReplace, ThoughtItem } from '@import type { VisionFile } from '@/types/app'import type {IterationFinishedResponse,- IterationNextedResponse,+ IterationNextResponse,IterationStartedResponse,NodeFinishedResponse,NodeStartedResponse,@@ -57,7 +57,7 @@ export type IOnWorkflowFinished = (workflowFinished: WorkflowFinishedResponse) =export type IOnNodeStarted = (nodeStarted: NodeStartedResponse) => voidexport type IOnNodeFinished = (nodeFinished: NodeFinishedResponse) => voidexport type IOnIterationStarted = (workflowStarted: IterationStartedResponse) => void-export type IOnIterationNexted = (workflowStarted: IterationNextedResponse) => void+export type IOnIterationNext = (workflowStarted: IterationNextResponse) => voidexport type IOnIterationFinished = (workflowFinished: IterationFinishedResponse) => voidexport type IOnTextChunk = (textChunk: TextChunkResponse) => voidexport type IOnTTSChunk = (messageId: string, audioStr: string, audioType?: string) => void@@ -84,7 +84,7 @@ export type IOtherOptions = {onNodeStarted?: IOnNodeStartedonNodeFinished?: IOnNodeFinishedonIterationStart?: IOnIterationStarted- onIterationNext?: IOnIterationNexted+ onIterationNext?: IOnIterationNextonIterationFinish?: IOnIterationFinishedonTextChunk?: IOnTextChunkonTTSChunk?: IOnTTSChunk@@ -137,7 +137,7 @@ const handleStream = (onNodeStarted?: IOnNodeStarted,onNodeFinished?: IOnNodeFinished,onIterationStart?: IOnIterationStarted,- onIterationNext?: IOnIterationNexted,+ onIterationNext?: IOnIterationNext,onIterationFinish?: IOnIterationFinished,onTextChunk?: IOnTextChunk,onTTSChunk?: IOnTTSChunk,@@ -187,7 +187,7 @@ const handleStream = (return}if (bufferObj.event === 'message' || bufferObj.event === 'agent_message') {- // can not use format here. Because message is splited.+ // can not use format here. Because message is splitted.onData(unicodeToChar(bufferObj.answer), isFirstMessage, {conversationId: bufferObj.conversation_id,taskId: bufferObj.task_id,@@ -223,7 +223,7 @@ const handleStream = (onIterationStart?.(bufferObj as IterationStartedResponse)}else if (bufferObj.event === 'iteration_next') {- onIterationNext?.(bufferObj as IterationNextedResponse)+ onIterationNext?.(bufferObj as IterationNextResponse)}else if (bufferObj.event === 'iteration_completed') {onIterationFinish?.(bufferObj as IterationFinishedResponse)diff --git a/web/service/datasets.ts b/web/service/datasets.tsindex c861a73c371..4ca269a7d6e 100644--- a/web/service/datasets.ts+++ b/web/service/datasets.ts@@ -18,14 +18,14 @@ import type {ProcessRuleResponse,RelatedAppResponse,SegmentDetailModel,- SegmentUpdator,+ SegmentUpdater,SegmentsQuery,SegmentsResponse,createDocumentResponse,} from '@/models/datasets'import type { CommonResponse, DataSourceNotionWorkspace } from '@/models/common'import type {- ApikeysListResponse,+ ApiKeysListResponse,CreateApiKeyResponse,} from '@/models/app'import type { RetrievalConfig } from '@/types/app'@@ -184,11 +184,11 @@ export const disableSegment: Fetcher<CommonResponse, { datasetId: string; segmenreturn patch<CommonResponse>(`/datasets/${datasetId}/segments/${segmentId}/disable`)}-export const updateSegment: Fetcher<{ data: SegmentDetailModel; doc_form: string }, { datasetId: string; documentId: string; segmentId: string; body: SegmentUpdator }> = ({ datasetId, documentId, segmentId, body }) => {+export const updateSegment: Fetcher<{ data: SegmentDetailModel; doc_form: string }, { datasetId: string; documentId: string; segmentId: string; body: SegmentUpdater }> = ({ datasetId, documentId, segmentId, body }) => {return patch<{ data: SegmentDetailModel; doc_form: string }>(`/datasets/${datasetId}/documents/${documentId}/segments/${segmentId}`, { body })}-export const addSegment: Fetcher<{ data: SegmentDetailModel; doc_form: string }, { datasetId: string; documentId: string; body: SegmentUpdator }> = ({ datasetId, documentId, body }) => {+export const addSegment: Fetcher<{ data: SegmentDetailModel; doc_form: string }, { datasetId: string; documentId: string; body: SegmentUpdater }> = ({ datasetId, documentId, body }) => {return post<{ data: SegmentDetailModel; doc_form: string }>(`/datasets/${datasetId}/documents/${documentId}/segment`, { body })}@@ -221,8 +221,8 @@ export const fetchNotionPagePreview: Fetcher<{ content: string }, { workspaceID:return get<{ content: string }>(`notion/workspaces/${workspaceID}/pages/${pageID}/${pageType}/preview`)}-export const fetchApiKeysList: Fetcher<ApikeysListResponse, { url: string; params: Record<string, any> }> = ({ url, params }) => {- return get<ApikeysListResponse>(url, params)+export const fetchApiKeysList: Fetcher<ApiKeysListResponse, { url: string; params: Record<string, any> }> = ({ url, params }) => {+ return get<ApiKeysListResponse>(url, params)}export const delApikey: Fetcher<CommonResponse, { url: string; params: Record<string, any> }> = ({ url, params }) => {diff --git a/web/service/debug.ts b/web/service/debug.tsindex 8e90fe565f2..38068cad6e5 100644--- a/web/service/debug.ts+++ b/web/service/debug.ts@@ -96,7 +96,7 @@ export const fetchPromptTemplate = ({})}-export const fetchTextGenerationMessge = ({+export const fetchTextGenerationMessage = ({appId,messageId,}: { appId: string; messageId: string }) => {diff --git a/web/service/share.ts b/web/service/share.tsindex f5a695f6c31..0e46e30d01f 100644--- a/web/service/share.ts+++ b/web/service/share.ts@@ -1,9 +1,9 @@-import type { IOnCompleted, IOnData, IOnError, IOnFile, IOnIterationFinished, IOnIterationNexted, IOnIterationStarted, IOnMessageEnd, IOnMessageReplace, IOnNodeFinished, IOnNodeStarted, IOnTTSChunk, IOnTTSEnd, IOnTextChunk, IOnTextReplace, IOnThought, IOnWorkflowFinished, IOnWorkflowStarted } from './base'+import type { IOnCompleted, IOnData, IOnError, IOnFile, IOnIterationFinished, IOnIterationNext, IOnIterationStarted, IOnMessageEnd, IOnMessageReplace, IOnNodeFinished, IOnNodeStarted, IOnTTSChunk, IOnTTSEnd, IOnTextChunk, IOnTextReplace, IOnThought, IOnWorkflowFinished, IOnWorkflowStarted } from './base'import {del as consoleDel, get as consoleGet, patch as consolePatch, post as consolePost,delPublic as del, getPublic as get, patchPublic as patch, postPublic as post, ssePost,} from './base'-import type { Feedbacktype } from '@/app/components/base/chat/chat/type'+import type { FeedbackType } from '@/app/components/base/chat/chat/type'import type {AppConversationData,AppData,@@ -86,7 +86,7 @@ export const sendWorkflowMessage = async (onNodeFinished: IOnNodeFinishedonWorkflowFinished: IOnWorkflowFinishedonIterationStart: IOnIterationStarted- onIterationNext: IOnIterationNexted+ onIterationNext: IOnIterationNextonIterationFinish: IOnIterationFinishedonTextChunk: IOnTextChunkonTextReplace: IOnTextReplace@@ -180,7 +180,7 @@ export const fetchAppMeta = async (isInstalledApp: boolean, installedAppId = '')return (getAction('get', isInstalledApp))(getUrl('meta', isInstalledApp, installedAppId)) as Promise<AppMeta>}-export const updateFeedback = async ({ url, body }: { url: string; body: Feedbacktype }, isInstalledApp: boolean, installedAppId = '') => {+export const updateFeedback = async ({ url, body }: { url: string; body: FeedbackType }, isInstalledApp: boolean, installedAppId = '') => {return (getAction('post', isInstalledApp))(getUrl(url, isInstalledApp, installedAppId), { body })}diff --git a/web/service/workflow.ts b/web/service/workflow.tsindex 93ab0006d44..431beef96c4 100644--- a/web/service/workflow.ts+++ b/web/service/workflow.ts@@ -26,7 +26,7 @@ export const fetchWorkflowRunHistory: Fetcher<WorkflowRunHistoryResponse, stringreturn get<WorkflowRunHistoryResponse>(url)}-export const fetcChatRunHistory: Fetcher<ChatRunHistoryResponse, string> = (url) => {+export const fetchChatRunHistory: Fetcher<ChatRunHistoryResponse, string> = (url) => {return get<ChatRunHistoryResponse>(url)}diff --git a/web/themes/dark.css b/web/themes/dark.cssindex b94124aad2d..8aab0f5fbb5 100644--- a/web/themes/dark.css+++ b/web/themes/dark.css@@ -147,13 +147,13 @@ html[data-theme="dark"] {--color-components-main-nav-nav-user-border: #FFFFFF0D;- --color-components-silder-knob: #F4F4F5;- --color-components-silder-knob-hover: #FEFEFE;- --color-components-silder-knob-disabled: #FFFFFF33;- --color-components-silder-range: #296DFF;- --color-components-silder-track: #FFFFFF33;- --color-components-silder-knob-border-hover: #1018284D;- --color-components-silder-knob-border: #10182833;+ --color-components-slider-knob: #F4F4F5;+ --color-components-slider-knob-hover: #FEFEFE;+ --color-components-slider-knob-disabled: #FFFFFF33;+ --color-components-slider-range: #296DFF;+ --color-components-slider-track: #FFFFFF33;+ --color-components-slider-knob-border-hover: #1018284D;+ --color-components-slider-knob-border: #10182833;--color-components-segmented-control-item-active-bg: #FFFFFF14;--color-components-segmented-control-item-active-border: #C8CEDA14;@@ -268,7 +268,7 @@ html[data-theme="dark"] {--color-background-body: #1D1D20;--color-background-default-subtle: #222225;- --color-background-neurtral-subtle: #1D1D20;+ --color-background-neutral-subtle: #1D1D20;--color-background-sidenav-bg: #27272AEB;--color-background-default: #222225;--color-background-soft: #18181B40;@@ -324,8 +324,8 @@ html[data-theme="dark"] {--color-workflow-link-line-normal: #676F83;--color-workflow-link-line-handle: #296DFF;- --color-workflow-minmap-bg: #27272B;- --color-workflow-minmap-block: #C8CEDA14;+ --color-workflow-minimap-bg: #27272B;+ --color-workflow-minimap-block: #C8CEDA14;--color-workflow-display-success-bg: #17B26A33;--color-workflow-display-success-border-1: #17B26AE5;@@ -371,8 +371,8 @@ html[data-theme="dark"] {--color-divider-deep: #C8CEDA33;--color-divider-burn: #18181BF2;--color-divider-intense: #C8CEDA66;- --color-divider-soild: #3A3A40;- --color-divider-soild-alt: #747481;+ --color-divider-solid: #3A3A40;+ --color-divider-solid-alt: #747481;--color-state-base-hover: #C8CEDA14;--color-state-base-active: #C8CEDA33;@@ -383,24 +383,24 @@ html[data-theme="dark"] {--color-state-accent-hover: #155AEF24;--color-state-accent-active: #155AEF24;--color-state-accent-hover-alt: #155AEF40;- --color-state-accent-soild: #5289FF;+ --color-state-accent-solid: #5289FF;--color-state-accent-active-alt: #155AEF33;--color-state-destructive-hover: #F0443824;--color-state-destructive-hover-alt: #F0443840;--color-state-destructive-active: #F044384D;- --color-state-destructive-soild: #F97066;+ --color-state-destructive-solid: #F97066;--color-state-destructive-border: #F97066;--color-state-success-hover: #17B26A24;--color-state-success-hover-alt: #17B26A40;--color-state-success-active: #17B26A4D;- --color-state-success-soild: #47CD89;+ --color-state-success-solid: #47CD89;--color-state-warning-hover: #F7900924;--color-state-warning-hover-alt: #F7900940;--color-state-warning-active: #F790094D;- --color-state-warning-soild: #F79009;+ --color-state-warning-solid: #F79009;--color-effects-highlight: #C8CEDA14;--color-effects-highlight-lightmode-off: #C8CEDA14;diff --git a/web/themes/light.css b/web/themes/light.cssindex 80a0fa36f54..5a5ef637692 100644--- a/web/themes/light.css+++ b/web/themes/light.css@@ -147,13 +147,13 @@ html[data-theme="light"] {--color-components-main-nav-nav-user-border: #FFFFFF;- --color-components-silder-knob: #FFFFFF;- --color-components-silder-knob-hover: #FFFFFF;- --color-components-silder-knob-disabled: #FFFFFFF2;- --color-components-silder-range: #296DFF;- --color-components-silder-track: #E9EBF0;- --color-components-silder-knob-border-hover: #10182833;- --color-components-silder-knob-border: #10182824;+ --color-components-slider-knob: #FFFFFF;+ --color-components-slider-knob-hover: #FFFFFF;+ --color-components-slider-knob-disabled: #FFFFFFF2;+ --color-components-slider-range: #296DFF;+ --color-components-slider-track: #E9EBF0;+ --color-components-slider-knob-border-hover: #10182833;+ --color-components-slider-knob-border: #10182824;--color-components-segmented-control-item-active-bg: #FFFFFF;--color-components-segmented-control-item-active-border: #FFFFFF;@@ -268,7 +268,7 @@ html[data-theme="light"] {--color-background-body: #F2F4F7;--color-background-default-subtle: #FCFCFD;- --color-background-neurtral-subtle: #F9FAFB;+ --color-background-neutral-subtle: #F9FAFB;--color-background-sidenav-bg: #FFFFFFCC;--color-background-default: #FFFFFF;--color-background-soft: #F9FAFB;@@ -324,8 +324,8 @@ html[data-theme="light"] {--color-workflow-link-line-normal: #D0D5DC;--color-workflow-link-line-handle: #296DFF;- --color-workflow-minmap-bg: #E9EBF0;- --color-workflow-minmap-block: #C8CEDA4D;+ --color-workflow-minimap-bg: #E9EBF0;+ --color-workflow-minimap-block: #C8CEDA4D;--color-workflow-display-success-bg: #ECFDF3;--color-workflow-display-success-border-1: #17B26ACC;@@ -371,8 +371,8 @@ html[data-theme="light"] {--color-divider-deep: #10182824;--color-divider-burn: #1018280A;--color-divider-intense: #1018284D;- --color-divider-soild: #D0D5DC;- --color-divider-soild-alt: #98A2B2;+ --color-divider-solid: #D0D5DC;+ --color-divider-solid-alt: #98A2B2;--color-state-base-hover: #C8CEDA33;--color-state-base-active: #C8CEDA66;@@ -383,24 +383,24 @@ html[data-theme="light"] {--color-state-accent-hover: #EFF4FF;--color-state-accent-active: #155AEF14;--color-state-accent-hover-alt: #D1E0FF;- --color-state-accent-soild: #296DFF;+ --color-state-accent-solid: #296DFF;--color-state-accent-active-alt: #155AEF24;--color-state-destructive-hover: #FEF3F2;--color-state-destructive-hover-alt: #FEE4E2;--color-state-destructive-active: #FECDCA;- --color-state-destructive-soild: #F04438;+ --color-state-destructive-solid: #F04438;--color-state-destructive-border: #FDA29B;--color-state-success-hover: #ECFDF3;--color-state-success-hover-alt: #DCFAE6;--color-state-success-active: #ABEFC6;- --color-state-success-soild: #17B26A;+ --color-state-success-solid: #17B26A;--color-state-warning-hover: #FFFAEB;--color-state-warning-hover-alt: #FEF0C7;--color-state-warning-active: #FEDF89;- --color-state-warning-soild: #F79009;+ --color-state-warning-solid: #F79009;--color-effects-highlight: #FFFFFF;--color-effects-highlight-lightmode-off: #FFFFFF00;diff --git a/web/themes/tailwind-theme-var-define.ts b/web/themes/tailwind-theme-var-define.tsindex caeb01b5fa7..9178d23f248 100644--- a/web/themes/tailwind-theme-var-define.ts+++ b/web/themes/tailwind-theme-var-define.ts@@ -147,13 +147,13 @@ const vars = {'components-main-nav-nav-user-border': 'var(--color-components-main-nav-nav-user-border)',- 'components-silder-knob': 'var(--color-components-silder-knob)',- 'components-silder-knob-hover': 'var(--color-components-silder-knob-hover)',- 'components-silder-knob-disabled': 'var(--color-components-silder-knob-disabled)',- 'components-silder-range': 'var(--color-components-silder-range)',- 'components-silder-track': 'var(--color-components-silder-track)',- 'components-silder-knob-border-hover': 'var(--color-components-silder-knob-border-hover)',- 'components-silder-knob-border': 'var(--color-components-silder-knob-border)',+ 'components-slider-knob': 'var(--color-components-slider-knob)',+ 'components-slider-knob-hover': 'var(--color-components-slider-knob-hover)',+ 'components-slider-knob-disabled': 'var(--color-components-slider-knob-disabled)',+ 'components-slider-range': 'var(--color-components-slider-range)',+ 'components-slider-track': 'var(--color-components-slider-track)',+ 'components-slider-knob-border-hover': 'var(--color-components-slider-knob-border-hover)',+ 'components-slider-knob-border': 'var(--color-components-slider-knob-border)','components-segmented-control-item-active-bg': 'var(--color-components-segmented-control-item-active-bg)','components-segmented-control-item-active-border': 'var(--color-components-segmented-control-item-active-border)',@@ -268,7 +268,7 @@ const vars = {'background-body': 'var(--color-background-body)','background-default-subtle': 'var(--color-background-default-subtle)',- 'background-neurtral-subtle': 'var(--color-background-neurtral-subtle)',+ 'background-neutral-subtle': 'var(--color-background-neutral-subtle)','background-sidenav-bg': 'var(--color-background-sidenav-bg)','background-default': 'var(--color-background-default)','background-soft': 'var(--color-background-soft)',@@ -324,8 +324,8 @@ const vars = {'workflow-link-line-normal': 'var(--color-workflow-link-line-normal)','workflow-link-line-handle': 'var(--color-workflow-link-line-handle)',- 'workflow-minmap-bg': 'var(--color-workflow-minmap-bg)',- 'workflow-minmap-block': 'var(--color-workflow-minmap-block)',+ 'workflow-minimap-bg': 'var(--color-workflow-minimap-bg)',+ 'workflow-minimap-block': 'var(--color-workflow-minimap-block)','workflow-display-success-bg': 'var(--color-workflow-display-success-bg)','workflow-display-success-border-1': 'var(--color-workflow-display-success-border-1)',@@ -371,8 +371,8 @@ const vars = {'divider-deep': 'var(--color-divider-deep)','divider-burn': 'var(--color-divider-burn)','divider-intense': 'var(--color-divider-intense)',- 'divider-soild': 'var(--color-divider-soild)',- 'divider-soild-alt': 'var(--color-divider-soild-alt)',+ 'divider-solid': 'var(--color-divider-solid)',+ 'divider-solid-alt': 'var(--color-divider-solid-alt)','state-base-hover': 'var(--color-state-base-hover)','state-base-active': 'var(--color-state-base-active)',@@ -383,24 +383,24 @@ const vars = {'state-accent-hover': 'var(--color-state-accent-hover)','state-accent-active': 'var(--color-state-accent-active)','state-accent-hover-alt': 'var(--color-state-accent-hover-alt)',- 'state-accent-soild': 'var(--color-state-accent-soild)',+ 'state-accent-solid': 'var(--color-state-accent-solid)','state-accent-active-alt': 'var(--color-state-accent-active-alt)','state-destructive-hover': 'var(--color-state-destructive-hover)','state-destructive-hover-alt': 'var(--color-state-destructive-hover-alt)','state-destructive-active': 'var(--color-state-destructive-active)',- 'state-destructive-soild': 'var(--color-state-destructive-soild)',+ 'state-destructive-solid': 'var(--color-state-destructive-solid)','state-destructive-border': 'var(--color-state-destructive-border)','state-success-hover': 'var(--color-state-success-hover)','state-success-hover-alt': 'var(--color-state-success-hover-alt)','state-success-active': 'var(--color-state-success-active)',- 'state-success-soild': 'var(--color-state-success-soild)',+ 'state-success-solid': 'var(--color-state-success-solid)','state-warning-hover': 'var(--color-state-warning-hover)','state-warning-hover-alt': 'var(--color-state-warning-hover-alt)','state-warning-active': 'var(--color-state-warning-active)',- 'state-warning-soild': 'var(--color-state-warning-soild)',+ 'state-warning-solid': 'var(--color-state-warning-solid)','effects-highlight': 'var(--color-effects-highlight)','effects-highlight-lightmode-off': 'var(--color-effects-highlight-lightmode-off)',diff --git a/web/types/workflow.ts b/web/types/workflow.tsindex f7991bc4e09..e6b001bd798 100644--- a/web/types/workflow.ts+++ b/web/types/workflow.ts@@ -158,7 +158,7 @@ export type IterationStartedResponse = {}}-export type IterationNextedResponse = {+export type IterationNextResponse = {task_id: stringworkflow_run_id: stringevent: stringdiff --git a/web/utils/var.ts b/web/utils/var.tsindex 436ebfc70b9..236c9debac6 100644--- a/web/utils/var.ts+++ b/web/utils/var.ts@@ -1,4 +1,4 @@-import { MAX_VAR_KEY_LENGHT, VAR_ITEM_TEMPLATE, VAR_ITEM_TEMPLATE_IN_WORKFLOW, getMaxVarNameLength } from '@/config'+import { MAX_VAR_KEY_LENGTH, VAR_ITEM_TEMPLATE, VAR_ITEM_TEMPLATE_IN_WORKFLOW, getMaxVarNameLength } from '@/config'import { CONTEXT_PLACEHOLDER_TEXT, HISTORY_PLACEHOLDER_TEXT, PRE_PROMPT_PLACEHOLDER_TEXT, QUERY_PLACEHOLDER_TEXT } from '@/app/components/base/prompt-editor/constants'import { InputVarType } from '@/app/components/workflow/types'@@ -47,7 +47,7 @@ export const checkKey = (key: string, canBeEmpty?: boolean) => {if (canBeEmpty && key === '')return true- if (key.length > MAX_VAR_KEY_LENGHT)+ if (key.length > MAX_VAR_KEY_LENGTH)return 'tooLong'if (otherAllowedRegex.test(key)) {@@ -86,7 +86,7 @@ export const getVars = (value: string) => {return ![CONTEXT_PLACEHOLDER_TEXT, HISTORY_PLACEHOLDER_TEXT, QUERY_PLACEHOLDER_TEXT, PRE_PROMPT_PLACEHOLDER_TEXT].includes(item)}).map((item) => {return item.replace('{{', '').replace('}}', '')- }).filter(key => key.length <= MAX_VAR_KEY_LENGHT) || []+ }).filter(key => key.length <= MAX_VAR_KEY_LENGTH) || []const keyObj: Record<string, boolean> = {}// remove duplicate keysconst res: string[] = []