botrun-flow-lang 5.10.32__tar.gz → 5.10.83__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/CHANGELOG.md +10 -0
  2. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/PKG-INFO +4 -3
  3. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/api/model_api.py +3 -3
  4. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/langgraph_react_agent.py +89 -46
  5. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/util/img_util.py +1 -1
  6. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/util/model_utils.py +12 -12
  7. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/util/pdf_analyzer.py +1 -1
  8. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/poetry.lock +423 -22
  9. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/pyproject.toml +4 -3
  10. botrun_flow_lang-5.10.83/requirements.txt +172 -0
  11. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/uv.lock +5 -5
  12. botrun_flow_lang-5.10.32/requirements.txt +0 -149
  13. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/.env_template +0 -0
  14. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/.gcloudignore +0 -0
  15. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/.gitignore +0 -0
  16. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/.vscode/launch.json +0 -0
  17. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/CLAUDE.md +0 -0
  18. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/Dockerfile.template +0 -0
  19. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/README.md +0 -0
  20. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/__init__.py +0 -0
  21. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/api/__init__.py +0 -0
  22. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/api/auth_api.py +0 -0
  23. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/api/auth_utils.py +0 -0
  24. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/api/botrun_back_api.py +0 -0
  25. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/api/flow_api.py +0 -0
  26. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/api/hatch_api.py +0 -0
  27. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/api/langgraph_api.py +0 -0
  28. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/api/line_bot_api.py +0 -0
  29. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/api/rate_limit_api.py +0 -0
  30. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/api/routes.py +0 -0
  31. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/api/search_api.py +0 -0
  32. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/api/storage_api.py +0 -0
  33. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/api/subsidy_api.py +0 -0
  34. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/api/subsidy_api_system_prompt.txt +0 -0
  35. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/api/user_setting_api.py +0 -0
  36. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/api/version_api.py +0 -0
  37. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/api/youtube_api.py +0 -0
  38. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/constants.py +0 -0
  39. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/__init__.py +0 -0
  40. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/__init__.py +0 -0
  41. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/agent_runner.py +0 -0
  42. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/agent_tools/__init__.py +0 -0
  43. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/agent_tools/step_planner.py +0 -0
  44. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/checkpointer/__init__.py +0 -0
  45. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/checkpointer/firestore_checkpointer.py +0 -0
  46. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/gov_researcher/GOV_RESEARCHER_PRD.md +0 -0
  47. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/gov_researcher/__init__.py +0 -0
  48. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/gov_researcher/gov_researcher_2_graph.py +0 -0
  49. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/gov_researcher/gov_researcher_graph.py +0 -0
  50. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/search_agent_graph.py +0 -0
  51. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/tools/__init__.py +0 -0
  52. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/tools/gemini_code_execution.py +0 -0
  53. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/util/__init__.py +0 -0
  54. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/util/gemini_grounding.py +0 -0
  55. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/util/html_util.py +0 -0
  56. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/util/local_files.py +0 -0
  57. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/util/mermaid_util.py +0 -0
  58. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/util/perplexity_search.py +0 -0
  59. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/util/plotly_util.py +0 -0
  60. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/util/tavily_search.py +0 -0
  61. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/agents/util/youtube_util.py +0 -0
  62. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/cache/__init__.py +0 -0
  63. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/langgraph_agents/cache/langgraph_botrun_cache.py +0 -0
  64. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/llm_agent/__init__.py +0 -0
  65. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/llm_agent/llm_agent.py +0 -0
  66. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/llm_agent/llm_agent_util.py +0 -0
  67. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/log/.gitignore +0 -0
  68. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/main.py +0 -0
  69. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/main_fast.py +0 -0
  70. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/mcp_server/__init__.py +0 -0
  71. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/mcp_server/default_mcp.py +0 -0
  72. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/models/__init__.py +0 -0
  73. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/models/nodes/utils.py +0 -0
  74. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/models/token_usage.py +0 -0
  75. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/requirements.txt +0 -0
  76. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/services/__init__.py +0 -0
  77. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/services/base/firestore_base.py +0 -0
  78. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/services/hatch/__init__.py +0 -0
  79. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/services/hatch/hatch_factory.py +0 -0
  80. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/services/hatch/hatch_fs_store.py +0 -0
  81. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/services/storage/__init__.py +0 -0
  82. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/services/storage/storage_cs_store.py +0 -0
  83. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/services/storage/storage_factory.py +0 -0
  84. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/services/storage/storage_store.py +0 -0
  85. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/services/user_setting/__init__.py +0 -0
  86. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/services/user_setting/user_setting_factory.py +0 -0
  87. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/services/user_setting/user_setting_fs_store.py +0 -0
  88. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/static/docs/tools/index.html +0 -0
  89. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/api_functional_tests.py +0 -0
  90. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/api_stress_test.py +0 -0
  91. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/shared_hatch_tests.py +0 -0
  92. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/test_botrun_app.py +0 -0
  93. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/test_files/(/346/272/253/351/246/250/346/210/220/346/236/234 /350/241/214/346/224/277/350/253/213/347/244/272/345/214/257/347/270/275)20250210/345/220/221 /344/270/212/344/272/272/345/240/261/345/221/212/347/260/241/345/240/261 (1).pdf" +0 -0
  94. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/test_files/11206_10808/344/272/272/345/217/243/346/225/270(3/346/256/265/345/271/264/351/275/241/347/265/204+/346/257/224/347/216/207)/345/244/251/344/270/213/351/233/234/350/252/2141.pdf" +0 -0
  95. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/test_files/1120701A/346/265/267/345/273/243/351/233/242/345/262/270/351/242/250/345/212/233/347/231/274/351/233/273/350/250/210/347/225/253/347/222/260/345/242/203/345/275/261/351/237/277/350/252/252/346/230/216/346/233/270-C04.PDF" +0 -0
  96. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/test_files/ImportedPhoto.760363950.029251.jpeg +0 -0
  97. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/test_files/ImportedPhoto.760363950.030446.jpeg +0 -0
  98. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/test_files/ImportedPhoto.760363950.031127.jpeg +0 -0
  99. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/test_files/d5712343.jpg +0 -0
  100. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/test_files/spot_difference_1.png +0 -0
  101. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/test_files/spot_difference_2.png +0 -0
  102. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/test_html_util.py +0 -0
  103. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/test_img_analyzer.py +0 -0
  104. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/test_img_util.py +0 -0
  105. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/test_local_files.py +0 -0
  106. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/test_mermaid_util.py +0 -0
  107. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/test_pdf_analyzer.py +0 -0
  108. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/test_plotly_util.py +0 -0
  109. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tests/test_run_workflow_engine.py +0 -0
  110. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tools/generate_docs.py +0 -0
  111. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/tools/templates/tools.html +0 -0
  112. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/utils/__init__.py +0 -0
  113. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/utils/botrun_logger.py +0 -0
  114. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/utils/clients/__init__.py +0 -0
  115. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/utils/clients/rate_limit_client.py +0 -0
  116. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/utils/clients/token_verify_client.py +0 -0
  117. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/utils/google_drive_utils.py +0 -0
  118. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/utils/langchain_utils.py +0 -0
  119. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/botrun_flow_lang/utils/yaml_utils.py +0 -0
  120. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/cloudbuild_template.yaml +0 -0
  121. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/convert_newlines.sh +0 -0
  122. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/deploy.sh +0 -0
  123. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/langgraph.json +0 -0
  124. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/poetry.toml +0 -0
  125. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/requirements_fast.txt +0 -0
  126. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/sh/deploy_bigline.sh +0 -0
  127. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/sh/deploy_dev.sh +0 -0
  128. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/sh/deploy_evaldev.sh +0 -0
  129. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/sh/deploy_fast.sh +0 -0
  130. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/sh/deploy_prod.sh +0 -0
  131. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/sh/deploy_sebaline.sh +0 -0
  132. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/sh/firestore_checkpointer_delete_thread.py +0 -0
  133. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/sh/generate_docs.sh +0 -0
  134. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/sh/llm_time_test.py +0 -0
  135. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/sh/run_langgraph.py +0 -0
  136. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/sh/run_langgraph_react.py +0 -0
  137. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/sh/run_youtube_summary.py +0 -0
  138. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/sh/scrape_pdf.py +0 -0
  139. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/sh/seba_pypi.sh +0 -0
  140. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/sh/subsidy_test.py +0 -0
  141. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/specs/gov-search/agent-architecture-upgrade.excalidraw +0 -0
  142. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/specs/gov-search/line_dev.excalidraw +0 -0
  143. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/specs/gov-search/subsidy_agent.excalidraw +0 -0
  144. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/specs/gov-search/subsidy_agent_dev.excalidraw +0 -0
  145. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/specs/gov-search/temp_txt.md +0 -0
  146. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/specs/gov-search/temp_txt2.md +0 -0
  147. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/specs/gov-search//346/264/245/350/262/274line/345/276/205/350/250/216/350/253/226.excalidraw" +0 -0
  148. {botrun_flow_lang-5.10.32 → botrun_flow_lang-5.10.83}/specs/system_thinking.excalidraw +0 -0
