Skip to content

Commit 4012e10

Browse files
author
keqian
committed
添加langsmith 监控服务
1 parent b6d50a2 commit 4012e10

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

.env.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ DEFAULT_SESSION_ID=default_session
2323
MEMORY_KEY=chat_history
2424
MAX_HISTORY_MESSAGES=20
2525

26+
# ===========================================
27+
# LANGSMITH 监控配置
28+
# ===========================================
29+
LANGSMITH_TRACING=true
30+
LANGSMITH_ENDPOINT=https://api.smith.langchain.com
31+
LANGSMITH_API_KEY=your_langsmithapi_key_here
32+
LANGSMITH_PROJECT=mystical-oracle
33+
2634
# ===========================================
2735
# API 密钥 (API Keys) - 可选配置
2836
# ===========================================

.env.template

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ DEFAULT_SESSION_ID=King
2323
MEMORY_KEY=chat_history
2424
MAX_HISTORY_MESSAGES=10
2525

26+
# ===========================================
27+
# LANGSMITH 监控配置
28+
# ===========================================
29+
LANGSMITH_TRACING=true
30+
LANGSMITH_ENDPOINT=https://api.smith.langchain.com
31+
LANGSMITH_API_KEY=your_langsmithapi_key_here
32+
LANGSMITH_PROJECT=mystical-oracle
33+
2634
# ===========================================
2735
# API 密钥 (API Keys) - 必须配置
2836
# ===========================================

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ mystical-oracle/
7878
# 模型配置
7979
OLLAMA_MODEL=qwen2.5:latest
8080
OLLAMA_BASE_URL=http://localhost:11434
81+
82+
# LangSmith 监控配置
83+
LANGSMITH_API_KEY=your_langsmithapi_key_here
8184
```
8285

8386
4. **启动外部服务**

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ starlette==0.47.2
66

77
# LangChain framework
88
langchain==0.3.26
9+
langsmith==0.4.10
910
langchain-community==0.3.27
1011
langchain-core==0.3.69
1112
langchain-ollama==0.3.5

0 commit comments

Comments
 (0)