botrun-flow-lang 5.10.131__py3-none-any.whl → 5.10.141__py3-none-any.whl
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/langgraph_agents/agents/langgraph_react_agent.py +6 -3
- {botrun_flow_lang-5.10.131.dist-info → botrun_flow_lang-5.10.141.dist-info}/METADATA +5 -6
- {botrun_flow_lang-5.10.131.dist-info → botrun_flow_lang-5.10.141.dist-info}/RECORD +4 -4
- {botrun_flow_lang-5.10.131.dist-info → botrun_flow_lang-5.10.141.dist-info}/WHEEL +0 -0
|
@@ -152,13 +152,14 @@ def get_react_agent_model(model_name: str = ""):
|
|
|
152
152
|
logger.info(f"model ChatGoogleGenerativeAI {final_model_name}")
|
|
153
153
|
elif final_model_name.startswith("claude-"):
|
|
154
154
|
# use_vertex_ai = os.getenv("USE_VERTEX_AI", "false").lower() in ("true", "1", "yes")
|
|
155
|
+
vertex_project = os.getenv("VERTEX_AI_LANGCHAIN_PROJECT", "")
|
|
155
156
|
vertex_location = os.getenv("VERTEX_AI_LANGCHAIN_LOCATION", "")
|
|
156
157
|
vertex_model = os.getenv("VERTEX_AI_LANGCHAIN_MODEL", "")
|
|
157
158
|
vertex_sa_path = os.getenv(
|
|
158
159
|
"VERTEX_AI_LANGCHAIN_GOOGLE_APPLICATION_CREDENTIALS", ""
|
|
159
160
|
)
|
|
160
161
|
|
|
161
|
-
if vertex_location and vertex_model and vertex_sa_path:
|
|
162
|
+
if vertex_location and vertex_model and vertex_sa_path and vertex_project:
|
|
162
163
|
# 從環境變數讀取設定
|
|
163
164
|
|
|
164
165
|
# 驗證 service account
|
|
@@ -167,7 +168,6 @@ def get_react_agent_model(model_name: str = ""):
|
|
|
167
168
|
# 加入 Vertex AI 需要的 scopes
|
|
168
169
|
SCOPES = [
|
|
169
170
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
170
|
-
"https://www.googleapis.com/auth/cloudplatformprojects.readonly",
|
|
171
171
|
]
|
|
172
172
|
credentials = service_account.Credentials.from_service_account_file(
|
|
173
173
|
vertex_sa_path, scopes=SCOPES
|
|
@@ -180,13 +180,16 @@ def get_react_agent_model(model_name: str = ""):
|
|
|
180
180
|
|
|
181
181
|
# 初始化 ChatAnthropicVertex
|
|
182
182
|
model = ChatAnthropicVertex(
|
|
183
|
+
project=vertex_project,
|
|
183
184
|
model=vertex_model,
|
|
184
185
|
location=vertex_location,
|
|
185
186
|
credentials=credentials,
|
|
186
187
|
temperature=0,
|
|
187
188
|
max_tokens=ANTHROPIC_MAX_TOKENS,
|
|
188
189
|
)
|
|
189
|
-
logger.info(
|
|
190
|
+
logger.info(
|
|
191
|
+
f"model ChatAnthropicVertex {vertex_project} @ {vertex_model} @ {vertex_location}"
|
|
192
|
+
)
|
|
190
193
|
|
|
191
194
|
else:
|
|
192
195
|
anthropic_api_keys_str = os.getenv("ANTHROPIC_API_KEYS", "")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: botrun-flow-lang
|
|
3
|
-
Version: 5.10.
|
|
3
|
+
Version: 5.10.141
|
|
4
4
|
Summary: A flow language for botrun
|
|
5
5
|
Author-email: sebastian-hsu <sebastian.hsu@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -65,14 +65,13 @@ Description-Content-Type: text/markdown
|
|
|
65
65
|
|
|
66
66
|
## 開發環境安裝
|
|
67
67
|
- 使用 Python 3.11.9
|
|
68
|
-
- 安裝
|
|
69
|
-
- 安裝
|
|
70
|
-
- 記得參考 `修改config,建立專案內.venv虛擬環境`章節,設定 `virtualenvs.in-project = true`
|
|
68
|
+
- 安裝 uv 來管理 python 套件
|
|
69
|
+
- 安裝 uv 可以參考: [官方文件](https://docs.astral.sh/uv/getting-started/installation/)
|
|
71
70
|
- 第一次使用在 /project_folder/ 下執行
|
|
72
71
|
```bash
|
|
73
|
-
|
|
72
|
+
uv sync
|
|
74
73
|
```
|
|
75
|
-
- 之後如果需要新增/刪除套件,需要執行 `
|
|
74
|
+
- 之後如果需要新增/刪除套件,需要執行 `uv add xxx` , `uv remove xxx`
|
|
76
75
|
|
|
77
76
|
|
|
78
77
|
## 要進行本地端 fastapi 的開發
|
|
@@ -24,7 +24,7 @@ botrun_flow_lang/api/youtube_api.py,sha256=R384jNRheMKnDyzvlLnbzackipZhiLYTZl4w4
|
|
|
24
24
|
botrun_flow_lang/langgraph_agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
25
|
botrun_flow_lang/langgraph_agents/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
26
|
botrun_flow_lang/langgraph_agents/agents/agent_runner.py,sha256=fOZgHDsCA_EDTTGQFBmhGUhpfLB3m_N6YW2UHgMpKBg,6241
|
|
27
|
-
botrun_flow_lang/langgraph_agents/agents/langgraph_react_agent.py,sha256=
|
|
27
|
+
botrun_flow_lang/langgraph_agents/agents/langgraph_react_agent.py,sha256=FA7ovxgHwLNzzbf9UyWwAkn81H1FjLjDgqH6v_vDF88,24961
|
|
28
28
|
botrun_flow_lang/langgraph_agents/agents/search_agent_graph.py,sha256=6fz-ewLQGacEx-uqGfF3-go9FdiioiMzW_sfANzYTcI,31182
|
|
29
29
|
botrun_flow_lang/langgraph_agents/agents/agent_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
30
|
botrun_flow_lang/langgraph_agents/agents/agent_tools/step_planner.py,sha256=CgEhfGR28Rq7ui9cKxj_DczfNfjJNXIP9DXQNIwBLv0,2350
|
|
@@ -94,6 +94,6 @@ botrun_flow_lang/utils/yaml_utils.py,sha256=1A6PSEE8TM0HSD_6l-fhUsjYnXJcrEKuPgot
|
|
|
94
94
|
botrun_flow_lang/utils/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
95
95
|
botrun_flow_lang/utils/clients/rate_limit_client.py,sha256=TRpA56OKrfYsoLoJ-TPYlC7Znp9s267-u6CX6BLyVko,8349
|
|
96
96
|
botrun_flow_lang/utils/clients/token_verify_client.py,sha256=BtrfLvMe-DtS8UKeDhaIkVKDZHphZVP7kyqXn9jhXEc,5740
|
|
97
|
-
botrun_flow_lang-5.10.
|
|
98
|
-
botrun_flow_lang-5.10.
|
|
99
|
-
botrun_flow_lang-5.10.
|
|
97
|
+
botrun_flow_lang-5.10.141.dist-info/METADATA,sha256=TCSDDZEFuKcis56v4k29Tf2LBqxWU6llss86ZGl6m9s,6192
|
|
98
|
+
botrun_flow_lang-5.10.141.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
99
|
+
botrun_flow_lang-5.10.141.dist-info/RECORD,,
|
|
File without changes
|