@@ -1,3 +1,13 @@
1
+ ## [5.10.82]
2
+ ### Updated
3
+ - claude 原本使用 4 的模型都改成 4.5
4
+ - botrun-hatch 升級
5
+
6
+ ## [5.10.32]
7
+ ### Updated
8
+ - 修正 default_mcp 要回傳給使用者 URL 的 prompt,拿掉負面表述,加入 one shot
9
+ - claude openrouter 預設模型改為 anthropic/claude-sonnet-4.5
10
+
1
11
  ## [5.9.301]
2
12
  ### Updated
3
13
  - 修正 default_mcp 要回傳給使用者 URL 的 prompt,讓語氣更明確,並直接提供 markdown 格式
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: botrun-flow-lang
3
- Version: 5.10.32
3
+ Version: 5.10.83
4
4
  Summary: A flow language for botrun
5
5
  Author-email: sebastian-hsu <sebastian.hsu@gmail.com>
6
6
  License: MIT
@@ -13,7 +13,7 @@ Requires-Python: <3.13,>=3.11
13
13
  Requires-Dist: aiohttp>=3.10.8
14
14
  Requires-Dist: anthropic>=0.61.0
15
15
  Requires-Dist: boto3>=1.40.3
16
- Requires-Dist: botrun-hatch>=5.6.101
16
+ Requires-Dist: botrun-hatch>=5.10.82
17
17
  Requires-Dist: botrun-log>=0.3.0
18
18
  Requires-Dist: cachetools>=5.5.2
19
19
  Requires-Dist: chardet>=5.2.0
@@ -23,7 +23,7 @@ Requires-Dist: google-auth>=2.40.3
23
23
  Requires-Dist: google-cloud-discoveryengine>=0.13.3
24
24
  Requires-Dist: google-cloud-firestore>=2.21.0
25
25
  Requires-Dist: google-cloud-logging>=3.11.4
26
- Requires-Dist: google-cloud-storage>=3.2.0
26
+ Requires-Dist: google-cloud-storage<3,>=2.18
27
27
  Requires-Dist: google-genai>=1.28.0
28
28
  Requires-Dist: jinja2>=3.1.6
29
29
  Requires-Dist: langchain-anthropic>=0.3.10
@@ -32,6 +32,7 @@ Requires-Dist: langchain-community>=0.3.27
32
32
  Requires-Dist: langchain-core>=0.3.72
33
33
  Requires-Dist: langchain-google-community>=2.0.3
34
34
  Requires-Dist: langchain-google-genai>=2.0.9
35
+ Requires-Dist: langchain-google-vertexai<3.0.0,>=2.1.2
35
36
  Requires-Dist: langchain-mcp-adapters>=0.1.7
36
37
  Requires-Dist: langchain-openai>=0.3.28
37
38
  Requires-Dist: langchain>=0.3.27
@@ -155,8 +155,8 @@ DEFAULT_SUPPORTED_MODELS = [
155
155
  provider="gemini",
156
156
  ),
157
157
  ModelInfo(
158
- display_name="claude-sonnet-4-20250514",
159
- model_name="claude-sonnet-4-20250514",
158
+ display_name="claude-sonnet-4-5-20250929",
159
+ model_name="claude-sonnet-4-5-20250929",
160
160
  provider="anthropic",
161
161
  ),
