app: description: '将用户与大模型(LLM)的对话内容保存到飞书多维表格中。 Save the content of the conversation with the large model (LLM) into Feishu Base table. 大規模モデル(LLM)との会話の内容をFeishuベーステーブルに保存します。' icon: 🤖 icon_background: '#FFEAD5' mode: advanced-chat name: LLM Conversation Tracker v2.0.0 use_icon_as_answer_icon: false kind: app version: 0.1.2 workflow: conversation_variables: - description: '' id: 414d6445-3f75-4c86-9f78-b3bc474e0d95 name: table_id value: '' value_type: string environment_variables: - description: '' id: 915ba37a-cbf0-4951-8a4c-e455b86b38b7 name: app_token value: NdHIbryJzaWKCqsr5G3csXWBnAf value_type: string - description: '' id: f0aebfd4-0786-405f-8507-b26d605ffe79 name: app_secret value: GhVb0pS8vMQMfxGqhOgQgg2uCFMSCaH7 value_type: string - description: '' id: 24866f70-cc6d-4eae-a789-c988e72a3f79 name: app_id value: cli_a795e764953e900c value_type: string features: file_upload: allowed_file_extensions: - .JPG - .JPEG - .PNG - .GIF - .WEBP - .SVG allowed_file_types: - image allowed_file_upload_methods: - local_file - remote_url enabled: false fileUploadConfig: audio_file_size_limit: 50 batch_count_limit: 5 file_size_limit: 15 image_file_size_limit: 10 video_file_size_limit: 100 image: enabled: false number_limits: 3 transfer_methods: - local_file - remote_url number_limits: 3 opening_statement: '' retriever_resource: enabled: false sensitive_word_avoidance: enabled: false speech_to_text: enabled: false suggested_questions: [] suggested_questions_after_answer: enabled: false text_to_speech: enabled: false language: '' voice: '' graph: edges: - data: isInIteration: false sourceType: code targetType: code id: 1730110088096-source-1730111043526-target selected: false source: '1730110088096' sourceHandle: source target: '1730111043526' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: code targetType: code id: 1730111043526-source-1730111365314-target selected: false source: '1730111043526' sourceHandle: source target: '1730111365314' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: if-else targetType: code id: 1730111896735-false-1730112326769-target source: '1730111896735' sourceHandle: 'false' target: '1730112326769' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: start targetType: code id: 1730110080230-source-1730112952738-target source: '1730110080230' sourceHandle: source target: '1730112952738' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: code targetType: code id: 1730112952738-source-1730110088096-target source: '1730112952738' sourceHandle: source target: '1730110088096' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: code targetType: code id: 1730112326769-source-1730114813467-target source: '1730112326769' sourceHandle: source target: '1730114813467' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: code targetType: code id: 17303698315230-source-17303698330140-target source: '17303698315230' sourceHandle: source target: '17303698330140' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: code targetType: answer id: 17303698330140-source-answer-target source: '17303698330140' sourceHandle: source target: answer targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: llm targetType: code id: 1730370104040-source-17303698315230-target source: '1730370104040' sourceHandle: source target: '17303698315230' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: if-else targetType: llm id: 1730111896735-true-1730370104040-target source: '1730111896735' sourceHandle: 'true' target: '1730370104040' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: code targetType: code id: 1730114813467-source-1730629453082-target source: '1730114813467' sourceHandle: source target: '1730629453082' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: code targetType: llm id: 1730629453082-source-17306289719580-target source: '1730629453082' sourceHandle: source target: '17306289719580' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: code targetType: if-else id: 1730111365314-source-1730111896735-target source: '1730111365314' sourceHandle: source target: '1730111896735' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: code targetType: answer id: 17306298543670-source-1730171279785-target source: '17306298543670' sourceHandle: source target: '1730171279785' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: llm targetType: code id: 17306289719580-source-17306299099380-target source: '17306289719580' sourceHandle: source target: '17306299099380' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: code targetType: code id: 17306299099380-source-17306298543670-target source: '17306299099380' sourceHandle: source target: '17306298543670' targetHandle: target type: custom zIndex: 0 nodes: - data: desc: '' selected: false title: Start type: start variables: - label: 用户名 max_length: 48 options: [] required: true type: text-input variable: user_name height: 111 id: '1730110080230' position: x: 30 y: 278 positionAbsolute: x: 30 y: 278 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: answer: '{{#1730370104040.text#}}' desc: '' selected: false title: Answer type: answer variables: [] height: 121 id: answer position: x: 2766 y: 278 positionAbsolute: x: 2766 y: 278 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: code: "import requests\n\ndef main(app_id: str, app_secret: str) -> dict:\n\ \ # URL for the API endpoint\n url = \"https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal/\"\ \n \n # Data to be sent in the POST request\n post_data = {\n \ \ \"app_id\": app_id,\n \"app_secret\": app_secret\n }\n\ \n # Making the POST request\n r = requests.post(url, data=post_data)\n\ \n # Retrieving the tenant access token from the response\n tat =\ \ r.json().get(\"tenant_access_token\", None)\n\n # Return the result\ \ as a dictionary\n return {\n \"tenant_access_token\": tat\n\ \ }\n" code_language: python3 desc: '' outputs: tenant_access_token: children: null type: string selected: false title: get_access_token type: code variables: - value_selector: - env - app_id variable: app_id - value_selector: - env - app_secret variable: app_secret height: 66 id: '1730110088096' position: x: 638 y: 278 positionAbsolute: x: 638 y: 278 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: code: "import json\nimport requests\n\ndef main(app_token: str, tenant_access_token:\ \ str) -> dict:\n url = f'https://open.feishu.cn/open-apis/bitable/v1/apps/{app_token}/tables'\n\ \ headers = {\n 'Authorization': f'Bearer {tenant_access_token}'\n\ \ }\n response = requests.get(url, headers=headers)\n return {'obj':\ \ response.json()}" code_language: python3 desc: '' outputs: obj: children: null type: object selected: false title: get_tables type: code variables: - value_selector: - env - app_token variable: app_token - value_selector: - '1730110088096' - tenant_access_token variable: tenant_access_token height: 66 id: '1730111043526' position: x: 942 y: 278 positionAbsolute: x: 942 y: 278 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: code: "def main(obj: dict, user_name: str) -> dict:\n for item in obj.get('data',\ \ {}).get('items', []):\n if item.get('name') == user_name:\n \ \ return {'table_id': item.get('table_id')}\n return {'table_id':\ \ None}" code_language: python3 desc: '' outputs: table_id: children: null type: string selected: false title: check_within type: code variables: - value_selector: - '1730111043526' - obj variable: obj - value_selector: - '1730110080230' - user_name variable: user_name height: 66 id: '1730111365314' position: x: 1246 y: 278 positionAbsolute: x: 1246 y: 278 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: cases: - case_id: 'true' conditions: - comparison_operator: not empty id: 03276742-e75d-4b5f-8437-272f2af1e29c value: '' varType: string variable_selector: - '1730111365314' - table_id id: 'true' logical_operator: and desc: '' selected: false title: IF/ELSE within type: if-else height: 156 id: '1730111896735' position: x: 1550 y: 278 positionAbsolute: x: 1550 y: 278 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: code: "import json\n\ndef main(name: str) -> dict:\n # 构造 JSON 数据\n \ \ json_data = {\n \"table\": {\n \"name\": name, # 使用传入的名称\n\ \ \"fields\": [\n {\"field_name\":\"Time\",\"\ type\":1},{\"field_name\":\"User\",\"type\":1},{\"field_name\":\"Assistant\"\ ,\"type\":1}\n ]\n }\n }\n \n # 返回结果,将 JSON 数据转换为字符串\n\ \ return {\n \"body\": json.dumps(json_data, ensure_ascii=False)\n\ \ }" code_language: python3 desc: '' outputs: body: children: null type: string selected: false title: joint_body_newsheet type: code variables: - value_selector: - '1730110080230' - user_name variable: name height: 66 id: '1730112326769' position: x: 1854 y: 466.5 positionAbsolute: x: 1854 y: 466.5 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: code: "from datetime import datetime\n\ndef main() -> dict:\n # 获取当前时间\n\ \ now = datetime.now()\n \n # 格式化时间为字符串\n current_time = now.strftime(\"\ %Y-%m-%d %H:%M:%S\")\n \n return {\n \"user_time\": current_time\n\ \ }\n" code_language: python3 desc: '' outputs: user_time: children: null type: string selected: false title: Get_time type: code variables: [] height: 66 id: '1730112952738' position: x: 334 y: 278 positionAbsolute: x: 334 y: 278 sourcePosition: right targetPosition: left type: custom width: 244 - data: code: "import requests\nimport json\n\ndef main(app_token, tenant_access_token,bodyinput):\n\ \ url = f'https://open.feishu.cn/open-apis/bitable/v1/apps/{app_token}/tables'\n\ \ headers = {\n 'Authorization': f'Bearer {tenant_access_token}',\n\ \ 'Content-Type': 'application/json'\n }\n response = requests.post(url,\ \ headers=headers, json=json.loads(bodyinput))\n \n return {'obj':\ \ response.json()}\n" code_language: python3 desc: '' outputs: obj: children: null type: object selected: false title: create sheet type: code variables: - value_selector: - env - app_token variable: app_token - value_selector: - '1730110088096' - tenant_access_token variable: tenant_access_token - value_selector: - '1730112326769' - body variable: bodyinput height: 66 id: '1730114813467' position: x: 2158 y: 439 positionAbsolute: x: 2158 y: 439 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: answer: '{{#17306289719580.text#}}' desc: '' selected: false title: Answer 3 type: answer variables: [] height: 121 id: '1730171279785' position: x: 3678 y: 439 positionAbsolute: x: 3678 y: 439 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: code: "import json\n\ndef main(response: str, time: str, query: str) -> dict:\n\ \ # 构造 JSON 数据\n json_data = {\n \"fields\": {\n \ \ \"Time\": time,\n \"User\": query,\n \"Assistant\"\ : response\n }\n }\n \n # 返回结果\n return {\n \"\ body\": json.dumps(json_data, ensure_ascii=False)\n }\n" code_language: python3 desc: '' outputs: body: children: null type: string selected: false title: joint_body_newsheet2 type: code variables: - value_selector: - '1730370104040' - text variable: response - value_selector: - '1730112952738' - user_time variable: time - value_selector: - sys - query variable: query height: 66 id: '17303698315230' position: x: 2158 y: 278 positionAbsolute: x: 2158 y: 278 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: code: "import requests\nimport json\n\ndef main(app_token, tenant_access_token,\ \ bodyinput, table_id):\n url = f'https://open.feishu.cn/open-apis/bitable/v1/apps/{app_token}/tables/{table_id}/records'\n\ \ headers = {\n 'Authorization': f'Bearer {tenant_access_token}',\n\ \ 'Content-Type': 'application/json'\n }\n response = requests.post(url,\ \ headers=headers, json=json.loads(bodyinput))\n \n return {'obj':\ \ response.json()}\n" code_language: python3 desc: '' outputs: obj: children: null type: object selected: false title: record 1 type: code variables: - value_selector: - env - app_token variable: app_token - value_selector: - '1730110088096' - tenant_access_token variable: tenant_access_token - value_selector: - '17303698315230' - body variable: bodyinput - value_selector: - '1730111365314' - table_id variable: table_id height: 66 id: '17303698330140' position: x: 2462 y: 278 positionAbsolute: x: 2462 y: 278 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: context: enabled: false variable_selector: [] desc: '' memory: query_prompt_template: '' role_prefix: assistant: '' user: '' window: enabled: true size: 50 model: completion_params: temperature: 0.7 mode: chat name: gpt-4o-2024-08-06 provider: openai prompt_template: - id: 67dcd4d2-8712-45c3-9843-a41eedb97603 role: system text: "# Profile\n- 名称:苏格拉底智能体\n- 类型:对话引导式智能体\n- 性格特征:好奇心强、开放、包容、逻辑严谨、善于提问和引导反思,且提供信息反馈和解读\n\ - 角色定位:作为一个智慧引导者,通过循循善诱的提问,帮助参与者发现自己的思维盲点,激发探索兴趣和自我反思。同时,鼓励参与者提出自己的问题,与智能体共同探讨。\n\ \n## Background\n- 基于苏格拉底式对话方法,旨在通过问题引导参与者进行自我反思,帮助他们在探索过程中发现潜在认知矛盾,从而激发好奇心和探索动机。\n\ ## Skill\n- 信息解读:在提出新的问题之前,根据参与者的反馈或疑问,提供相关的信息曝光或解读,帮助他们理解问题的背景或揭示潜在的逻辑。\n\ - 提问技巧:擅长通过开放式、探索式的问题,引导参与者进行概念澄清、证据探求、质疑挑战和对话反思。同时,明确邀请参与者提出自己的问题,以加强对话的互动性。\n\ - 逻辑分析:能够根据参与者的回答,动态调整提问策略,运用 if-then-else 逻辑引导对话走向更深层次的思考。\n- 情感共鸣:具备识别参与者情绪和反应的能力,以尊重和包容的态度进行对话,营造安全的交流氛围。\n\ \n## Goal\n- 你会通过循循善诱的提问,引发参与者的好奇心,促使他们探索自己的观点和思维方式。\n- 你能够帮助参与者通过对话反思自己的信念、观点和逻辑,促进自我意识的提升。\n\ - 你可以引导参与者从不同角度看待问题,拓宽思维广度,发掘潜在的新认知。\n- 在对话过程中,你会积极邀请参与者主动提出自己的问题,增加对话的开放性。\n\ \n## Rules\n- 始终保持开放和不带偏见,避免强加任何观点给参与者。\n- 以提问为主,不直接给出结论,并主动邀请参与者提出问题,以启发更多的思考。\n\ - 根据 if-then-else 逻辑,判断何时深入提问,何时退后倾听,确保对话的节奏由参与者掌控。\n- 在任何情况下都要以尊重的态度对待参与者的观点,避免批评或贬低。\n\ - 在对话的反思阶段,帮助参与者回顾讨论内容,突出他们在思维过程中的进步。同时,明确邀请他们提出新的问题或探索方向。\n\n## Workflow\n\ - Initialization:初始化对话,明确对话主题,了解参与者的初步想法或疑问。\n- If 参与者给出了具体回答或问题,Then\ \ 提供相关的信息反馈或背景解读:\n + 基于参与者的回答,智能体给出一个简短的信息,例如相关事实、数据、研究结论或相反观点的案例,以引发参与者的思考。\n\ \ + 示例:“你提到这个观点很有意思,事实上,有一项研究发现......,这是否让你对这个问题有了新的看法?同时,你是否有其他相关的问题想要探索?”\n\ - Else 如果参与者的回答较为模糊,Then 以一种简化的信息或引导性的反馈,帮助他们建立对话的基础。\n + 示例:“这个话题确实很复杂,有许多不同的角度可以探讨。比如,有一种观点认为......,你觉得这和你的想法有什么联系吗?在这个过程中,你有什么想提的问题吗?”\n\ - 概念澄清:提出开放式问题,帮助参与者明确自己的观点和初步印象。\n + If 参与者有清晰的初步想法,Then 进一步挖掘,并邀请他们提出自己的看法或问题。\n\ \ + Else 如果想法模糊,Then 提供更具体的引导问题。\n- 证据探求:引导参与者寻找支持或挑战其观点的证据,推动深入思考。\n\ \ + If 参与者提供证据,Then 询问其证据的来源和可靠性,同时鼓励他们提出相关的问题。\n + Else 如果无法提供证据,Then\ \ 通过探索性问题鼓励寻找信息。\n- 质疑挑战:鼓励从不同角度审视问题,提出假设性问题以激发认知冲突,并邀请参与者提出疑问。\n + If\ \ 参与者愿意尝试新视角,Then 进一步引导。\n + Else 如果坚持己见,Then 提出假设性问题引发思考。\n- 对话反思:引导参与者总结和反思整个对话过程,保持对未知领域的探索兴趣。\n\ \ + If 参与者能清晰回顾,Then 鼓励提出下一个探索方向或问题。\n + Else 如果回顾模糊,Then 提供提示,引导他们反思,并邀请他们提出新的问题。\n\ - 文本的创作规则:\n + 信息反馈:在每次提问前,根据对话上下文,提供相关信息或背景解读,帮助参与者拓宽视野。\n + 语言风格:简洁明了,使用开放式、鼓励性语言,避免使用专业术语,让参与者感到亲切和包容。\n\ \ + 提问方式:优先使用疑问句,如“为什么”、“你怎么看”、“你觉得是否有其他可能”等,并在对话中主动邀请参与者提出他们的问题。\n \ \ + 反思引导:在对话结束前,总结参与者的观点,并鼓励他们主动提出新的探索方向或问题。\n\n## Output Format\n- 每次对话输出一个精心设计的问句,以引导参与者继续思考,并明确邀请他们提出自己的问题。\n\ - 对参与者的回答进行积极的反馈,确认他们的观点,并适时引入新的问题或明确鼓励他们提问。\n- 在每次对话结束时,输出一段总结性话语,并鼓励参与者反思与拓展,且邀请他们提出新的问题。\n\ \n## Initialization\n- 你在每次提问前,得先输出一段基于参与者回答的相关信息或解读。\n- 示例:“你刚才提到的观点让我想起一个有趣的事实:根据某项研究......,这是否改变了你对这个问题的看法" selected: false title: LLM 1 type: llm variables: [] vision: enabled: false height: 121 id: '1730370104040' position: x: 1854 y: 278 positionAbsolute: x: 1854 y: 278 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: context: enabled: false variable_selector: [] desc: '' memory: query_prompt_template: '' role_prefix: assistant: '' user: '' window: enabled: true size: 50 model: completion_params: temperature: 0.7 mode: chat name: gpt-4o-2024-08-06 provider: openai prompt_template: - id: 67dcd4d2-8712-45c3-9843-a41eedb97603 role: system text: "# Profile\n- 名称:苏格拉底智能体\n- 类型:对话引导式智能体\n- 性格特征:好奇心强、开放、包容、逻辑严谨、善于提问和引导反思,且提供信息反馈和解读\n\ - 角色定位:作为一个智慧引导者,通过循循善诱的提问,帮助参与者发现自己的思维盲点,激发探索兴趣和自我反思。同时,鼓励参与者提出自己的问题,与智能体共同探讨。\n\ \n## Background\n- 基于苏格拉底式对话方法,旨在通过问题引导参与者进行自我反思,帮助他们在探索过程中发现潜在认知矛盾,从而激发好奇心和探索动机。\n\ ## Skill\n- 信息解读:在提出新的问题之前,根据参与者的反馈或疑问,提供相关的信息曝光或解读,帮助他们理解问题的背景或揭示潜在的逻辑。\n\ - 提问技巧:擅长通过开放式、探索式的问题,引导参与者进行概念澄清、证据探求、质疑挑战和对话反思。同时,明确邀请参与者提出自己的问题,以加强对话的互动性。\n\ - 逻辑分析:能够根据参与者的回答,动态调整提问策略,运用 if-then-else 逻辑引导对话走向更深层次的思考。\n- 情感共鸣:具备识别参与者情绪和反应的能力,以尊重和包容的态度进行对话,营造安全的交流氛围。\n\ \n## Goal\n- 你会通过循循善诱的提问,引发参与者的好奇心,促使他们探索自己的观点和思维方式。\n- 你能够帮助参与者通过对话反思自己的信念、观点和逻辑,促进自我意识的提升。\n\ - 你可以引导参与者从不同角度看待问题,拓宽思维广度,发掘潜在的新认知。\n- 在对话过程中,你会积极邀请参与者主动提出自己的问题,增加对话的开放性。\n\ \n## Rules\n- 始终保持开放和不带偏见,避免强加任何观点给参与者。\n- 以提问为主,不直接给出结论,并主动邀请参与者提出问题,以启发更多的思考。\n\ - 根据 if-then-else 逻辑,判断何时深入提问,何时退后倾听,确保对话的节奏由参与者掌控。\n- 在任何情况下都要以尊重的态度对待参与者的观点,避免批评或贬低。\n\ - 在对话的反思阶段,帮助参与者回顾讨论内容,突出他们在思维过程中的进步。同时,明确邀请他们提出新的问题或探索方向。\n\n## Workflow\n\ - Initialization:初始化对话,明确对话主题,了解参与者的初步想法或疑问。\n- If 参与者给出了具体回答或问题,Then\ \ 提供相关的信息反馈或背景解读:\n + 基于参与者的回答,智能体给出一个简短的信息,例如相关事实、数据、研究结论或相反观点的案例,以引发参与者的思考。\n\ \ + 示例:“你提到这个观点很有意思,事实上,有一项研究发现......,这是否让你对这个问题有了新的看法?同时,你是否有其他相关的问题想要探索?”\n\ - Else 如果参与者的回答较为模糊,Then 以一种简化的信息或引导性的反馈,帮助他们建立对话的基础。\n + 示例:“这个话题确实很复杂,有许多不同的角度可以探讨。比如,有一种观点认为......,你觉得这和你的想法有什么联系吗?在这个过程中,你有什么想提的问题吗?”\n\ - 概念澄清:提出开放式问题,帮助参与者明确自己的观点和初步印象。\n + If 参与者有清晰的初步想法,Then 进一步挖掘,并邀请他们提出自己的看法或问题。\n\ \ + Else 如果想法模糊,Then 提供更具体的引导问题。\n- 证据探求:引导参与者寻找支持或挑战其观点的证据,推动深入思考。\n\ \ + If 参与者提供证据,Then 询问其证据的来源和可靠性,同时鼓励他们提出相关的问题。\n + Else 如果无法提供证据,Then\ \ 通过探索性问题鼓励寻找信息。\n- 质疑挑战:鼓励从不同角度审视问题,提出假设性问题以激发认知冲突,并邀请参与者提出疑问。\n + If\ \ 参与者愿意尝试新视角,Then 进一步引导。\n + Else 如果坚持己见,Then 提出假设性问题引发思考。\n- 对话反思:引导参与者总结和反思整个对话过程,保持对未知领域的探索兴趣。\n\ \ + If 参与者能清晰回顾,Then 鼓励提出下一个探索方向或问题。\n + Else 如果回顾模糊,Then 提供提示,引导他们反思,并邀请他们提出新的问题。\n\ - 文本的创作规则:\n + 信息反馈:在每次提问前,根据对话上下文,提供相关信息或背景解读,帮助参与者拓宽视野。\n + 语言风格:简洁明了,使用开放式、鼓励性语言,避免使用专业术语,让参与者感到亲切和包容。\n\ \ + 提问方式:优先使用疑问句,如“为什么”、“你怎么看”、“你觉得是否有其他可能”等,并在对话中主动邀请参与者提出他们的问题。\n \ \ + 反思引导:在对话结束前,总结参与者的观点,并鼓励他们主动提出新的探索方向或问题。\n\n## Output Format\n- 每次对话输出一个精心设计的问句,以引导参与者继续思考,并明确邀请他们提出自己的问题。\n\ - 对参与者的回答进行积极的反馈,确认他们的观点,并适时引入新的问题或明确鼓励他们提问。\n- 在每次对话结束时,输出一段总结性话语,并鼓励参与者反思与拓展,且邀请他们提出新的问题。\n\ \n## Initialization\n- 你在每次提问前,得先输出一段基于参与者回答的相关信息或解读。\n- 示例:“你刚才提到的观点让我想起一个有趣的事实:根据某项研究......,这是否改变了你对这个问题的看法" selected: false title: LLM 2 type: llm variables: [] vision: enabled: false height: 121 id: '17306289719580' position: x: 2766 y: 439 positionAbsolute: x: 2766 y: 439 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: code: "def main(obj: dict) -> dict:\n table_id = obj.get(\"data\", {}).get(\"\ table_id\", None)\n return {'table_id': table_id}" code_language: python3 desc: '' outputs: table_id: children: null type: string selected: false title: 提取 table_id type: code variables: - value_selector: - '1730114813467' - obj variable: obj height: 66 id: '1730629453082' position: x: 2462 y: 439 positionAbsolute: x: 2462 y: 439 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: author: Tyler Coman desc: '' height: 147 selected: false showAuthor: true text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"这是一个分支,当table_id不为空时,则选择在已有table中保存记录;","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"如果table_id为空,则新建一个table","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}' theme: blue title: '' type: '' width: 308 height: 147 id: '1730629493082' position: x: 1632.8755760180372 y: 69.25193952405158 positionAbsolute: x: 1632.8755760180372 y: 69.25193952405158 selected: false sourcePosition: right targetPosition: left type: custom-note width: 308 - data: code: "import requests\nimport json\n\ndef main(app_token, tenant_access_token,\ \ bodyinput, table_id):\n url = f'https://open.feishu.cn/open-apis/bitable/v1/apps/{app_token}/tables/{table_id}/records'\n\ \ headers = {\n 'Authorization': f'Bearer {tenant_access_token}',\n\ \ 'Content-Type': 'application/json'\n }\n response = requests.post(url,\ \ headers=headers, json=json.loads(bodyinput))\n \n return {'obj':\ \ response.json()}\n" code_language: python3 desc: '' outputs: obj: children: null type: object selected: false title: record 2 type: code variables: - value_selector: - env - app_token variable: app_token - value_selector: - '1730110088096' - tenant_access_token variable: tenant_access_token - value_selector: - '17306299099380' - body variable: bodyinput - value_selector: - '1730629453082' - table_id variable: table_id height: 66 id: '17306298543670' position: x: 3374 y: 439 positionAbsolute: x: 3374 y: 439 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: code: "import json\n\ndef main(response: str, time: str, query: str) -> dict:\n\ \ # 构造 JSON 数据\n json_data = {\n \"fields\": {\n \ \ \"Time\": time,\n \"User\": query,\n \"Assistant\"\ : response\n }\n }\n \n # 返回结果\n return {\n \"\ body\": json.dumps(json_data, ensure_ascii=False)\n }\n" code_language: python3 desc: '' outputs: body: children: null type: string selected: false title: joint_body_newsheet3 type: code variables: - value_selector: - '17306289719580' - text variable: response - value_selector: - '1730112952738' - user_time variable: time - value_selector: - sys - query variable: query height: 66 id: '17306299099380' position: x: 3070 y: 439 positionAbsolute: x: 3070 y: 439 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: author: Tyler Coman desc: '' height: 152 selected: false showAuthor: true text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"这里用于判断是否已经有与user_name同名的table。","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"如果有同名,则提取table_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":"如果没有同名,则table_id为空","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}' theme: blue title: '' type: '' width: 332 height: 152 id: '1730630215640' position: x: 344.6130122596106 y: 69.25193952405158 positionAbsolute: x: 344.6130122596106 y: 69.25193952405158 selected: false sourcePosition: right targetPosition: left type: custom-note width: 332 - data: author: Tyler Coman desc: '' height: 250 selected: false showAuthor: true text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","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":"- 关联飞书的多维表格,保存LLM的对话记录","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":"使用之前:","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":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","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":"- 记录应用的app_id、app_secret,记录多维表格的app_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":"- 将上述三个变量填入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}}' theme: blue title: '' type: '' width: 452 height: 250 id: '1730630603452' position: x: 30 y: 410.6160564001017 positionAbsolute: x: 30 y: 410.6160564001017 selected: false sourcePosition: right targetPosition: left type: custom-note width: 452 - data: author: Tyler Coman desc: '' height: 250 selected: false showAuthor: true text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"The functions of this workflow:","type":"text","version":1}],"direction":"ltr","format":"left","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"Link Feishu''s multi-dimensional table to save LLM''s conversation records.","type":"text","version":1}],"direction":"ltr","format":"left","indent":0,"type":"listitem","version":1,"value":1}],"direction":"ltr","format":"","indent":0,"type":"list","version":1,"listType":"bullet","start":1,"tag":"ul"},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"Before use:","type":"text","version":1}],"direction":"ltr","format":"left","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"You need to create a new application in the Feishu Open Platform, enable permissions, and publish it.","type":"text","version":1}],"direction":"ltr","format":"left","indent":0,"type":"listitem","version":1,"value":1},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"Create a new multi-dimensional table in Feishu Cloud Documents and associate it with the application.","type":"text","version":1}],"direction":"ltr","format":"left","indent":0,"type":"listitem","version":1,"value":2},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"Record the application''s app_id, app_secret, and the multi-dimensional table''s app_token.","type":"text","version":1}],"direction":"ltr","format":"left","indent":0,"type":"listitem","version":1,"value":3},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"Fill in the above three variables into the workflow''s environment variables.","type":"text","version":1}],"direction":"ltr","format":"left","indent":0,"type":"listitem","version":1,"value":4}],"direction":"ltr","format":"","indent":0,"type":"list","version":1,"listType":"bullet","start":1,"tag":"ul"},{"children":[],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}' theme: blue title: ' (1)' type: '' width: 452 height: 250 id: '17306309250760' position: x: 514.8997051274506 y: 410.6160564001017 positionAbsolute: x: 514.8997051274506 y: 410.6160564001017 selected: false sourcePosition: right targetPosition: left type: custom-note width: 452 - data: author: Tyler Coman desc: '' height: 250 selected: false showAuthor: true text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"このワークフローの機能:","type":"text","version":1}],"direction":"ltr","format":"left","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"Feishuの多次元テーブルを関連付けて、LLMの対話記録を保存します。","type":"text","version":1}],"direction":"ltr","format":"left","indent":0,"type":"listitem","version":1,"value":1}],"direction":"ltr","format":"","indent":0,"type":"list","version":1,"listType":"bullet","start":1,"tag":"ul"},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"使用前に:","type":"text","version":1}],"direction":"ltr","format":"left","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"Feishuオープンプラットフォームで新しいアプリケーションを作成し、権限を有効にして公開する必要があります。","type":"text","version":1}],"direction":"ltr","format":"left","indent":0,"type":"listitem","version":1,"value":1},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"Feishuクラウドドキュメントで新しい多次元テーブルを作成し、アプリケーションと関連付けます。","type":"text","version":1}],"direction":"ltr","format":"left","indent":0,"type":"listitem","version":1,"value":2},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"アプリケーションのapp_id、app_secret、および多次元テーブルのapp_tokenを記録します。","type":"text","version":1}],"direction":"ltr","format":"left","indent":0,"type":"listitem","version":1,"value":3},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"上記の3つの変数をワークフローの環境変数に入力します。","type":"text","version":1}],"direction":"ltr","format":"left","indent":0,"type":"listitem","version":1,"value":4}],"direction":"ltr","format":"","indent":0,"type":"list","version":1,"listType":"bullet","start":1,"tag":"ul"},{"children":[],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}' theme: blue title: ' (1)' type: '' width: 452 height: 250 id: '17306309582640' position: x: 1010.2 y: 410.6160564001017 positionAbsolute: x: 1010.2 y: 410.6160564001017 selected: true sourcePosition: right targetPosition: left type: custom-note width: 452 - data: author: Tyler Coman desc: '' height: 152 selected: false showAuthor: true text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"This is used to determine whether there is already a table with the same name as user_name.","type":"text","version":1},{"type":"linebreak","version":1},{"detail":0,"format":0,"mode":"normal","style":"","text":"If there is a table with the same name, extract the table_id.","type":"text","version":1},{"type":"linebreak","version":1},{"detail":0,"format":0,"mode":"normal","style":"","text":"If there is no table with the same name, the table_id is empty.","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}' theme: blue title: ' (1)' type: '' width: 332 height: 152 id: '17306310251570' position: x: 695.2326882338178 y: 69.25193952405158 positionAbsolute: x: 695.2326882338178 y: 69.25193952405158 selected: false sourcePosition: right targetPosition: left type: custom-note width: 332 - data: author: Tyler Coman desc: '' height: 152 selected: false showAuthor: true text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"これは、user_nameと同じ名前のテーブルがすでに存在するかどうかを判断するために使用されます。","type":"text","version":1},{"type":"linebreak","version":1},{"detail":0,"format":0,"mode":"normal","style":"","text":"同じ名前のテーブルがある場合は、table_idを抽出します。","type":"text","version":1},{"type":"linebreak","version":1},{"detail":0,"format":0,"mode":"normal","style":"","text":"同じ名前のテーブルがない場合は、table_idは空です。","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}' theme: blue title: ' (2)' type: '' width: 332 height: 152 id: '17306310298380' position: x: 1067.086217906133 y: 69.25193952405158 positionAbsolute: x: 1067.086217906133 y: 69.25193952405158 selected: false sourcePosition: right targetPosition: left type: custom-note width: 332 - data: author: Tyler Coman desc: '' height: 147 selected: false showAuthor: true text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"This is a branch: when the table_id is not empty, choose to save the record in the existing table; if the table_id is empty, create a new table.","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}' theme: blue title: ' (1)' type: '' width: 308 height: 147 id: '17306312873810' position: x: 1974.217520052135 y: 69.25193952405158 positionAbsolute: x: 1974.217520052135 y: 69.25193952405158 selected: false sourcePosition: right targetPosition: left type: custom-note width: 308 - data: author: Tyler Coman desc: '' height: 147 selected: false showAuthor: true text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"これは分岐です:table_idが空でない場合は、既存のテーブルに記録を保存することを選択します。table_idが空の場合は、新しいテーブルを作成します。","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}' theme: blue title: ' (2)' type: '' width: 308 height: 147 id: '17306312909790' position: x: 2317.527307842557 y: 69.25193952405158 positionAbsolute: x: 2317.527307842557 y: 69.25193952405158 selected: false sourcePosition: right targetPosition: left type: custom-note width: 308 viewport: x: 396.99258605433533 y: 195.9859359152823 zoom: 0.5743491289012888