From 4d71a24fbcd9c79c3aba4313de4189cef3255afc Mon Sep 17 00:00:00 2001 From: jxxghp Date: Tue, 18 Nov 2025 16:47:48 +0800 Subject: [PATCH] fix requirements --- plugins.v2/bugreporter/requirements.txt | 2 +- plugins.v2/chatgpt/openai.py | 6 ++++-- plugins.v2/chatgpt/requirements.txt | 1 - 3 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 plugins.v2/chatgpt/requirements.txt diff --git a/plugins.v2/bugreporter/requirements.txt b/plugins.v2/bugreporter/requirements.txt index bf3126c..b479853 100644 --- a/plugins.v2/bugreporter/requirements.txt +++ b/plugins.v2/bugreporter/requirements.txt @@ -1 +1 @@ -sentry_sdk~=2.35.1 \ No newline at end of file +sentry_sdk~=2.44.0 \ No newline at end of file diff --git a/plugins.v2/chatgpt/openai.py b/plugins.v2/chatgpt/openai.py index b05c1b1..a2574c1 100644 --- a/plugins.v2/chatgpt/openai.py +++ b/plugins.v2/chatgpt/openai.py @@ -15,8 +15,9 @@ class OpenAi: _model: str = "gpt-3.5-turbo" _prompt: str = '接下来我会给你一个电影或电视剧的文件名,你需要识别文件名中的名称、版本、分段、年份、分瓣率、季集等信息,并按以下JSON格式返回:{"name":string,"version":string,"part":string,"year":string,"resolution":string,"season":number|null,"episode":number|null},特别注意返回结果需要严格附合JSON格式,不需要有任何其它的字符。如果中文电影或电视剧的文件名中存在谐音字或字母替代的情况,请还原最有可能的结果。' - def __init__(self, api_key: str = None, api_url: str = None, proxy: dict = None, model: str = None, compatible: - bool = False, customize_prompt: str = None): + def __init__(self, api_key: str = None, api_url: str = None, + proxy: dict = None, model: str = None, + compatible: bool = False, customize_prompt: str = None): self._api_key = api_key self._api_url = api_url if compatible: @@ -30,6 +31,7 @@ class OpenAi: self._model = model if customize_prompt: self._prompt = customize_prompt + def get_state(self) -> bool: return True if self._api_key else False diff --git a/plugins.v2/chatgpt/requirements.txt b/plugins.v2/chatgpt/requirements.txt deleted file mode 100644 index d6dc68d..0000000 --- a/plugins.v2/chatgpt/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -openai~=0.27.2