162
162
  ModelInfo(
@@ -251,7 +251,7 @@ DEFAULT_SUPPORTED_MODELS = [
251
251
 
252
252
  # 定義支援 agent 的 LLM models
253
253
  DEFAULT_AGENT_MODELS = [
254
- "claude-sonnet-4-20250514",
254
+ "claude-sonnet-4-5-20250929",
255
255
  "gemini-2.5-pro",
256
256
  "gemini-2.5-flash",
257
257
  ]
@@ -83,6 +83,11 @@ from langchain_anthropic import ChatAnthropic
83
83
  from langchain.tools import StructuredTool # 或 langchain_core.tools
84
84
  from langchain_mcp_adapters.client import MultiServerMCPClient
85
85
 
86
+ # ========
87
+ # for Vertex AI
88
+ from google.oauth2 import service_account
89
+ from langchain_google_vertexai.model_garden import ChatAnthropicVertex
90
+
86
91
  load_dotenv()
87
92
 
88
93
  # logger = default_logger
@@ -129,7 +134,7 @@ logger = get_default_botrun_logger()
129
134
  def get_react_agent_model_name(model_name: str = ""):
130
135
  final_model_name = model_name
131
136
  if final_model_name == "":
132
- final_model_name = "claude-sonnet-4-20250514"
137
+ final_model_name = "claude-sonnet-4-5-20250929"
133
138
  logger.info(f"final_model_name: {final_model_name}")
134
139
  return final_model_name
135
140
 
@@ -140,56 +145,94 @@ ANTHROPIC_MAX_TOKENS = 64000
140
145
  def get_react_agent_model(model_name: str = ""):
141
146
  final_model_name = get_react_agent_model_name(model_name)
142
147
  if final_model_name.startswith("gemini-"):
143
-
144
148
  model = ChatGoogleGenerativeAI(model=final_model_name, temperature=0)
145
149
  logger.info(f"model ChatGoogleGenerativeAI {final_model_name}")
146
150
  elif final_model_name.startswith("claude-"):
147
- anthropic_api_keys_str = os.getenv("ANTHROPIC_API_KEYS", "")
148
- anthropic_api_keys = [
149
- key.strip() for key in anthropic_api_keys_str.split(",") if key.strip()
150
- ]
151
- if anthropic_api_keys:
152
-
153
- model = RotatingChatAnthropic(
154
- model_name=final_model_name,
155
- keys=anthropic_api_keys,
156
- temperature=0,
157
- max_tokens=ANTHROPIC_MAX_TOKENS,
158
- )
159
- logger.info(f"model RotatingChatAnthropic {final_model_name}")
160
- elif os.getenv("OPENROUTER_API_KEY") and os.getenv("OPENROUTER_BASE_URL"):
161
-
162
- openrouter_model_name = "anthropic/claude-sonnet-4.5"
163
- # openrouter_model_name = "openai/o4-mini-high"
164
- # openrouter_model_name = "openai/gpt-4.1"
165
- model = ChatOpenAI(
166
- openai_api_key=os.getenv("OPENROUTER_API_KEY"),
167
- openai_api_base=os.getenv("OPENROUTER_BASE_URL"),
168
- model_name=openrouter_model_name,
169
- temperature=0,
170
- max_tokens=ANTHROPIC_MAX_TOKENS,
171
- model_kwargs={
172
- # "headers": {
173
- # "HTTP-Referer": getenv("YOUR_SITE_URL"),
174
- # "X-Title": getenv("YOUR_SITE_NAME"),
175
- # }
176
- },
151
+ use_vertex_ai = os.getenv("USE_VERTEX_AI", "false").lower() in ("true", "1", "yes")
152
+
153
+ if use_vertex_ai:
154
+ # 從環境變數讀取設定
155
+ vertex_location = os.getenv("VERTEX_AI_LANGCHAIN_LOCATION", "europe-west1")
156
+ vertex_model = os.getenv("VERTEX_AI_LANGCHAIN_MODEL", final_model_name)
157
+ vertex_sa_path = os.getenv("VERTEX_AI_LANGCHAIN_GOOGLE_APPLICATION_CREDENTIALS")
158
+
159
+ # 驗證 service account
160
+ credentials = None
161
+ if vertex_sa_path and os.path.exists(vertex_sa_path):
162
+ # 加入 Vertex AI 需要的 scopes
163
+ SCOPES = [
164
+ 'https://www.googleapis.com/auth/cloud-platform',
165
+ 'https://www.googleapis.com/auth/cloudplatformprojects.readonly',
166
+ ]
167
+ credentials = service_account.Credentials.from_service_account_file(
168
+ vertex_sa_path,
169
+ scopes=SCOPES
170
+ )
171
+ logger.info(f"Using Vertex AI service account from {vertex_sa_path}")
172
+ else:
173
+ logger.warning(
174
+ "VERTEX_AI_GOOGLE_APPLICATION_CREDENTIALS not set or file not found. Using ADC if available.")
175
+
176
+ # 初始化 ChatAnthropicVertex
177
+ model = ChatAnthropicVertex(
178
+ model=vertex_model,
179
+ location=vertex_location,
180
+ credentials=credentials,
181
+ temperature=0
177
182
  )
178
- logger.info(f"model OpenRouter {openrouter_model_name}")
183
+ logger.info(f"model ChatAnthropicVertex {vertex_model} @ {vertex_location}")
184
+
179
185
  else:
186
+ anthropic_api_keys_str = os.getenv("ANTHROPIC_API_KEYS", "")
187
+ anthropic_api_keys = [
188
+ key.strip() for key in anthropic_api_keys_str.split(",") if key.strip()
189
+ ]
190
+ if anthropic_api_keys:
191
+
192
+ model = RotatingChatAnthropic(
193
+ model_name=final_model_name,
194
+ keys=anthropic_api_keys,
195
+ temperature=0,
196
+ max_tokens=ANTHROPIC_MAX_TOKENS,
197
+ )
198
+ logger.info(f"model RotatingChatAnthropic {final_model_name}")
199
+ elif os.getenv("OPENROUTER_API_KEY") and os.getenv("OPENROUTER_BASE_URL"):
200
+
201
+ openrouter_model_name = "anthropic/claude-sonnet-4.5"
202
+ # openrouter_model_name = "openai/o4-mini-high"
203
+ # openrouter_model_name = "openai/gpt-4.1"
204
+ model = ChatOpenAI(
205
+ openai_api_key=os.getenv("OPENROUTER_API_KEY"),
206
+ openai_api_base=os.getenv("OPENROUTER_BASE_URL"),
207
+ model_name=openrouter_model_name,
208
+ temperature=0,
209
+ max_tokens=ANTHROPIC_MAX_TOKENS,
210
+ model_kwargs={
211
+ # "headers": {
212
+ # "HTTP-Referer": getenv("YOUR_SITE_URL"),
213
+ # "X-Title": getenv("YOUR_SITE_NAME"),
214
+ # }
215
+ },
216
+ )
217
+ logger.info(f"model OpenRouter {openrouter_model_name}")
218
+ else:
219
+
220
+ model = ChatAnthropic(
221
+ model=final_model_name,
222
+ temperature=0,
223
+ max_tokens=ANTHROPIC_MAX_TOKENS,
224
+ # model_kwargs={
225
+ # "extra_headers": {
226
+ # "anthropic-beta": "token-efficient-tools-2025-02-19",
227
+ # "anthropic-beta": "output-128k-2025-02-19",
228
+ # }
229
+ # },
230
+ )
231
+ logger.info(f"model ChatAnthropic {final_model_name}")
232
+
233
+ else:
234
+ raise ValueError(f"Unknown model name prefix: {final_model_name}")
180
235
 
181
- model = ChatAnthropic(
182
- model=final_model_name,
183
- temperature=0,
184
- max_tokens=ANTHROPIC_MAX_TOKENS,
185
- # model_kwargs={
186
- # "extra_headers": {
187
- # "anthropic-beta": "token-efficient-tools-2025-02-19",
188
- # "anthropic-beta": "output-128k-2025-02-19",
189
- # }
190
- # },
191
- )
192
- logger.info(f"model ChatAnthropic {final_model_name}")
193
236
  return model
194
237
 
195
238
 
@@ -419,7 +462,7 @@ async def create_react_agent_graph(
419
462
  system_prompt: The system prompt to use for the agent (used directly, no concatenation)
420
463
  botrun_flow_lang_url: URL for botrun flow lang service (reserved for future use)
421
464
  user_id: User identifier (reserved for future use)
422
- model_name: AI model name to use (defaults to claude-sonnet-4-20250514)
465
+ model_name: AI model name to use (defaults to claude-sonnet-4-5-20250929)
423
466
  lang: Language code affecting language-specific tools (e.g., "en", "zh-TW")
424
467
  mcp_config: MCP servers configuration dict providing tools like scrape, chat_with_pdf, etc.
425
468
 
@@ -49,7 +49,7 @@ def get_img_content_type(file_path: str | Path) -> str:
49
49
 
50
50
 
51
51
  def analyze_imgs_with_claude(
52
- img_urls: list[str], user_input: str, model_name: str = "claude-sonnet-4-20250514"
52
+ img_urls: list[str], user_input: str, model_name: str = "claude-sonnet-4-5-20250929"
53
53
  ) -> str:
54
54
  """
55
55
  Analyze multiple images using Claude Vision API
@@ -9,15 +9,17 @@ from langchain_openai import ChatOpenAI
9
9
  from langchain_google_genai import ChatGoogleGenerativeAI
10
10
 
11
11
 
12
- def get_model_instance(model_name: str, temperature: float = 0, enable_code_execution: bool = False):
12
+ def get_model_instance(
13
+ model_name: str, temperature: float = 0, enable_code_execution: bool = False
14
+ ):
13
15
  """
14
16
  統一的模型實例獲取函數
15
-
17
+
16
18
  Args:
17
19
  model_name: 模型名稱
18
20
  temperature: 溫度參數
19
21
  enable_code_execution: 是否啟用代碼執行(僅 Gemini 2.5 支援)
20
-
22
+
21
23
  Returns:
22
24
  對應的模型實例
23
25
  """
@@ -25,20 +27,18 @@ def get_model_instance(model_name: str, temperature: float = 0, enable_code_exec
25
27
  model_kwargs = {}
26
28
  if enable_code_execution and "2.5" in model_name:
27
29
  model_kwargs["enable_code_execution"] = True
28
-
30
+
29
31
  return ChatGoogleGenerativeAI(
30
- model=model_name,
31
- temperature=temperature,
32
- **model_kwargs
32
+ model=model_name, temperature=temperature, **model_kwargs
33
33
  )
34
-
34
+
35
35
  elif model_name.startswith("claude-"):
36
36
  # 檢查是否有多個 Anthropic API keys
37
37
  anthropic_api_keys_str = os.getenv("ANTHROPIC_API_KEYS", "")
38
38
  anthropic_api_keys = [
39
39
  key.strip() for key in anthropic_api_keys_str.split(",") if key.strip()
40
40
  ]
41
-
41
+
42
42
  if anthropic_api_keys:
43
43
  return RotatingChatAnthropic(
44
44
  model_name=model_name,
@@ -47,7 +47,7 @@ def get_model_instance(model_name: str, temperature: float = 0, enable_code_exec
47
47
  max_tokens=64000,
48
48
  )
49
49
  elif os.getenv("OPENROUTER_API_KEY") and os.getenv("OPENROUTER_BASE_URL"):
50
- openrouter_model_name = "anthropic/claude-sonnet-4"
50
+ openrouter_model_name = "anthropic/claude-sonnet-4.5"
51
51
  return ChatOpenAI(
52
52
  openai_api_key=os.getenv("OPENROUTER_API_KEY"),
53
53
  openai_api_base=os.getenv("OPENROUTER_BASE_URL"),
@@ -61,7 +61,7 @@ def get_model_instance(model_name: str, temperature: float = 0, enable_code_exec
61
61
  temperature=temperature,
62
62
  max_tokens=64000,
63
63
  )
64
-
64
+
65
65
  elif model_name.startswith("gpt-"):
66
66
  if os.getenv("OPENROUTER_API_KEY") and os.getenv("OPENROUTER_BASE_URL"):
67
67
  return ChatOpenAI(
@@ -77,7 +77,7 @@ def get_model_instance(model_name: str, temperature: float = 0, enable_code_exec
77
77
  temperature=temperature,
78
78
  max_tokens=8192,
79
79
  )
80
-
80
+
81
81
  else:
82
82
  # 預設使用 Gemini
83
83
  return ChatGoogleGenerativeAI(
@@ -11,7 +11,7 @@ load_dotenv()
11
11
 
12
12
 
13
13
  def analyze_pdf_with_claude(
14
- pdf_data: str, user_input: str, model_name: str = "claude-sonnet-4-20250514"
14
+ pdf_data: str, user_input: str, model_name: str = "claude-sonnet-4-5-20250929"
15
15
  ):
16
16
  """
17
17
  Analyze a PDF file using Claude API