feat: 上报使用量时带上msg_source_adapter

This commit is contained in:
Rock Chin 2023-04-24 23:51:00 +08:00
parent c8cee8410c
commit 580e062dbf

View File

@ -46,7 +46,7 @@ class DataGatherer:
config = pkg.utils.context.get_config()
if not config.report_usage:
return
res = requests.get("http://reports.rockchin.top:18989/usage?service_name=qchatgpt.{}&version={}&count={}".format(subservice_name, self.version_str, count))
res = requests.get("http://reports.rockchin.top:18989/usage?service_name=qchatgpt.{}&version={}&count={}&msg_source={}".format(subservice_name, self.version_str, count, config.msg_source_adapter))
if res.status_code != 200 or res.text != "ok":
logging.warning("report to server failed, status_code: {}, text: {}".format(res.status_code, res.text))
except: