jarvis-ai-assistant 0.1.148__py3-none-any.whl → 0.1.150__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/jarvis_agent/jarvis.py +7 -5
- jarvis/jarvis_agent/main.py +0 -1
- jarvis/jarvis_agent/patch.py +42 -7
- jarvis/jarvis_code_analysis/code_review.py +0 -1
- jarvis/jarvis_git_utils/git_commiter.py +0 -1
- jarvis/jarvis_lsp/base.py +1 -1
- jarvis/jarvis_lsp/cpp.py +1 -1
- jarvis/jarvis_lsp/go.py +1 -1
- jarvis/jarvis_lsp/python.py +1 -1
- jarvis/jarvis_lsp/registry.py +2 -1
- jarvis/jarvis_lsp/rust.py +1 -1
- jarvis/jarvis_mcp/__init__.py +36 -0
- jarvis/jarvis_mcp/local_mcp_client.py +241 -0
- jarvis/jarvis_mcp/remote_mcp_client.py +230 -0
- jarvis/jarvis_platform/base.py +1 -1
- jarvis/jarvis_platform/kimi.py +3 -3
- jarvis/jarvis_platform/registry.py +2 -4
- jarvis/jarvis_platform/yuanbao.py +4 -4
- jarvis/jarvis_tools/code_plan.py +0 -1
- jarvis/jarvis_tools/file_analyzer.py +1 -1
- jarvis/jarvis_tools/file_operation.py +7 -26
- jarvis/jarvis_tools/methodology.py +2 -1
- jarvis/jarvis_tools/read_code.py +0 -1
- jarvis/jarvis_tools/registry.py +108 -3
- jarvis/jarvis_tools/search_web.py +0 -1
- jarvis/jarvis_utils/config.py +14 -8
- jarvis/jarvis_utils/embedding.py +4 -8
- jarvis/jarvis_utils/file_processors.py +0 -262
- jarvis/jarvis_utils/git_utils.py +19 -8
- jarvis/jarvis_utils/input.py +7 -1
- jarvis/jarvis_utils/methodology.py +2 -2
- jarvis/jarvis_utils/output.py +0 -1
- jarvis/jarvis_utils/utils.py +23 -221
- {jarvis_ai_assistant-0.1.148.dist-info → jarvis_ai_assistant-0.1.150.dist-info}/METADATA +31 -38
- {jarvis_ai_assistant-0.1.148.dist-info → jarvis_ai_assistant-0.1.150.dist-info}/RECORD +40 -38
- jarvis/jarvis_platform_manager/openai_test.py +0 -138
- {jarvis_ai_assistant-0.1.148.dist-info → jarvis_ai_assistant-0.1.150.dist-info}/LICENSE +0 -0
- {jarvis_ai_assistant-0.1.148.dist-info → jarvis_ai_assistant-0.1.150.dist-info}/WHEEL +0 -0
- {jarvis_ai_assistant-0.1.148.dist-info → jarvis_ai_assistant-0.1.150.dist-info}/entry_points.txt +0 -0
- {jarvis_ai_assistant-0.1.148.dist-info → jarvis_ai_assistant-0.1.150.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: jarvis-ai-assistant
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.150
|
|
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
|
|
@@ -40,32 +40,20 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
40
40
|
Requires-Python: >=3.8
|
|
41
41
|
Description-Content-Type: text/markdown
|
|
42
42
|
License-File: LICENSE
|
|
43
|
-
Requires-Dist: requests
|
|
44
|
-
Requires-Dist:
|
|
45
|
-
Requires-Dist:
|
|
46
|
-
Requires-Dist:
|
|
47
|
-
Requires-Dist:
|
|
48
|
-
Requires-Dist:
|
|
49
|
-
Requires-Dist:
|
|
50
|
-
Requires-Dist:
|
|
51
|
-
Requires-Dist:
|
|
52
|
-
Requires-Dist:
|
|
53
|
-
Requires-Dist:
|
|
54
|
-
Requires-Dist:
|
|
55
|
-
Requires-Dist:
|
|
56
|
-
Requires-Dist:
|
|
57
|
-
Requires-Dist: yaspin>=2.4.0
|
|
58
|
-
Requires-Dist: rich>=13.3.1
|
|
59
|
-
Requires-Dist: pygments>=2.15.0
|
|
60
|
-
Requires-Dist: fuzzywuzzy>=0.18.0
|
|
61
|
-
Requires-Dist: python-Levenshtein>=0.25.0
|
|
62
|
-
Requires-Dist: jedi>=0.17.2
|
|
63
|
-
Requires-Dist: psutil>=7.0.0
|
|
64
|
-
Requires-Dist: fastapi>=0.115.4
|
|
65
|
-
Requires-Dist: uvicorn>=0.33.0
|
|
66
|
-
Requires-Dist: python-pptx>=1.0.0
|
|
67
|
-
Requires-Dist: pandas>=2.0.0
|
|
68
|
-
Requires-Dist: html2text>=2024.2.26
|
|
43
|
+
Requires-Dist: requests==2.32.3
|
|
44
|
+
Requires-Dist: colorama==0.4.6
|
|
45
|
+
Requires-Dist: prompt-toolkit==3.0.50
|
|
46
|
+
Requires-Dist: yaspin==2.4.0
|
|
47
|
+
Requires-Dist: pygments==2.19.1
|
|
48
|
+
Requires-Dist: fuzzywuzzy==0.18.0
|
|
49
|
+
Requires-Dist: jedi==0.19.2
|
|
50
|
+
Requires-Dist: fastapi==0.115.12
|
|
51
|
+
Requires-Dist: uvicorn==0.33.0
|
|
52
|
+
Requires-Dist: rich==14.0.0
|
|
53
|
+
Requires-Dist: transformers==4.46.3
|
|
54
|
+
Requires-Dist: torch==2.4.1
|
|
55
|
+
Requires-Dist: python-Levenshtein==0.25.1
|
|
56
|
+
Requires-Dist: sseclient==0.0.27
|
|
69
57
|
Provides-Extra: dev
|
|
70
58
|
Requires-Dist: pytest; extra == "dev"
|
|
71
59
|
Requires-Dist: black; extra == "dev"
|
|
@@ -82,6 +70,7 @@ Requires-Dist: mypy; extra == "dev"
|
|
|
82
70
|
|
|
83
71
|
*您的智能开发和系统交互助手*
|
|
84
72
|
|
|
73
|
+
[视频介绍](#video-introduction) •
|
|
85
74
|
[快速开始](#quick-start) •
|
|
86
75
|
[配置说明](#configuration) •
|
|
87
76
|
[工具说明](#tools) •
|
|
@@ -92,6 +81,11 @@ Requires-Dist: mypy; extra == "dev"
|
|
|
92
81
|
|
|
93
82
|
---
|
|
94
83
|
|
|
84
|
+
## 📺 视频介绍<a id="video-introduction"></a>
|
|
85
|
+
|
|
86
|
+
[](https://player.bilibili.com/player.html?isOutside=true&aid=114306578382907&bvid=BV1x2dAYeEpM&cid=29314583629&p=1)
|
|
87
|
+
|
|
88
|
+
|
|
95
89
|
## 🚀 快速开始 <a id="quick-start"></a>
|
|
96
90
|
### 安装
|
|
97
91
|
```bash
|
|
@@ -194,13 +188,12 @@ jarvis-methodology --help
|
|
|
194
188
|
|------|----------|--------|------|
|
|
195
189
|
| 核心配置 | `JARVIS_MAX_TOKEN_COUNT` | 102400000 | 上下文窗口的最大token数量 |
|
|
196
190
|
| 核心配置 | `JARVIS_MAX_INPUT_TOKEN_COUNT` | 32000 | 输入的最大token数量 |
|
|
197
|
-
| 核心配置 | `
|
|
198
|
-
| 核心配置 | `JARVIS_AUTO_COMPLETE` | false | 是否启用自动补全功能
|
|
191
|
+
| 核心配置 | `JARVIS_AUTO_COMPLETE` | false | 是否启用自动完成功能(任务判定完成的时候会自动终止) |
|
|
199
192
|
| 核心配置 | `JARVIS_SHELL_NAME` | bash | 系统shell名称 |
|
|
200
193
|
| 核心配置 | `JARVIS_PLATFORM` | yuanbao | 默认AI平台 |
|
|
201
194
|
| 核心配置 | `JARVIS_MODEL` | deep_seek_v3 | 默认模型 |
|
|
202
|
-
| 核心配置 | `JARVIS_THINKING_PLATFORM` | JARVIS_PLATFORM |
|
|
203
|
-
| 核心配置 | `JARVIS_THINKING_MODEL` | JARVIS_MODEL |
|
|
195
|
+
| 核心配置 | `JARVIS_THINKING_PLATFORM` | JARVIS_PLATFORM | 推理任务使用的平台 |
|
|
196
|
+
| 核心配置 | `JARVIS_THINKING_MODEL` | JARVIS_MODEL | 推理任务使用的模型 |
|
|
204
197
|
| 核心配置 | `JARVIS_EXECUTE_TOOL_CONFIRM` | false | 执行工具前是否需要确认 |
|
|
205
198
|
| 核心配置 | `JARVIS_CONFIRM_BEFORE_APPLY_PATCH` | true | 应用补丁前是否需要确认 |
|
|
206
199
|
| 核心配置 | `JARVIS_MAX_TOOL_CALL_COUNT` | 20 | 最大连续工具调用次数 |
|
|
@@ -215,17 +208,17 @@ jarvis-methodology --help
|
|
|
215
208
|
| ask_user | 交互式用户输入收集 |
|
|
216
209
|
| chdir | 更改当前工作目录 |
|
|
217
210
|
| code_plan | 理解需求并制定详细的代码修改计划,在修改前获取用户确认 |
|
|
218
|
-
| create_code_agent |
|
|
211
|
+
| create_code_agent | 代码开发工具,当需要修改代码时使用 |
|
|
219
212
|
| create_sub_agent | 创建子代理以处理特定任务,子代理将生成任务总结报告 |
|
|
220
213
|
| execute_script | 执行脚本并返回结果,支持任意解释器。 |
|
|
221
214
|
| file_analyzer | 分析文件内容并提取关键信息。支持的文件:文本文件、word文档、pdf文件、图片 |
|
|
222
|
-
| file_operation |
|
|
215
|
+
| file_operation | 文件批量操作工具,可批量读写多个文件,支持文本文件,适用于需要同时处理多个文件的场景(读取配置文件、保存生成内容等) |
|
|
223
216
|
| find_methodology | 方法论查找工具,用于在执行过程中查看历史方法论辅助决策 |
|
|
224
217
|
| lsp_get_diagnostics | 获取代码诊断信息(错误、警告) |
|
|
225
|
-
| methodology |
|
|
218
|
+
| methodology | 方法论管理工具,支持添加、更新和删除操作 |
|
|
226
219
|
| read_code | 代码阅读与分析工具,用于读取源代码文件并添加行号,针对代码文件优化,提供更好的格式化输出和行号显示,适用于代码分析、审查和理解代码实现的场景 |
|
|
227
|
-
| read_webpage |
|
|
228
|
-
| search_web |
|
|
220
|
+
| read_webpage | 读取网页内容并分析 |
|
|
221
|
+
| search_web | 使用互联网搜索 |
|
|
229
222
|
| virtual_tty | 控制虚拟终端执行各种操作,如启动终端、输入命令、获取输出等。 |
|
|
230
223
|
|
|
231
224
|
|
|
@@ -235,7 +228,7 @@ jarvis-methodology --help
|
|
|
235
228
|
---
|
|
236
229
|
## 🛠️ 扩展开发 <a id="extensions"></a>
|
|
237
230
|
### 添加新工具
|
|
238
|
-
在 `~/.jarvis/tools
|
|
231
|
+
在 `~/.jarvis/tools/` 中创建新的 Python 文件:
|
|
239
232
|
```python
|
|
240
233
|
from typing import Dict, Any
|
|
241
234
|
from jarvis.utils import OutputType, PrettyOutput
|
|
@@ -284,7 +277,7 @@ class CustomTool:
|
|
|
284
277
|
|
|
285
278
|
|
|
286
279
|
### 添加新大模型平台
|
|
287
|
-
在 `~/.jarvis/platforms
|
|
280
|
+
在 `~/.jarvis/platforms/` 中创建新的 Python 文件:
|
|
288
281
|
```python
|
|
289
282
|
from jarvis.jarvis_platform.base import BasePlatform
|
|
290
283
|
class CustomPlatform(BasePlatform):
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
jarvis/__init__.py,sha256=
|
|
1
|
+
jarvis/__init__.py,sha256=LAXd2PqzX1hdAOiMxEwjP0kqPkpnlGGCzmHQH7bDoXI,50
|
|
2
2
|
jarvis/jarvis_agent/__init__.py,sha256=QtWu2kh6o5IB_XtGLoxHi5K9lA1t8XoqNUXtX-OqujY,23796
|
|
3
3
|
jarvis/jarvis_agent/builtin_input_handler.py,sha256=0SjlBYnBWKNi3eVdZ7c2NuP82tQej7DEWLAqG6bY1Rc,4357
|
|
4
4
|
jarvis/jarvis_agent/file_input_handler.py,sha256=6R68cSjLBnSJjTKJrSO2IqziRDFnxazU_Jq2t1W1ndo,3695
|
|
5
|
-
jarvis/jarvis_agent/jarvis.py,sha256
|
|
6
|
-
jarvis/jarvis_agent/main.py,sha256=
|
|
5
|
+
jarvis/jarvis_agent/jarvis.py,sha256=-Q-h1M4dgElFnoA2B9H3r0LmnQdoPfiy2JPXzNNihBQ,5155
|
|
6
|
+
jarvis/jarvis_agent/main.py,sha256=Jlw_Tofh2C-sMVnkeOZBrwWJOWNH3IhsKDUn-WBlgU8,2602
|
|
7
7
|
jarvis/jarvis_agent/output_handler.py,sha256=4limQ-Kf-YYvQjT5SMjJIyyvD1DVG8tINv1A_qbv4ho,405
|
|
8
|
-
jarvis/jarvis_agent/patch.py,sha256=
|
|
8
|
+
jarvis/jarvis_agent/patch.py,sha256=nhfAVHhSm4PWBMd_B9eeaUdnGDpryWTrGiJ7rMqvJ5g,22504
|
|
9
9
|
jarvis/jarvis_agent/shell_input_handler.py,sha256=9IoGQCe6FF4HA2V5S11q63AtnWDZFpNeRd3hcqCAlBw,1237
|
|
10
10
|
jarvis/jarvis_code_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
jarvis/jarvis_code_agent/code_agent.py,sha256=XlPa764dXbHkTxs1ByG9G-2K7_NRtmogHJhTFM_Hd_k,13117
|
|
12
|
-
jarvis/jarvis_code_analysis/code_review.py,sha256=
|
|
12
|
+
jarvis/jarvis_code_analysis/code_review.py,sha256=9H0Jt0SwdDs9qdE4UALYw6Zp6SyWxmAUyXj6yXrMnIU,29267
|
|
13
13
|
jarvis/jarvis_code_analysis/checklists/__init__.py,sha256=PCjlyxLa939613cAzS7pfEPgP57setO-1RvcdzzPivw,54
|
|
14
14
|
jarvis/jarvis_code_analysis/checklists/c_cpp.py,sha256=8lfWmhImAxeTBdHPOgVXDjMllaq280Qki1ZOOSDBnvk,1293
|
|
15
15
|
jarvis/jarvis_code_analysis/checklists/csharp.py,sha256=fg35Iima2nIsirEmAjianfAybVjwRYml9BtbSQFff7w,2396
|
|
@@ -35,24 +35,26 @@ jarvis/jarvis_git_details/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
|
35
35
|
jarvis/jarvis_git_details/main.py,sha256=YowncVxYyJ3y2EvGrZhAJeR4yizXp6aB3dqvoYTepFY,6117
|
|
36
36
|
jarvis/jarvis_git_squash/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
37
|
jarvis/jarvis_git_squash/main.py,sha256=xBNkAl7_8_pQC-C6RcUImA1mEU4KTqhjtA57rG_mMJ8,2179
|
|
38
|
-
jarvis/jarvis_git_utils/git_commiter.py,sha256=
|
|
39
|
-
jarvis/jarvis_lsp/base.py,sha256=
|
|
40
|
-
jarvis/jarvis_lsp/cpp.py,sha256=
|
|
41
|
-
jarvis/jarvis_lsp/go.py,sha256=
|
|
42
|
-
jarvis/jarvis_lsp/python.py,sha256=
|
|
43
|
-
jarvis/jarvis_lsp/registry.py,sha256
|
|
44
|
-
jarvis/jarvis_lsp/rust.py,sha256=
|
|
38
|
+
jarvis/jarvis_git_utils/git_commiter.py,sha256=dozU5vmodhb-uiLJBHGRPzUMU1er4xqvjClG3sqNwTA,10780
|
|
39
|
+
jarvis/jarvis_lsp/base.py,sha256=f-76xgNijfQ4G3Q0t8IfOGtCu-q2TSQ7a_in6XwDb_8,2030
|
|
40
|
+
jarvis/jarvis_lsp/cpp.py,sha256=ekci2M9_UtkCSEe9__72h26Gat93r9_knL2VmFr8X5M,3141
|
|
41
|
+
jarvis/jarvis_lsp/go.py,sha256=sSypuQSP5X2YtrVMC8XCc5nXkgfG93SO7sC89lHzoR8,3458
|
|
42
|
+
jarvis/jarvis_lsp/python.py,sha256=OJuYHLHI1aYNNWcAFayy_5GxogwyMC3A7KOYGjxN1yg,1843
|
|
43
|
+
jarvis/jarvis_lsp/registry.py,sha256=-b7lAfZ6SNp3O0ifRiFSLxH0xJlPQhkq4DATDDjJb1U,6491
|
|
44
|
+
jarvis/jarvis_lsp/rust.py,sha256=ICmQs5UVdMZwn5KjaF1YRXBCLUMtGF8Z9IwE5rqWkrU,3686
|
|
45
|
+
jarvis/jarvis_mcp/__init__.py,sha256=gVPImIkjVSYdc9hJykceEiHnO19oX-rHAUuVR3Ztczg,1044
|
|
46
|
+
jarvis/jarvis_mcp/local_mcp_client.py,sha256=cTOVtrMSZCyPsDNvC5egUus11YWSrZYyR7XKBkIIfgo,8404
|
|
47
|
+
jarvis/jarvis_mcp/remote_mcp_client.py,sha256=ji7wO0VxM3I9lDV7eQ1TBTCX9VL6EAVwAVOXnxGxVo4,8112
|
|
45
48
|
jarvis/jarvis_methodology/main.py,sha256=IBv87UOmdCailgooMtWEcqZcQHmNLhZD-kkGw5jOcVg,3375
|
|
46
49
|
jarvis/jarvis_multi_agent/__init__.py,sha256=SX8lBErhltKyYRM-rymrMz3sJ0Zl3hBXrpsPdFgzkQc,4399
|
|
47
50
|
jarvis/jarvis_multi_agent/main.py,sha256=aGuUC3YQmahabqwDwZXJjfQLYsZ3KIZdf8DZDlVNMe4,1543
|
|
48
51
|
jarvis/jarvis_platform/__init__.py,sha256=WIJtD5J7lOrWLX2bsgZGkmlMcN0NOJsnh_reybmHPjg,58
|
|
49
|
-
jarvis/jarvis_platform/base.py,sha256=
|
|
50
|
-
jarvis/jarvis_platform/kimi.py,sha256=
|
|
51
|
-
jarvis/jarvis_platform/registry.py,sha256=
|
|
52
|
-
jarvis/jarvis_platform/yuanbao.py,sha256=
|
|
52
|
+
jarvis/jarvis_platform/base.py,sha256=bihlnM5PowzKhi3dbxUp_eHOA14MLrHAbs_DXLe0s0g,3228
|
|
53
|
+
jarvis/jarvis_platform/kimi.py,sha256=Bfm4SLELVkVQBoGqapokX41m5VojyHvQ6LRLIDhg_z4,16519
|
|
54
|
+
jarvis/jarvis_platform/registry.py,sha256=wvXTKXqAoW6GPaLKCPYhRB9QhVe1xfoVbVPBZAxl_uA,7716
|
|
55
|
+
jarvis/jarvis_platform/yuanbao.py,sha256=X2lYZ3SxBzdaCwd5ooq9fxYbu14RUpeDILYg0W5W7Xc,21902
|
|
53
56
|
jarvis/jarvis_platform_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
54
57
|
jarvis/jarvis_platform_manager/main.py,sha256=o7UDrcCkLf9dTh2LOO-_bQVHjWf2X6RuSY5XRtCGvZs,20245
|
|
55
|
-
jarvis/jarvis_platform_manager/openai_test.py,sha256=8L9Xx-oR82X8l38NsVhkymYucICwMb-6yrH17Usk2TI,4954
|
|
56
58
|
jarvis/jarvis_smart_shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
59
|
jarvis/jarvis_smart_shell/main.py,sha256=slP_8CwpfMjWFZis0At1ANRlPb3gx1KteAg1B7R7dl4,4546
|
|
58
60
|
jarvis/jarvis_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -60,33 +62,33 @@ jarvis/jarvis_tools/ask_codebase.py,sha256=xQTcuDl7cbH6uVkWlkA1HXJAo4_3r09-3SboU
|
|
|
60
62
|
jarvis/jarvis_tools/ask_user.py,sha256=NjxTCHGKo4nthbEQD-isvPCW4PQhTcekEferjnukX70,2143
|
|
61
63
|
jarvis/jarvis_tools/base.py,sha256=vskI4czVdlhbo38ODuF9rFrnWBYQIhJSPAqAkLVcyTs,1165
|
|
62
64
|
jarvis/jarvis_tools/chdir.py,sha256=do_OdtabiH3lZcT_ynjSAX66XgH2gPl9mYiS7dMMDa8,2682
|
|
63
|
-
jarvis/jarvis_tools/code_plan.py,sha256=
|
|
65
|
+
jarvis/jarvis_tools/code_plan.py,sha256=jNa2rs4J3Fam8Q_RHE2_QvVch21TPp-Zfv-W6iQ3D_0,7729
|
|
64
66
|
jarvis/jarvis_tools/create_code_agent.py,sha256=Vl76eqERuxJWKmVR3eUSKE7ZqlG9pVhzqZqhuxZRin8,4217
|
|
65
67
|
jarvis/jarvis_tools/create_sub_agent.py,sha256=wGiHukvi58wb1AKW5beP7R8VvApOn8TOeGmtXsmcETE,3001
|
|
66
68
|
jarvis/jarvis_tools/execute_script.py,sha256=3sR_u6-SLbzmcUbXjHLN-rGjoelIj4uAefys5la_x7o,6759
|
|
67
|
-
jarvis/jarvis_tools/file_analyzer.py,sha256=
|
|
68
|
-
jarvis/jarvis_tools/file_operation.py,sha256=
|
|
69
|
+
jarvis/jarvis_tools/file_analyzer.py,sha256=XCsFB4dZ9qy2q929hqi1rTngj6AtRtIaPx_W7lJAcpQ,4814
|
|
70
|
+
jarvis/jarvis_tools/file_operation.py,sha256=sB1x0zI1dULXV7FG17wkiMQ7mQAEnXVd_5rakQ0Thik,9109
|
|
69
71
|
jarvis/jarvis_tools/find_methodology.py,sha256=FnvjWt4Za2P9B_oDPSOqkotuaQFbgjM9WCPkB_OJRzQ,2225
|
|
70
72
|
jarvis/jarvis_tools/lsp_get_diagnostics.py,sha256=IYqv8jQwSK71sZpDBRolSDnYii8t0M7fzLthhMYTeGk,5322
|
|
71
|
-
jarvis/jarvis_tools/methodology.py,sha256=
|
|
72
|
-
jarvis/jarvis_tools/read_code.py,sha256=
|
|
73
|
+
jarvis/jarvis_tools/methodology.py,sha256=gnlJojY4Dg5v9AAB5xcpKqpPIHs0tOYVtzTHkwOrWk0,5214
|
|
74
|
+
jarvis/jarvis_tools/read_code.py,sha256=_X6D3AIgRD9YplSDnFhXOm8wQAZMA3pkkXy31SG33l0,6041
|
|
73
75
|
jarvis/jarvis_tools/read_webpage.py,sha256=syduSZK4kXRRTPzeZ2W9Q6YH5umKiMJZyjA0cCpSF4g,2198
|
|
74
|
-
jarvis/jarvis_tools/registry.py,sha256
|
|
75
|
-
jarvis/jarvis_tools/search_web.py,sha256=
|
|
76
|
+
jarvis/jarvis_tools/registry.py,sha256=-wzv1Xfzvzu8-A22xTvPnGhgYamuFU_PVmpr_sgoxA8,23083
|
|
77
|
+
jarvis/jarvis_tools/search_web.py,sha256=kWW9K2QUR2AxPq6gcyx4Bgy-0Y4gzcdErq1DNT1EYM4,1333
|
|
76
78
|
jarvis/jarvis_tools/virtual_tty.py,sha256=Rpn9VXUG17LQsY87F_O6UCjN_opXB05mpwozxYf-xVI,16372
|
|
77
79
|
jarvis/jarvis_utils/__init__.py,sha256=KMg-KY5rZIhGTeOD5e2Xo5CU7DX1DUz4ULWAaTQ-ZNw,825
|
|
78
|
-
jarvis/jarvis_utils/config.py,sha256=
|
|
79
|
-
jarvis/jarvis_utils/embedding.py,sha256=
|
|
80
|
-
jarvis/jarvis_utils/file_processors.py,sha256=
|
|
81
|
-
jarvis/jarvis_utils/git_utils.py,sha256=
|
|
80
|
+
jarvis/jarvis_utils/config.py,sha256=1OKG64hK740C1RzGk4Kov-6MgpODupMLhuma_OO5vxs,3317
|
|
81
|
+
jarvis/jarvis_utils/embedding.py,sha256=_Q-VurYHQZSsyISClTFjadDaNqNPBMqJe58lMM6bsVs,6991
|
|
82
|
+
jarvis/jarvis_utils/file_processors.py,sha256=oNtVlz2JHcQ60NS6sgI-VsvYXOnsQgFUEVenznCXHC4,2952
|
|
83
|
+
jarvis/jarvis_utils/git_utils.py,sha256=j_Jw6h7JD91XhMf0WD3MAH4URkLUBrrYCLnuLm1GeN4,5630
|
|
82
84
|
jarvis/jarvis_utils/globals.py,sha256=Ed2d6diWXCgI74HVV_tI4qW7yXxLpNvQKN2yG0IH9hc,3388
|
|
83
|
-
jarvis/jarvis_utils/input.py,sha256=
|
|
84
|
-
jarvis/jarvis_utils/methodology.py,sha256=
|
|
85
|
-
jarvis/jarvis_utils/output.py,sha256=
|
|
86
|
-
jarvis/jarvis_utils/utils.py,sha256=
|
|
87
|
-
jarvis_ai_assistant-0.1.
|
|
88
|
-
jarvis_ai_assistant-0.1.
|
|
89
|
-
jarvis_ai_assistant-0.1.
|
|
90
|
-
jarvis_ai_assistant-0.1.
|
|
91
|
-
jarvis_ai_assistant-0.1.
|
|
92
|
-
jarvis_ai_assistant-0.1.
|
|
85
|
+
jarvis/jarvis_utils/input.py,sha256=QhqZEF4BpOGDgNEBrTBabA5n8DnlU0GaHqbKUEZ13Ls,6953
|
|
86
|
+
jarvis/jarvis_utils/methodology.py,sha256=dVk_1GmVFlZnj1EPR_3wilP2-vyOygAIH56w_8PC8Sw,6281
|
|
87
|
+
jarvis/jarvis_utils/output.py,sha256=BmWdB1bmizv0xfU4Z___9p_xQodorriIcEgADVq9fk0,8416
|
|
88
|
+
jarvis/jarvis_utils/utils.py,sha256=j-YZap58avAzSb9ZuB2I71trVqVxIpFxxZDoh8_7a_o,4653
|
|
89
|
+
jarvis_ai_assistant-0.1.150.dist-info/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
|
|
90
|
+
jarvis_ai_assistant-0.1.150.dist-info/METADATA,sha256=7qCut4ZuAw6wrI-H61ZzAYaeeljHvPen4W2fDTr0Zrk,10975
|
|
91
|
+
jarvis_ai_assistant-0.1.150.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
|
92
|
+
jarvis_ai_assistant-0.1.150.dist-info/entry_points.txt,sha256=4ZS8kq6jahnmfDyXFSx39HRi-Tkbp0uFc6cTXt3QIHA,929
|
|
93
|
+
jarvis_ai_assistant-0.1.150.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
|
|
94
|
+
jarvis_ai_assistant-0.1.150.dist-info/RECORD,,
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
Test script for Jarvis OpenAI-compatible API service.
|
|
4
|
-
"""
|
|
5
|
-
|
|
6
|
-
import argparse
|
|
7
|
-
import sys
|
|
8
|
-
from openai import OpenAI
|
|
9
|
-
|
|
10
|
-
def test_chat(api_base, model, stream=False, interactive=False):
|
|
11
|
-
"""Test chat completion with the API."""
|
|
12
|
-
client = OpenAI(
|
|
13
|
-
api_key="dummy-key", # Not actually used by our service
|
|
14
|
-
base_url=f"{api_base}/v1"
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
print(f"Testing chat with model: {model}, stream={stream}")
|
|
18
|
-
print("=" * 50)
|
|
19
|
-
|
|
20
|
-
try:
|
|
21
|
-
# First, list available models
|
|
22
|
-
print("Available models:")
|
|
23
|
-
models = client.models.list()
|
|
24
|
-
for m in models.data:
|
|
25
|
-
print(f" - {m.id}")
|
|
26
|
-
print()
|
|
27
|
-
|
|
28
|
-
if interactive:
|
|
29
|
-
# Interactive chat mode
|
|
30
|
-
messages = [
|
|
31
|
-
{"role": "system", "content": "You are a helpful assistant."}
|
|
32
|
-
]
|
|
33
|
-
|
|
34
|
-
print("Interactive chat mode. Type 'exit' to quit.")
|
|
35
|
-
print("=" * 50)
|
|
36
|
-
|
|
37
|
-
while True:
|
|
38
|
-
# Get user input
|
|
39
|
-
user_input = input("You: ")
|
|
40
|
-
if user_input.lower() in ['exit', 'quit', 'bye']:
|
|
41
|
-
break
|
|
42
|
-
|
|
43
|
-
# Add user message to history
|
|
44
|
-
messages.append({"role": "user", "content": user_input})
|
|
45
|
-
|
|
46
|
-
# Get response
|
|
47
|
-
print("Assistant: ", end="", flush=True)
|
|
48
|
-
|
|
49
|
-
if stream:
|
|
50
|
-
response = client.chat.completions.create(
|
|
51
|
-
model=model,
|
|
52
|
-
messages=messages, # type: ignore
|
|
53
|
-
stream=True
|
|
54
|
-
) # type: ignore
|
|
55
|
-
|
|
56
|
-
# Process the streaming response
|
|
57
|
-
assistant_response = ""
|
|
58
|
-
for chunk in response:
|
|
59
|
-
if hasattr(chunk.choices[0], 'delta') and hasattr(chunk.choices[0].delta, 'content') and chunk.choices[0].delta.content:
|
|
60
|
-
content = chunk.choices[0].delta.content
|
|
61
|
-
assistant_response += content
|
|
62
|
-
print(content, end="", flush=True)
|
|
63
|
-
print()
|
|
64
|
-
else:
|
|
65
|
-
response = client.chat.completions.create(
|
|
66
|
-
model=model,
|
|
67
|
-
messages=messages # type: ignore
|
|
68
|
-
)
|
|
69
|
-
assistant_response = response.choices[0].message.content
|
|
70
|
-
print(assistant_response)
|
|
71
|
-
|
|
72
|
-
# Add assistant response to history
|
|
73
|
-
messages.append({"role": "assistant", "content": assistant_response}) # type: ignore
|
|
74
|
-
print()
|
|
75
|
-
|
|
76
|
-
print("=" * 50)
|
|
77
|
-
print("Chat session ended.")
|
|
78
|
-
|
|
79
|
-
else:
|
|
80
|
-
# Single request mode
|
|
81
|
-
print("Sending chat request...")
|
|
82
|
-
messages = [
|
|
83
|
-
{"role": "system", "content": "You are a helpful assistant."},
|
|
84
|
-
{"role": "user", "content": "Hello! Tell me a short joke."}
|
|
85
|
-
]
|
|
86
|
-
|
|
87
|
-
if stream:
|
|
88
|
-
print("Response (streaming):")
|
|
89
|
-
|
|
90
|
-
# Use the OpenAI client for streaming
|
|
91
|
-
response = client.chat.completions.create(
|
|
92
|
-
model=model,
|
|
93
|
-
messages=messages, # type: ignore
|
|
94
|
-
stream=True
|
|
95
|
-
) # type: ignore
|
|
96
|
-
|
|
97
|
-
# Process the streaming response
|
|
98
|
-
full_content = ""
|
|
99
|
-
for chunk in response:
|
|
100
|
-
if hasattr(chunk.choices[0], 'delta') and hasattr(chunk.choices[0].delta, 'content') and chunk.choices[0].delta.content:
|
|
101
|
-
content = chunk.choices[0].delta.content
|
|
102
|
-
full_content += content
|
|
103
|
-
print(content, end="", flush=True)
|
|
104
|
-
|
|
105
|
-
print("\n")
|
|
106
|
-
print(f"Full response: {full_content}")
|
|
107
|
-
else:
|
|
108
|
-
print("Response:")
|
|
109
|
-
response = client.chat.completions.create(
|
|
110
|
-
model=model,
|
|
111
|
-
messages=messages # type: ignore
|
|
112
|
-
)
|
|
113
|
-
print(response.choices[0].message.content)
|
|
114
|
-
|
|
115
|
-
print("=" * 50)
|
|
116
|
-
print("Test completed successfully!")
|
|
117
|
-
|
|
118
|
-
except Exception as e:
|
|
119
|
-
print(f"Error: {str(e)}")
|
|
120
|
-
import traceback
|
|
121
|
-
traceback.print_exc()
|
|
122
|
-
return 1
|
|
123
|
-
|
|
124
|
-
return 0
|
|
125
|
-
|
|
126
|
-
def main():
|
|
127
|
-
parser = argparse.ArgumentParser(description="Test Jarvis OpenAI-compatible API")
|
|
128
|
-
parser.add_argument("--api-base", default="http://localhost:8000", help="API base URL")
|
|
129
|
-
parser.add_argument("--model", default="gpt-3.5-turbo", help="Model to test (default: gpt-3.5-turbo)")
|
|
130
|
-
parser.add_argument("--stream", action="store_true", help="Test streaming mode")
|
|
131
|
-
parser.add_argument("--interactive", "-i", action="store_true", help="Interactive chat mode")
|
|
132
|
-
|
|
133
|
-
args = parser.parse_args()
|
|
134
|
-
|
|
135
|
-
return test_chat(args.api_base, args.model, args.stream, args.interactive)
|
|
136
|
-
|
|
137
|
-
if __name__ == "__main__":
|
|
138
|
-
sys.exit(main())
|
|
File without changes
|
|
File without changes
|
{jarvis_ai_assistant-0.1.148.dist-info → jarvis_ai_assistant-0.1.150.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{jarvis_ai_assistant-0.1.148.dist-info → jarvis_ai_assistant-0.1.150.dist-info}/top_level.txt
RENAMED
|
File without changes
|