fix: xiaoguo_scanner LLM超时恢复30s
This commit is contained in:
+1
-1
@@ -224,7 +224,7 @@ def check_stock(code, name, articles):
|
|||||||
req = urllib.request.Request(XIAOGUO_API, data=payload,
|
req = urllib.request.Request(XIAOGUO_API, data=payload,
|
||||||
headers={"Content-Type": "application/json"}, method="POST")
|
headers={"Content-Type": "application/json"}, method="POST")
|
||||||
try:
|
try:
|
||||||
resp = opener.open(req, timeout=15)
|
resp = opener.open(req, timeout=30)
|
||||||
reply = json.loads(resp.read())["choices"][0]["message"]["content"]
|
reply = json.loads(resp.read())["choices"][0]["message"]["content"]
|
||||||
if "有关" in reply or "利好" in reply or "利空" in reply:
|
if "有关" in reply or "利好" in reply or "利空" in reply:
|
||||||
for s in ["利好", "利空", "中性"]:
|
for s in ["利好", "利空", "中性"]:
|
||||||
|
|||||||
Reference in New Issue
Block a user