返回提交历史
Modified
g4f/tools/run_tools.py
+1
-1
XFEstudio/gpt4free
fix: ensure api_key validation checks for string type in is_provider_api_key function
9b608fcc
代码差异
1 个文件
+1
-1
@@ -42,7 +42,7 @@ TOOL_NAMES = {
42
42
}
43
43
44
44
def is_provider_api_key(api_key: str) -> bool:
45
return api_key and not api_key.startswith("g4f_") and not api_key.startswith("gfs_")
45
return isinstance(api_key, str) and api_key and not api_key.startswith("g4f_") and not api_key.startswith("gfs_")
46
46
47
47
48
48
class ToolHandler: