jarvis-ai-assistant 0.1.36__py3-none-any.whl → 0.1.38__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
jarvis/__init__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """Jarvis AI Assistant"""
2
2
 
3
- __version__ = "0.1.36"
3
+ __version__ = "0.1.38"
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
- """Main entry point for Jarvis."""
102
- # Add argument parser
103
- parser = argparse.ArgumentParser(description='Jarvis AI Assistant')
104
- parser.add_argument('-f', '--files', nargs='*', help='List of files to process')
105
- parser.add_argument('--keep-history', action='store_true', help='Keep chat history (do not delete chat session)')
106
- parser.add_argument('-m', '--model', default='', help='选择模型')
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
- model = args.model if args.model else os.getenv('JARVIS_MODEL')
111
+ platform = args.platform if args.platform else os.getenv('JARVIS_PLATFORM')
112
112
 
113
- if not model:
114
- PrettyOutput.print("未指定模型,请使用 -m 参数或者设置 JARVIS_MODEL 环境变量", OutputType.ERROR)
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(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 {model}", OutputType.SYSTEM)
124
+ PrettyOutput.print(f"Jarvis 已初始化 - With {platform} 平台", OutputType.SYSTEM)
125
125
  if args.keep_history:
126
126
  PrettyOutput.print("已启用历史保留模式", OutputType.INFO)
127
127
 
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,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: jarvis-ai-assistant
3
- Version: 0.1.36
3
+ Version: 0.1.38
4
4
  Summary: Jarvis: An AI assistant that uses tools to interact with the system
5
5
  Home-page: https://github.com/skyfireitdiy/Jarvis
6
6
  Author: skyfire
@@ -1,27 +1,27 @@
1
- jarvis/__init__.py,sha256=1K8mUIwEsy3sPUIxD7iDbKMFX8NiGdBp69nW5a43mLE,50
1
+ jarvis/__init__.py,sha256=HThX1unLYIAAy5RBqYjJxwcAmMKIZppouS2RJBoGE-c,50
2
2
  jarvis/agent.py,sha256=i_tETgROksmPp95RYnwb7m-ERl0Ob1OEybXXcXJUpPk,12213
3
- jarvis/main.py,sha256=FOfc2v7iX9my5USyf4oxcGzyJe4AH4TwIEQk2WdNWrI,5768
3
+ jarvis/main.py,sha256=1nSBhQMnxhhOgUxhqvmHl21GygVsdcisr4FmA4GT_ro,5788
4
4
  jarvis/utils.py,sha256=JlkuC9RtspXH2VWDmj9nR0vnb8ie1gIsKc4vC7WRco8,7321
5
- jarvis/__pycache__/__init__.cpython-313.pyc,sha256=y7E-wyD0KJpDfXJV1b-kHQFkNsSNBhIk3DalwVG3xBs,209
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=KKVD1bs_4MDOdq2f04rsJpI8Osp959Fo5KOsUUBvrDM,7985
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=WfvQzSDUz19EVgqOwDzhlvPy5rNRS0bMkSNqWDwgIG4,11469
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=aFpRH6K0YG6suCRGlJLw2JzLh2Ftpn6AYhdnKtMQQlY,3940
17
- jarvis/models/oyi.py,sha256=6EzUcPkE5dtVZJa8zMhFfcjdKPPFVCg6hqYtFzgh9zM,12231
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=4tK3twFcGA4gbKciw9GpiI4-e9CxHPINtwvOz3sN_1I,14787
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=CU3KaUA0XcOK55sexF7OxfQ6_jdofABsufmFxm0T3mk,6004
24
- jarvis/models/__pycache__/oyi.cpython-313.pyc,sha256=HbZxBtfuR6G_KkKNCmI924SGtRb1tTfexg6Mw2paLtA,14049
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.36.dist-info/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
53
- jarvis_ai_assistant-0.1.36.dist-info/METADATA,sha256=vCANngD8_2pKamajo7DXgPMM54K13Ja6s5iBtqsPqLk,9765
54
- jarvis_ai_assistant-0.1.36.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
55
- jarvis_ai_assistant-0.1.36.dist-info/entry_points.txt,sha256=iKu7OMfew9dtfGhW71gIMTg4wvafuPqKb4wyQOnMAGU,44
56
- jarvis_ai_assistant-0.1.36.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
57
- jarvis_ai_assistant-0.1.36.dist-info/RECORD,,
52
+ jarvis_ai_assistant-0.1.38.dist-info/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
53
+ jarvis_ai_assistant-0.1.38.dist-info/METADATA,sha256=mESXSA2F3ZVqsMwBsn-PE3n6Az7jnG6G0RfMQ-5KdHg,9765
54
+ jarvis_ai_assistant-0.1.38.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
55
+ jarvis_ai_assistant-0.1.38.dist-info/entry_points.txt,sha256=iKu7OMfew9dtfGhW71gIMTg4wvafuPqKb4wyQOnMAGU,44
56
+ jarvis_ai_assistant-0.1.38.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
57
+ jarvis_ai_assistant-0.1.38.dist-info/RECORD,,