botrun-flow-lang 5.10.82__tar.gz → 5.10.131__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.
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/CHANGELOG.md +4 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/PKG-INFO +3 -2
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/langgraph_react_agent.py +91 -42
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/poetry.lock +423 -22
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/pyproject.toml +3 -2
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/.env_template +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/.gcloudignore +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/.gitignore +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/.vscode/launch.json +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/CLAUDE.md +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/Dockerfile.template +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/README.md +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/__init__.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/api/__init__.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/api/auth_api.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/api/auth_utils.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/api/botrun_back_api.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/api/flow_api.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/api/hatch_api.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/api/langgraph_api.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/api/line_bot_api.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/api/model_api.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/api/rate_limit_api.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/api/routes.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/api/search_api.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/api/storage_api.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/api/subsidy_api.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/api/subsidy_api_system_prompt.txt +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/api/user_setting_api.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/api/version_api.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/api/youtube_api.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/constants.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/__init__.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/__init__.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/agent_runner.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/agent_tools/__init__.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/agent_tools/step_planner.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/checkpointer/__init__.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/checkpointer/firestore_checkpointer.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/gov_researcher/GOV_RESEARCHER_PRD.md +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/gov_researcher/__init__.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/gov_researcher/gov_researcher_2_graph.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/gov_researcher/gov_researcher_graph.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/search_agent_graph.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/tools/__init__.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/tools/gemini_code_execution.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/util/__init__.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/util/gemini_grounding.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/util/html_util.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/util/img_util.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/util/local_files.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/util/mermaid_util.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/util/model_utils.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/util/pdf_analyzer.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/util/perplexity_search.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/util/plotly_util.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/util/tavily_search.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/agents/util/youtube_util.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/cache/__init__.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/langgraph_agents/cache/langgraph_botrun_cache.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/llm_agent/__init__.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/llm_agent/llm_agent.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/llm_agent/llm_agent_util.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/log/.gitignore +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/main.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/main_fast.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/mcp_server/__init__.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/mcp_server/default_mcp.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/models/__init__.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/models/nodes/utils.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/models/token_usage.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/requirements.txt +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/services/__init__.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/services/base/firestore_base.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/services/hatch/__init__.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/services/hatch/hatch_factory.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/services/hatch/hatch_fs_store.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/services/storage/__init__.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/services/storage/storage_cs_store.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/services/storage/storage_factory.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/services/storage/storage_store.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/services/user_setting/__init__.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/services/user_setting/user_setting_factory.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/services/user_setting/user_setting_fs_store.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/static/docs/tools/index.html +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tests/api_functional_tests.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tests/api_stress_test.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tests/shared_hatch_tests.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tests/test_botrun_app.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/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
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/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
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/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
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tests/test_files/ImportedPhoto.760363950.029251.jpeg +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tests/test_files/ImportedPhoto.760363950.030446.jpeg +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tests/test_files/ImportedPhoto.760363950.031127.jpeg +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tests/test_files/d5712343.jpg +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tests/test_files/spot_difference_1.png +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tests/test_files/spot_difference_2.png +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tests/test_html_util.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tests/test_img_analyzer.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tests/test_img_util.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tests/test_local_files.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tests/test_mermaid_util.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tests/test_pdf_analyzer.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tests/test_plotly_util.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tests/test_run_workflow_engine.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tools/generate_docs.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/tools/templates/tools.html +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/utils/__init__.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/utils/botrun_logger.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/utils/clients/__init__.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/utils/clients/rate_limit_client.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/utils/clients/token_verify_client.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/utils/google_drive_utils.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/utils/langchain_utils.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/botrun_flow_lang/utils/yaml_utils.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/cloudbuild_template.yaml +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/convert_newlines.sh +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/deploy.sh +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/langgraph.json +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/poetry.toml +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/requirements.txt +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/requirements_fast.txt +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/sh/deploy_bigline.sh +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/sh/deploy_dev.sh +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/sh/deploy_evaldev.sh +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/sh/deploy_fast.sh +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/sh/deploy_prod.sh +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/sh/deploy_sebaline.sh +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/sh/firestore_checkpointer_delete_thread.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/sh/generate_docs.sh +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/sh/llm_time_test.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/sh/run_langgraph.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/sh/run_langgraph_react.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/sh/run_youtube_summary.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/sh/scrape_pdf.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/sh/seba_pypi.sh +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/sh/subsidy_test.py +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/specs/gov-search/agent-architecture-upgrade.excalidraw +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/specs/gov-search/line_dev.excalidraw +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/specs/gov-search/subsidy_agent.excalidraw +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/specs/gov-search/subsidy_agent_dev.excalidraw +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/specs/gov-search/temp_txt.md +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/specs/gov-search/temp_txt2.md +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/specs/gov-search//346/264/245/350/262/274line/345/276/205/350/250/216/350/253/226.excalidraw" +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/specs/system_thinking.excalidraw +0 -0
- {botrun_flow_lang-5.10.82 → botrun_flow_lang-5.10.131}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: botrun-flow-lang
|
|
3
|
-
Version: 5.10.
|
|
3
|
+
Version: 5.10.131
|
|
4
4
|
Summary: A flow language for botrun
|
|
5
5
|
Author-email: sebastian-hsu <sebastian.hsu@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -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
|
|
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
|
|
@@ -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
|
|
@@ -135,61 +140,105 @@ def get_react_agent_model_name(model_name: str = ""):
|
|
|
135
140
|
|
|
136
141
|
|
|
137
142
|
ANTHROPIC_MAX_TOKENS = 64000
|
|
143
|
+
GEMINI_MAX_TOKENS = 32000
|
|
138
144
|
|
|
139
145
|
|
|
140
146
|
def get_react_agent_model(model_name: str = ""):
|
|
141
147
|
final_model_name = get_react_agent_model_name(model_name)
|
|
142
148
|
if final_model_name.startswith("gemini-"):
|
|
143
|
-
|
|
144
|
-
|
|
149
|
+
model = ChatGoogleGenerativeAI(
|
|
150
|
+
model=final_model_name, temperature=0, max_tokens=GEMINI_MAX_TOKENS
|
|
151
|
+
)
|
|
145
152
|
logger.info(f"model ChatGoogleGenerativeAI {final_model_name}")
|
|
146
153
|
elif final_model_name.startswith("claude-"):
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
154
|
+
# use_vertex_ai = os.getenv("USE_VERTEX_AI", "false").lower() in ("true", "1", "yes")
|
|
155
|
+
vertex_location = os.getenv("VERTEX_AI_LANGCHAIN_LOCATION", "")
|
|
156
|
+
vertex_model = os.getenv("VERTEX_AI_LANGCHAIN_MODEL", "")
|
|
157
|
+
vertex_sa_path = os.getenv(
|
|
158
|
+
"VERTEX_AI_LANGCHAIN_GOOGLE_APPLICATION_CREDENTIALS", ""
|
|
159
|
+
)
|
|
152
160
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
)
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
161
|
+
if vertex_location and vertex_model and vertex_sa_path:
|
|
162
|
+
# 從環境變數讀取設定
|
|
163
|
+
|
|
164
|
+
# 驗證 service account
|
|
165
|
+
credentials = None
|
|
166
|
+
if vertex_sa_path and os.path.exists(vertex_sa_path):
|
|
167
|
+
# 加入 Vertex AI 需要的 scopes
|
|
168
|
+
SCOPES = [
|
|
169
|
+
"https://www.googleapis.com/auth/cloud-platform",
|
|
170
|
+
"https://www.googleapis.com/auth/cloudplatformprojects.readonly",
|
|
171
|
+
]
|
|
172
|
+
credentials = service_account.Credentials.from_service_account_file(
|
|
173
|
+
vertex_sa_path, scopes=SCOPES
|
|
174
|
+
)
|
|
175
|
+
logger.info(f"Using Vertex AI service account from {vertex_sa_path}")
|
|
176
|
+
else:
|
|
177
|
+
logger.warning(
|
|
178
|
+
"VERTEX_AI_GOOGLE_APPLICATION_CREDENTIALS not set or file not found. Using ADC if available."
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
# 初始化 ChatAnthropicVertex
|
|
182
|
+
model = ChatAnthropicVertex(
|
|
183
|
+
model=vertex_model,
|
|
184
|
+
location=vertex_location,
|
|
185
|
+
credentials=credentials,
|
|
169
186
|
temperature=0,
|
|
170
187
|
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
|
-
},
|
|
177
188
|
)
|
|
178
|
-
logger.info(f"model
|
|
189
|
+
logger.info(f"model ChatAnthropicVertex {vertex_model} @ {vertex_location}")
|
|
190
|
+
|
|
179
191
|
else:
|
|
192
|
+
anthropic_api_keys_str = os.getenv("ANTHROPIC_API_KEYS", "")
|
|
193
|
+
anthropic_api_keys = [
|
|
194
|
+
key.strip() for key in anthropic_api_keys_str.split(",") if key.strip()
|
|
195
|
+
]
|
|
196
|
+
if anthropic_api_keys:
|
|
197
|
+
|
|
198
|
+
model = RotatingChatAnthropic(
|
|
199
|
+
model_name=final_model_name,
|
|
200
|
+
keys=anthropic_api_keys,
|
|
201
|
+
temperature=0,
|
|
202
|
+
max_tokens=ANTHROPIC_MAX_TOKENS,
|
|
203
|
+
)
|
|
204
|
+
logger.info(f"model RotatingChatAnthropic {final_model_name}")
|
|
205
|
+
elif os.getenv("OPENROUTER_API_KEY") and os.getenv("OPENROUTER_BASE_URL"):
|
|
206
|
+
|
|
207
|
+
openrouter_model_name = "anthropic/claude-sonnet-4.5"
|
|
208
|
+
# openrouter_model_name = "openai/o4-mini-high"
|
|
209
|
+
# openrouter_model_name = "openai/gpt-4.1"
|
|
210
|
+
model = ChatOpenAI(
|
|
211
|
+
openai_api_key=os.getenv("OPENROUTER_API_KEY"),
|
|
212
|
+
openai_api_base=os.getenv("OPENROUTER_BASE_URL"),
|
|
213
|
+
model_name=openrouter_model_name,
|
|
214
|
+
temperature=0,
|
|
215
|
+
max_tokens=ANTHROPIC_MAX_TOKENS,
|
|
216
|
+
model_kwargs={
|
|
217
|
+
# "headers": {
|
|
218
|
+
# "HTTP-Referer": getenv("YOUR_SITE_URL"),
|
|
219
|
+
# "X-Title": getenv("YOUR_SITE_NAME"),
|
|
220
|
+
# }
|
|
221
|
+
},
|
|
222
|
+
)
|
|
223
|
+
logger.info(f"model OpenRouter {openrouter_model_name}")
|
|
224
|
+
else:
|
|
225
|
+
|
|
226
|
+
model = ChatAnthropic(
|
|
227
|
+
model=final_model_name,
|
|
228
|
+
temperature=0,
|
|
229
|
+
max_tokens=ANTHROPIC_MAX_TOKENS,
|
|
230
|
+
# model_kwargs={
|
|
231
|
+
# "extra_headers": {
|
|
232
|
+
# "anthropic-beta": "token-efficient-tools-2025-02-19",
|
|
233
|
+
# "anthropic-beta": "output-128k-2025-02-19",
|
|
234
|
+
# }
|
|
235
|
+
# },
|
|
236
|
+
)
|
|
237
|
+
logger.info(f"model ChatAnthropic {final_model_name}")
|
|
238
|
+
|
|
239
|
+
else:
|
|
240
|
+
raise ValueError(f"Unknown model name prefix: {final_model_name}")
|
|
180
241
|
|
|
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
242
|
return model
|
|
194
243
|
|
|
195
244
|
|