jarvis-ai-assistant 0.1.59__py3-none-any.whl → 0.1.60__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of jarvis-ai-assistant might be problematic. Click here for more details.
- jarvis/__init__.py +1 -1
- jarvis/models/ai8.py +1 -1
- jarvis/models/openai.py +1 -1
- jarvis/models/oyi.py +1 -1
- jarvis/models/registry.py +5 -4
- jarvis/tools/coder.py +7 -4
- {jarvis_ai_assistant-0.1.59.dist-info → jarvis_ai_assistant-0.1.60.dist-info}/METADATA +1 -1
- {jarvis_ai_assistant-0.1.59.dist-info → jarvis_ai_assistant-0.1.60.dist-info}/RECORD +12 -12
- {jarvis_ai_assistant-0.1.59.dist-info → jarvis_ai_assistant-0.1.60.dist-info}/LICENSE +0 -0
- {jarvis_ai_assistant-0.1.59.dist-info → jarvis_ai_assistant-0.1.60.dist-info}/WHEEL +0 -0
- {jarvis_ai_assistant-0.1.59.dist-info → jarvis_ai_assistant-0.1.60.dist-info}/entry_points.txt +0 -0
- {jarvis_ai_assistant-0.1.59.dist-info → jarvis_ai_assistant-0.1.60.dist-info}/top_level.txt +0 -0
jarvis/__init__.py
CHANGED
jarvis/models/ai8.py
CHANGED
jarvis/models/openai.py
CHANGED
jarvis/models/oyi.py
CHANGED
jarvis/models/registry.py
CHANGED
|
@@ -29,7 +29,8 @@ class PlatformRegistry:
|
|
|
29
29
|
# 创建 __init__.py 使其成为 Python 包
|
|
30
30
|
with open(os.path.join(user_platform_dir, "__init__.py"), "w") as f:
|
|
31
31
|
pass
|
|
32
|
-
|
|
32
|
+
|
|
33
|
+
pass
|
|
33
34
|
except Exception as e:
|
|
34
35
|
PrettyOutput.print(f"创建平台目录失败: {str(e)}", OutputType.ERROR)
|
|
35
36
|
return ""
|
|
@@ -120,8 +121,8 @@ class PlatformRegistry:
|
|
|
120
121
|
# 检查平台实现
|
|
121
122
|
if not PlatformRegistry.check_platform_implementation(obj):
|
|
122
123
|
continue
|
|
124
|
+
|
|
123
125
|
platforms[obj.platform_name] = obj
|
|
124
|
-
PrettyOutput.print(f"从 {directory} 加载平台: {obj.platform_name}", OutputType.INFO)
|
|
125
126
|
break
|
|
126
127
|
except Exception as e:
|
|
127
128
|
PrettyOutput.print(f"加载平台 {module_name} 失败: {str(e)}", OutputType.ERROR)
|
|
@@ -159,6 +160,7 @@ class PlatformRegistry:
|
|
|
159
160
|
raise Exception(f"Failed to create platform: {PlatformRegistry.global_platform_name}")
|
|
160
161
|
return platform
|
|
161
162
|
|
|
163
|
+
|
|
162
164
|
def register_platform(self, name: str, platform_class: Type[BasePlatform]):
|
|
163
165
|
"""注册平台类
|
|
164
166
|
|
|
@@ -167,7 +169,6 @@ class PlatformRegistry:
|
|
|
167
169
|
model_class: 平台类
|
|
168
170
|
"""
|
|
169
171
|
self.platforms[name] = platform_class
|
|
170
|
-
PrettyOutput.print(f"已注册平台: {name}", OutputType.INFO)
|
|
171
172
|
|
|
172
173
|
def create_platform(self, name: str) -> Optional[BasePlatform]:
|
|
173
174
|
"""创建平台实例
|
|
@@ -183,8 +184,8 @@ class PlatformRegistry:
|
|
|
183
184
|
return None
|
|
184
185
|
|
|
185
186
|
try:
|
|
187
|
+
|
|
186
188
|
platform = self.platforms[name]()
|
|
187
|
-
PrettyOutput.print(f"已创建平台实例: {name}", OutputType.INFO)
|
|
188
189
|
return platform
|
|
189
190
|
except Exception as e:
|
|
190
191
|
PrettyOutput.print(f"创建平台失败: {str(e)}", OutputType.ERROR)
|
jarvis/tools/coder.py
CHANGED
|
@@ -26,6 +26,9 @@ class CoderTool:
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
def __init__(self):
|
|
30
|
+
self._coder = None
|
|
31
|
+
|
|
29
32
|
|
|
30
33
|
def _init_coder(self, dir: Optional[str] = None, language: Optional[str] = "python") -> None:
|
|
31
34
|
"""初始化JarvisCoder实例"""
|
|
@@ -34,7 +37,7 @@ class CoderTool:
|
|
|
34
37
|
work_dir = dir or os.getcwd()
|
|
35
38
|
self._coder = JarvisCoder(work_dir, language)
|
|
36
39
|
|
|
37
|
-
def execute(self,
|
|
40
|
+
def execute(self, args: Dict) -> Dict[str, Any]:
|
|
38
41
|
"""执行代码修改
|
|
39
42
|
|
|
40
43
|
Args:
|
|
@@ -45,9 +48,9 @@ class CoderTool:
|
|
|
45
48
|
Returns:
|
|
46
49
|
Dict[str, Any]: 执行结果
|
|
47
50
|
"""
|
|
48
|
-
feature =
|
|
49
|
-
dir =
|
|
50
|
-
language =
|
|
51
|
+
feature = args.get("feature")
|
|
52
|
+
dir = args.get("dir")
|
|
53
|
+
language = args.get("language", "python")
|
|
51
54
|
|
|
52
55
|
try:
|
|
53
56
|
self.current_dir = os.getcwd()
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
jarvis/__init__.py,sha256=
|
|
1
|
+
jarvis/__init__.py,sha256=cCtC3WSQC0fShm7fHAZRV89NzbaWtqD8EDoDEoGVJVk,50
|
|
2
2
|
jarvis/agent.py,sha256=vSba-jPjCCxYqI2uje6OZK_m-VwmNTOnJSheZy1C5PA,13914
|
|
3
3
|
jarvis/main.py,sha256=gXXtnrkkvGwEswJL6qiYjVrg3bpzye-GJeAe0Nf2B9o,6509
|
|
4
4
|
jarvis/utils.py,sha256=JlkuC9RtspXH2VWDmj9nR0vnb8ie1gIsKc4vC7WRco8,7321
|
|
5
5
|
jarvis/jarvis_coder/main.py,sha256=TosDDiaYSjDpzKPNKcygxZ3XXWbcnvBmIIMn3UMBc60,35102
|
|
6
6
|
jarvis/models/__init__.py,sha256=mrOt67nselz_H1gX9wdAO4y2DY5WPXzABqJbr5Des8k,63
|
|
7
|
-
jarvis/models/ai8.py,sha256=
|
|
7
|
+
jarvis/models/ai8.py,sha256=AMBZRS9hKW1Ts_YoHMMelhT0CRMeMzHtVH31z0FpP-Q,12671
|
|
8
8
|
jarvis/models/base.py,sha256=ShV1H8Unee4RMaiFO4idROQA0Hc6wu4dyeRPX5fcszk,1433
|
|
9
9
|
jarvis/models/kimi.py,sha256=1iTB0Z_WOmCML3Ufsge6jmeKOYvccr7I5lS3JUXymU4,17611
|
|
10
|
-
jarvis/models/openai.py,sha256=
|
|
11
|
-
jarvis/models/oyi.py,sha256=
|
|
12
|
-
jarvis/models/registry.py,sha256=
|
|
10
|
+
jarvis/models/openai.py,sha256=7oOxrL6EM7iaqJgZsaFvVmyzY0ars4BP3EKAUlX1RPw,4403
|
|
11
|
+
jarvis/models/oyi.py,sha256=mW-uhUZbts2L_oI8WueZUTEmrLY1CiBHn4UV2HP7ZCE,15214
|
|
12
|
+
jarvis/models/registry.py,sha256=hJyaROiOF_TkbtIXsjOD8-ArOvAvtxviawyqBFfLV6s,7617
|
|
13
13
|
jarvis/tools/__init__.py,sha256=Kj1bKj34lwRDKMKHLOrLyQElf2lHbqA2tDgP359eaDo,71
|
|
14
14
|
jarvis/tools/base.py,sha256=EGRGbdfbLXDLwtyoWdvp9rlxNX7bzc20t0Vc2VkwIEY,652
|
|
15
|
-
jarvis/tools/coder.py,sha256=
|
|
15
|
+
jarvis/tools/coder.py,sha256=ZJfPInKms4Hj3-eQlBwamVsvZ-2nlZ-4jsqJ-tJc6mg,2040
|
|
16
16
|
jarvis/tools/file_ops.py,sha256=h8g0eT9UvlJf4kt0DLXvdSsjcPj7x19lxWdDApeDfpg,3842
|
|
17
17
|
jarvis/tools/generator.py,sha256=vVP3eN5cCDpRXf_fn0skETkPXAW1XZFWx9pt2_ahK48,5999
|
|
18
18
|
jarvis/tools/methodology.py,sha256=G3cOaHTMujGZBhDLhQEqyCV2NISizO3MXRuho1KfI6Y,5223
|
|
@@ -21,9 +21,9 @@ jarvis/tools/search.py,sha256=1EqOVvLhg2Csh-i03-XeCrusbyfmH69FZ8khwZt8Tow,6131
|
|
|
21
21
|
jarvis/tools/shell.py,sha256=UPKshPyOaUwTngresUw-ot1jHjQIb4wCY5nkJqa38lU,2520
|
|
22
22
|
jarvis/tools/sub_agent.py,sha256=rEtAmSVY2ZjFOZEKr5m5wpACOQIiM9Zr_3dT92FhXYU,2621
|
|
23
23
|
jarvis/tools/webpage.py,sha256=d3w3Jcjcu1ESciezTkz3n3Zf-rp_l91PrVoDEZnckOo,2391
|
|
24
|
-
jarvis_ai_assistant-0.1.
|
|
25
|
-
jarvis_ai_assistant-0.1.
|
|
26
|
-
jarvis_ai_assistant-0.1.
|
|
27
|
-
jarvis_ai_assistant-0.1.
|
|
28
|
-
jarvis_ai_assistant-0.1.
|
|
29
|
-
jarvis_ai_assistant-0.1.
|
|
24
|
+
jarvis_ai_assistant-0.1.60.dist-info/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
|
|
25
|
+
jarvis_ai_assistant-0.1.60.dist-info/METADATA,sha256=7RcBcdhyJDGa7UhfVwNHG8BvuJnw5PhI3nbLWS1PGog,11213
|
|
26
|
+
jarvis_ai_assistant-0.1.60.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
27
|
+
jarvis_ai_assistant-0.1.60.dist-info/entry_points.txt,sha256=ieRI4ilnGNx1R6LlzT2P510mJ27lhLesVZToezDjSd8,89
|
|
28
|
+
jarvis_ai_assistant-0.1.60.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
|
|
29
|
+
jarvis_ai_assistant-0.1.60.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{jarvis_ai_assistant-0.1.59.dist-info → jarvis_ai_assistant-0.1.60.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|