THUDM / GLM-4

GLM-4 series: Open Multilingual Multimodal Chat LMs | 开源多语言多模态对话模型
Apache License 2.0
3.28k stars 235 forks source link

TypeError: unsupported operand type(s) for |: 'type' and '_GenericAlias' #250

Closed chuan-mt closed 3 hours ago

chuan-mt commented 4 days ago

System Info / 系統信息

python openai_api_server.py CUDA_VISIBLE_DEVICES set to: 6 Traceback (most recent call last): File "/nfs2/zhaochuan.cai/czc_demo/GLM-4/basic_demo/openai_api_server.py", line 155, in def process_response(output: str, tools: dict | List[dict] = None, use_tool: bool = False) -> Union[str, dict]: TypeError: unsupported operand type(s) for |: 'type' and '_GenericAlias'

Who can help? / 谁可以帮助到您?

python openai_api_server.py CUDA_VISIBLE_DEVICES set to: 6 Traceback (most recent call last): File "/nfs2/zhaochuan.cai/czc_demo/GLM-4/basic_demo/openai_api_server.py", line 155, in def process_response(output: str, tools: dict | List[dict] = None, use_tool: bool = False) -> Union[str, dict]: TypeError: unsupported operand type(s) for |: 'type' and '_GenericAlias'

Information / 问题信息

Reproduction / 复现过程

python openai_api_server.py CUDA_VISIBLE_DEVICES set to: 6 Traceback (most recent call last): File "/nfs2/zhaochuan.cai/czc_demo/GLM-4/basic_demo/openai_api_server.py", line 155, in def process_response(output: str, tools: dict | List[dict] = None, use_tool: bool = False) -> Union[str, dict]: TypeError: unsupported operand type(s) for |: 'type' and '_GenericAlias'

Expected behavior / 期待表现

python openai_api_server.py CUDA_VISIBLE_DEVICES set to: 6 Traceback (most recent call last): File "/nfs2/zhaochuan.cai/czc_demo/GLM-4/basic_demo/openai_api_server.py", line 155, in def process_response(output: str, tools: dict | List[dict] = None, use_tool: bool = False) -> Union[str, dict]: TypeError: unsupported operand type(s) for |: 'type' and '_GenericAlias'

zRzRzRzRzRzRzR commented 3 days ago

这个是python版本太低了么,我们用的是python3.10