jarvis-ai-assistant 0.1.36__py3-none-any.whl → 0.1.37__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- jarvis/__init__.py +1 -1
- jarvis/__pycache__/__init__.cpython-313.pyc +0 -0
- jarvis/__pycache__/main.cpython-313.pyc +0 -0
- jarvis/main.py +11 -11
- jarvis/models/__pycache__/ai8.cpython-313.pyc +0 -0
- jarvis/models/__pycache__/openai.cpython-313.pyc +0 -0
- jarvis/models/__pycache__/oyi.cpython-313.pyc +0 -0
- jarvis/models/ai8.py +2 -0
- jarvis/models/openai.py +2 -0
- jarvis/models/oyi.py +1 -0
- {jarvis_ai_assistant-0.1.36.dist-info → jarvis_ai_assistant-0.1.37.dist-info}/METADATA +1 -1
- {jarvis_ai_assistant-0.1.36.dist-info → jarvis_ai_assistant-0.1.37.dist-info}/RECORD +16 -16
- {jarvis_ai_assistant-0.1.36.dist-info → jarvis_ai_assistant-0.1.37.dist-info}/LICENSE +0 -0
- {jarvis_ai_assistant-0.1.36.dist-info → jarvis_ai_assistant-0.1.37.dist-info}/WHEEL +0 -0
- {jarvis_ai_assistant-0.1.36.dist-info → jarvis_ai_assistant-0.1.37.dist-info}/entry_points.txt +0 -0
- {jarvis_ai_assistant-0.1.36.dist-info → jarvis_ai_assistant-0.1.37.dist-info}/top_level.txt +0 -0
jarvis/__init__.py
CHANGED
Binary file
|
Binary file
|
jarvis/main.py
CHANGED
@@ -98,30 +98,30 @@ def select_task(tasks: dict) -> str:
|
|
98
98
|
continue
|
99
99
|
|
100
100
|
def main():
|
101
|
-
"""
|
102
|
-
#
|
103
|
-
parser = argparse.ArgumentParser(description='Jarvis AI
|
104
|
-
parser.add_argument('-f', '--files', nargs='*', help='
|
105
|
-
parser.add_argument('--keep-history', action='store_true', help='
|
106
|
-
parser.add_argument('-
|
101
|
+
"""Jarvis 的主入口点"""
|
102
|
+
# 添加参数解析器
|
103
|
+
parser = argparse.ArgumentParser(description='Jarvis AI 助手')
|
104
|
+
parser.add_argument('-f', '--files', nargs='*', help='要处理的文件列表')
|
105
|
+
parser.add_argument('--keep-history', action='store_true', help='保持聊天历史(不删除会话)')
|
106
|
+
parser.add_argument('-p', '--platform', default='', help='选择AI平台')
|
107
107
|
args = parser.parse_args()
|
108
108
|
|
109
109
|
load_env_from_file()
|
110
110
|
|
111
|
-
|
111
|
+
platform = args.platform if args.platform else os.getenv('JARVIS_PLATFORM')
|
112
112
|
|
113
|
-
if not
|
114
|
-
PrettyOutput.print("
|
113
|
+
if not platform:
|
114
|
+
PrettyOutput.print("未指定AI平台,请使用 -p 参数或者设置 JARVIS_PLATFORM 环境变量", OutputType.ERROR)
|
115
115
|
return 1
|
116
116
|
|
117
|
-
ModelRegistry.get_model_registry().set_global_model(
|
117
|
+
ModelRegistry.get_model_registry().set_global_model(platform)
|
118
118
|
|
119
119
|
try:
|
120
120
|
# 获取全局模型实例
|
121
121
|
agent = Agent()
|
122
122
|
|
123
123
|
# 欢迎信息
|
124
|
-
PrettyOutput.print(f"Jarvis 已初始化 - With {
|
124
|
+
PrettyOutput.print(f"Jarvis 已初始化 - With {platform} 平台", OutputType.SYSTEM)
|
125
125
|
if args.keep_history:
|
126
126
|
PrettyOutput.print("已启用历史保留模式", OutputType.INFO)
|
127
127
|
|
Binary file
|
Binary file
|
Binary file
|
jarvis/models/ai8.py
CHANGED
@@ -68,6 +68,7 @@ class AI8Model(BaseModel):
|
|
68
68
|
self.token = os.getenv("AI8_API_KEY")
|
69
69
|
if not all([self.model, self.token]):
|
70
70
|
raise Exception("AI8_MODEL or AI8_API_KEY is not set")
|
71
|
+
PrettyOutput.print(f"当前使用模型: {self.model}", OutputType.SYSTEM)
|
71
72
|
|
72
73
|
def create_conversation(self) -> bool:
|
73
74
|
"""Create a new conversation"""
|
@@ -103,6 +104,7 @@ class AI8Model(BaseModel):
|
|
103
104
|
# 2. 更新会话设置
|
104
105
|
session_data = {
|
105
106
|
**self.conversation,
|
107
|
+
"model": self.model,
|
106
108
|
"contextCount": 1024,
|
107
109
|
"prompt": self.system_message,
|
108
110
|
"plugins": ["tavily_search"],
|
jarvis/models/openai.py
CHANGED
@@ -31,6 +31,8 @@ class OpenAIModel(BaseModel):
|
|
31
31
|
|
32
32
|
self.base_url = os.getenv("OPENAI_API_BASE", "https://api.deepseek.com")
|
33
33
|
self.model_name = os.getenv("OPENAI_MODEL_NAME", "deepseek-chat")
|
34
|
+
|
35
|
+
PrettyOutput.print(f"当前使用模型: {self.model_name}", OutputType.SYSTEM)
|
34
36
|
|
35
37
|
self.client = OpenAI(
|
36
38
|
api_key=self.api_key,
|
jarvis/models/oyi.py
CHANGED
@@ -51,6 +51,7 @@ class OyiModel(BaseModel):
|
|
51
51
|
self.token = os.getenv("OYI_API_KEY")
|
52
52
|
if not all([self.model, self.token]):
|
53
53
|
raise Exception("OYI_MODEL or OYI_API_KEY is not set")
|
54
|
+
PrettyOutput.print(f"当前使用模型: {self.model}", OutputType.SYSTEM)
|
54
55
|
|
55
56
|
|
56
57
|
def create_conversation(self) -> bool:
|
@@ -1,27 +1,27 @@
|
|
1
|
-
jarvis/__init__.py,sha256=
|
1
|
+
jarvis/__init__.py,sha256=Wa4Hd6-vEBQVOQ4Zn0glniInyQfp_jE8AetupT3qjtE,50
|
2
2
|
jarvis/agent.py,sha256=i_tETgROksmPp95RYnwb7m-ERl0Ob1OEybXXcXJUpPk,12213
|
3
|
-
jarvis/main.py,sha256=
|
3
|
+
jarvis/main.py,sha256=1nSBhQMnxhhOgUxhqvmHl21GygVsdcisr4FmA4GT_ro,5788
|
4
4
|
jarvis/utils.py,sha256=JlkuC9RtspXH2VWDmj9nR0vnb8ie1gIsKc4vC7WRco8,7321
|
5
|
-
jarvis/__pycache__/__init__.cpython-313.pyc,sha256=
|
5
|
+
jarvis/__pycache__/__init__.cpython-313.pyc,sha256=KYUlFHOQKHStj5RTFhULb-Gq_xIlFshqR71ptW5G73A,209
|
6
6
|
jarvis/__pycache__/agent.cpython-313.pyc,sha256=OfeSUMB3KcaFXrCiYENrFVcdfRyxBNQks3OtVb8PXO4,15864
|
7
|
-
jarvis/__pycache__/main.cpython-313.pyc,sha256=
|
7
|
+
jarvis/__pycache__/main.cpython-313.pyc,sha256=4VC3x5E6YDLXPbm9iStQha3Ez-hcSsfujcHu6J3I3sg,8014
|
8
8
|
jarvis/__pycache__/models.cpython-313.pyc,sha256=uWuRIjGrY4YDB3dGW5PGDLWaS03et8g11O725TjY_eU,5960
|
9
9
|
jarvis/__pycache__/tools.cpython-313.pyc,sha256=lAD4LrnnWzNZQmHXGfZ_2l7oskOpr2_2OC-gdFhxQY8,33933
|
10
10
|
jarvis/__pycache__/utils.cpython-313.pyc,sha256=eXXM-V-2ax7qBNxktdUrEIwhAXPQHAlI7gLGewlKOj4,10276
|
11
11
|
jarvis/__pycache__/zte_llm.cpython-313.pyc,sha256=kMm9IGundGmOPqjsgrm9oIaWLDagYGCPRAaE3ipkc-0,5662
|
12
12
|
jarvis/models/__init__.py,sha256=Lqb1NWFIfq7HlZIsJ7eUGyGjdYyaJqOoOf7cG_yo73A,57
|
13
|
-
jarvis/models/ai8.py,sha256=
|
13
|
+
jarvis/models/ai8.py,sha256=NARhMCuH6yagDSwBT15jD-CDLoxXV8anIT-nSAIWOgw,11589
|
14
14
|
jarvis/models/base.py,sha256=dNkYPg9ISrHGEpmQLN9kxCDU-kqJAJlm_owdDC302Dk,1132
|
15
15
|
jarvis/models/kimi.py,sha256=iI8mBzUxiyxa_bzDG9uwE3BZtreEUt0EJOIP_l2rSDM,16788
|
16
|
-
jarvis/models/openai.py,sha256=
|
17
|
-
jarvis/models/oyi.py,sha256=
|
16
|
+
jarvis/models/openai.py,sha256=zuSUFuz14m8LTeREax7M4MJn6LTUWFDmL1aIxMXkeo4,4029
|
17
|
+
jarvis/models/oyi.py,sha256=wS-anyFcjOoh9qL_nNUnc9VHabU0JSEjkvTx_vZMqA4,12314
|
18
18
|
jarvis/models/registry.py,sha256=ecIo3a0G-pRPw4eg77ozzbGVh6vy93DHF8oAnU2g51w,7511
|
19
19
|
jarvis/models/__pycache__/__init__.cpython-313.pyc,sha256=hD4Uui0EPCTfoPOasTYzIi46Kv_q7OI8m-Lck-nX4zM,220
|
20
|
-
jarvis/models/__pycache__/ai8.cpython-313.pyc,sha256=
|
20
|
+
jarvis/models/__pycache__/ai8.cpython-313.pyc,sha256=5wnVTypQkoQdsFgGEWT4Y9vi6478SDZh_aFQj9YPDhE,14988
|
21
21
|
jarvis/models/__pycache__/base.cpython-313.pyc,sha256=9VvOXFPYOrB-2pO2py7dWOVbimODnXQJFLlFbyF7-LI,2207
|
22
22
|
jarvis/models/__pycache__/kimi.cpython-313.pyc,sha256=FGtHoTv747oNY4Lqnwf5BkGYKnevHOlIEDIlbsY7va0,20893
|
23
|
-
jarvis/models/__pycache__/openai.cpython-313.pyc,sha256
|
24
|
-
jarvis/models/__pycache__/oyi.cpython-313.pyc,sha256=
|
23
|
+
jarvis/models/__pycache__/openai.cpython-313.pyc,sha256=-lrI-6uao5D-lFI6vwErr2KlGVBKII22SVbLg5eQ-I8,6173
|
24
|
+
jarvis/models/__pycache__/oyi.cpython-313.pyc,sha256=_VIFzihUJa8Ihy9aRKb-sSWLUdCAt7xvj2IIzZTkQnY,14208
|
25
25
|
jarvis/models/__pycache__/registry.cpython-313.pyc,sha256=jUZUyHyfzeQtjCdk2NCZGTsTUsvKyIlnZVDzZY1gLuU,9985
|
26
26
|
jarvis/tools/__init__.py,sha256=Kj1bKj34lwRDKMKHLOrLyQElf2lHbqA2tDgP359eaDo,71
|
27
27
|
jarvis/tools/base.py,sha256=EGRGbdfbLXDLwtyoWdvp9rlxNX7bzc20t0Vc2VkwIEY,652
|
@@ -49,9 +49,9 @@ jarvis/tools/__pycache__/user_confirmation.cpython-313.pyc,sha256=wK3Ev10lHSUSRv
|
|
49
49
|
jarvis/tools/__pycache__/user_input.cpython-313.pyc,sha256=JjTFOhObKsKF4Pn8KBRuKfV1_Ssj083fjU7Mfc_5z7c,2531
|
50
50
|
jarvis/tools/__pycache__/user_interaction.cpython-313.pyc,sha256=RuVZ-pmiPBDywY3efgXSfohMAciC1avMGPmBK5qlnew,3305
|
51
51
|
jarvis/tools/__pycache__/webpage.cpython-313.pyc,sha256=BjzSfnNzsKCrLETCcWjt32lNDLzwnjqcVGg4JfWd9OM,3008
|
52
|
-
jarvis_ai_assistant-0.1.
|
53
|
-
jarvis_ai_assistant-0.1.
|
54
|
-
jarvis_ai_assistant-0.1.
|
55
|
-
jarvis_ai_assistant-0.1.
|
56
|
-
jarvis_ai_assistant-0.1.
|
57
|
-
jarvis_ai_assistant-0.1.
|
52
|
+
jarvis_ai_assistant-0.1.37.dist-info/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
|
53
|
+
jarvis_ai_assistant-0.1.37.dist-info/METADATA,sha256=xeDBmFgEXxmi-DdiCJJdM0-jYrFNqvNpkx-vairwUFY,9765
|
54
|
+
jarvis_ai_assistant-0.1.37.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
55
|
+
jarvis_ai_assistant-0.1.37.dist-info/entry_points.txt,sha256=iKu7OMfew9dtfGhW71gIMTg4wvafuPqKb4wyQOnMAGU,44
|
56
|
+
jarvis_ai_assistant-0.1.37.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
|
57
|
+
jarvis_ai_assistant-0.1.37.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{jarvis_ai_assistant-0.1.36.dist-info → jarvis_ai_assistant-0.1.37.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|