Skip to content

Commit 01b2461

Browse files
yuyutaotaozhoushaw
andauthored
fix: upgrade langsmith sdk (#374)
--------- Co-authored-by: zhouxiao.shaw <[email protected]>
1 parent d1e2e2b commit 01b2461

File tree

4 files changed

+689
-209
lines changed

4 files changed

+689
-209
lines changed

apps/site/docs/en/API.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,12 @@ LangSmith is a platform designed to debug the LLMs. To integrate LangSmith, plea
156156
export MIDSCENE_LANGSMITH_DEBUG=1
157157

158158
# LangSmith config
159-
export LANGCHAIN_TRACING_V2=true
160-
export LANGCHAIN_ENDPOINT="https://api.smith.langchain.com"
161-
export LANGCHAIN_API_KEY="your_key_here"
162-
export LANGCHAIN_PROJECT="your_project_name_here"
159+
export LANGSMITH_TRACING_V2=true
160+
export LANGSMITH_ENDPOINT="https://api.smith.langchain.com"
161+
export LANGSMITH_API_KEY="your_key_here"
162+
export LANGSMITH_PROJECT="your_project_name_here"
163+
164+
# Due to a backward compatibility issue of LangSmith, for users who use Midscene <= 0.10.6, you need to set the variables starting with `LANGCHAIN_` instead of `LANGSMITH_`.
163165
```
164166

165167
Launch Midscene, you should see logs like this:

apps/site/docs/zh/API.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ LangSmith 是一个用于调试大语言模型的平台。想要集成 LangSmith
152152
export MIDSCENE_LANGSMITH_DEBUG=1
153153

154154
# LangSmith 配置
155-
export LANGCHAIN_TRACING_V2=true
156-
export LANGCHAIN_ENDPOINT="https://api.smith.langchain.com"
157-
export LANGCHAIN_API_KEY="your_key_here"
158-
export LANGCHAIN_PROJECT="your_project_name_here"
155+
export LANGSMITH_TRACING_V2=true
156+
export LANGSMITH_ENDPOINT="https://api.smith.langchain.com"
157+
export LANGSMITH_API_KEY="your_key_here"
158+
export LANGSMITH_PROJECT="your_project_name_here"
159159
```
160160

161161
启动 Midscene 后,你应该会看到类似如下的日志:

packages/midscene/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,21 @@
4040
"prepublishOnly": "npm run build"
4141
},
4242
"dependencies": {
43-
"@azure/identity": "4.5.0",
44-
"@ui-tars/action-parser": "1.0.1",
4543
"@anthropic-ai/sdk": "0.33.1",
46-
"@midscene/shared": "workspace:*",
44+
"@azure/identity": "4.5.0",
4745
"@langchain/core": "0.3.26",
48-
"socks-proxy-agent": "8.0.4",
49-
"openai": "4.81.0"
46+
"@midscene/shared": "workspace:*",
47+
"@ui-tars/action-parser": "1.0.1",
48+
"openai": "4.81.0",
49+
"socks-proxy-agent": "8.0.4"
5050
},
5151
"devDependencies": {
5252
"@modern-js/module-tools": "2.60.6",
5353
"@types/node": "^18.0.0",
5454
"@types/node-fetch": "2.6.11",
5555
"dirty-json": "0.9.2",
5656
"dotenv": "16.4.5",
57-
"langsmith": "0.1.36",
57+
"langsmith": "0.3.7",
5858
"typescript": "~5.0.4",
5959
"vitest": "^1.6.0"
6060
},

0 commit comments

Comments
 (0)