Skip to content

Commit 172dc1f

Browse files
committed
build(Makefile): conditionally apply PyPI mirror based on CI environment
Makefile now conditionally applies the Tsinghua PyPI mirror only when not running in CI environment, allowing CI to use default package sources while maintaining local development speed. Makefile 现在根据是否在 CI 环境中运行来有条件地应用清华 PyPI 镜像, 在 CI 中使用默认包源,同时保持本地开发速度。 test(integration): add type ignore for astream call overload issue Added type ignore annotation for astream call overload issue in LangChain integration test to resolve type checking errors while maintaining functionality. 在 LangChain 集成测试中为 astream 调用重载问题添加类型忽略注解, 在保持功能的同时解决类型检查错误。 Change-Id: I9b573359f60941aa40936e29f33b6e56248cd810 Signed-off-by: OhYee <oyohyee@oyohyee.com>
1 parent 63421da commit 172dc1f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ install-deps:
124124
--python ${PYTHON_VERSION} \
125125
--dev \
126126
--all-extras \
127-
-i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
127+
$(if $(CI),,-i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple)
128128

129129
# ============================================================================
130130
# 测试和覆盖率

tests/unittests/integration/test_langchain_agui_integration.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,9 @@ async def invoke_agent(request: AgentRequest):
652652
# 因为 astream_events 在 CI (Linux + uvicorn 线程) 环境中
653653
# 会出现 async generator 被提前取消或事件丢失的问题。
654654
converter = AgentRunConverter()
655-
async for event in agent.astream(input_data, stream_mode="updates"):
655+
async for event in agent.astream( # type: ignore[call-overload]
656+
input_data, stream_mode="updates"
657+
):
656658
for item in converter.convert(event):
657659
yield item
658660

0 commit comments

Comments
 (0)