jarvis-ai-assistant 0.1.11__py3-none-any.whl → 0.1.13__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/__pycache__/__init__.cpython-313.pyc +0 -0
- jarvis/__pycache__/agent.cpython-313.pyc +0 -0
- jarvis/__pycache__/main.cpython-313.pyc +0 -0
- jarvis/agent.py +7 -0
- jarvis/main.py +19 -1
- jarvis/models/__pycache__/kimi.cpython-313.pyc +0 -0
- {jarvis_ai_assistant-0.1.11.dist-info → jarvis_ai_assistant-0.1.13.dist-info}/METADATA +88 -20
- {jarvis_ai_assistant-0.1.11.dist-info → jarvis_ai_assistant-0.1.13.dist-info}/RECORD +12 -12
- {jarvis_ai_assistant-0.1.11.dist-info → jarvis_ai_assistant-0.1.13.dist-info}/WHEEL +0 -0
- {jarvis_ai_assistant-0.1.11.dist-info → jarvis_ai_assistant-0.1.13.dist-info}/entry_points.txt +0 -0
- {jarvis_ai_assistant-0.1.11.dist-info → jarvis_ai_assistant-0.1.13.dist-info}/top_level.txt +0 -0
jarvis/__init__.py
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
jarvis/agent.py
CHANGED
jarvis/main.py
CHANGED
|
@@ -82,7 +82,25 @@ def main():
|
|
|
82
82
|
try:
|
|
83
83
|
kimi_api_key = os.getenv("KIMI_API_KEY")
|
|
84
84
|
if not kimi_api_key:
|
|
85
|
-
PrettyOutput.
|
|
85
|
+
PrettyOutput.section("环境配置缺失", OutputType.ERROR)
|
|
86
|
+
PrettyOutput.print("\n需要设置 KIMI_API_KEY 才能使用 Jarvis。请按以下步骤操作:", OutputType.INFO, timestamp=False)
|
|
87
|
+
PrettyOutput.print("\n1. 获取 Kimi API Key:", OutputType.INFO, timestamp=False)
|
|
88
|
+
PrettyOutput.print(" • 访问 Kimi AI 平台: https://kimi.moonshot.cn", OutputType.INFO, timestamp=False)
|
|
89
|
+
PrettyOutput.print(" • 登录您的账号", OutputType.INFO, timestamp=False)
|
|
90
|
+
PrettyOutput.print(" • 打开浏览器开发者工具 (F12 或右键 -> 检查)", OutputType.INFO, timestamp=False)
|
|
91
|
+
PrettyOutput.print(" • 切换到 Network 标签页", OutputType.INFO, timestamp=False)
|
|
92
|
+
PrettyOutput.print(" • 发送任意消息", OutputType.INFO, timestamp=False)
|
|
93
|
+
PrettyOutput.print(" • 在请求中找到 Authorization 头部", OutputType.INFO, timestamp=False)
|
|
94
|
+
PrettyOutput.print(" • 复制 token 值(去掉 'Bearer ' 前缀)", OutputType.INFO, timestamp=False)
|
|
95
|
+
|
|
96
|
+
PrettyOutput.print("\n2. 设置环境变量:", OutputType.INFO, timestamp=False)
|
|
97
|
+
PrettyOutput.print(" 方法 1: 创建或编辑 ~/.jarvis_env 文件:", OutputType.INFO, timestamp=False)
|
|
98
|
+
PrettyOutput.print(" echo 'KIMI_API_KEY=your_key_here' > ~/.jarvis_env", OutputType.CODE, timestamp=False)
|
|
99
|
+
|
|
100
|
+
PrettyOutput.print("\n 方法 2: 直接设置环境变量:", OutputType.INFO, timestamp=False)
|
|
101
|
+
PrettyOutput.print(" export KIMI_API_KEY=your_key_here", OutputType.CODE, timestamp=False)
|
|
102
|
+
|
|
103
|
+
PrettyOutput.print("\n设置完成后重新运行 Jarvis。", OutputType.INFO, timestamp=False)
|
|
86
104
|
return 1
|
|
87
105
|
|
|
88
106
|
model = KimiModel(kimi_api_key)
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: jarvis-ai-assistant
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.13
|
|
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
|
|
@@ -36,7 +36,7 @@ Dynamic: requires-python
|
|
|
36
36
|
<img src="docs/images/jarvis-logo.png" alt="Jarvis Logo" width="200"/>
|
|
37
37
|
</p>
|
|
38
38
|
|
|
39
|
-
[](https://badge.fury.io/py/jarvis-ai)
|
|
39
|
+
[](https://badge.fury.io/py/jarvis-ai-assistant)
|
|
40
40
|
[](https://opensource.org/licenses/MIT)
|
|
41
41
|
[](https://www.python.org/downloads/)
|
|
42
42
|
|
|
@@ -54,20 +54,59 @@ Dynamic: requires-python
|
|
|
54
54
|
|
|
55
55
|
## 🌟 Features
|
|
56
56
|
|
|
57
|
-
🤖 **
|
|
58
|
-
-
|
|
59
|
-
-
|
|
57
|
+
🤖 **AI Integration**
|
|
58
|
+
- Kimi AI integration with streaming responses
|
|
59
|
+
- Context-aware conversations
|
|
60
|
+
- File understanding capabilities
|
|
60
61
|
|
|
61
62
|
🛠️ **Rich Tool Integration**
|
|
62
|
-
-
|
|
63
|
-
- File operations
|
|
64
|
-
-
|
|
65
|
-
-
|
|
63
|
+
- Shell command execution
|
|
64
|
+
- File operations (read/write/append)
|
|
65
|
+
- Task automation
|
|
66
|
+
- Predefined task support
|
|
66
67
|
|
|
67
68
|
🔄 **Interactive Experience**
|
|
68
69
|
- Natural language understanding
|
|
69
70
|
- Context-aware responses
|
|
70
71
|
- User-friendly interface
|
|
72
|
+
- Multi-line input support
|
|
73
|
+
- Colored output with progress indicators
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
## ⚙️ Environment Setup
|
|
77
|
+
|
|
78
|
+
Before using Jarvis, you need to set up your environment:
|
|
79
|
+
|
|
80
|
+
1. **API Key Configuration**
|
|
81
|
+
|
|
82
|
+
Create a `.jarvis_env` file in your home directory (`~/.jarvis_env`):
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
KIMI_API_KEY=your_kimi_api_key_here
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
To get your Kimi API key:
|
|
89
|
+
1. Visit [Kimi AI Platform](https://kimi.moonshot.cn) in your browser
|
|
90
|
+
2. Login to your account
|
|
91
|
+
3. Open browser Developer Tools (F12 or right-click -> Inspect)
|
|
92
|
+
4. Go to Network tab
|
|
93
|
+
5. Make any request (e.g., send a message)
|
|
94
|
+
6. Find a request to the Kimi API
|
|
95
|
+
7. Look for the `Authorization` header in the request headers
|
|
96
|
+
8. Copy the token value (remove the "Bearer " prefix)
|
|
97
|
+
9. Use this token as your `KIMI_API_KEY` in the `.jarvis_env` file
|
|
98
|
+
|
|
99
|
+
2. **Task Configuration (Optional)**
|
|
100
|
+
|
|
101
|
+
Create a `.jarvis` file in your working directory to define predefined tasks:
|
|
102
|
+
|
|
103
|
+
```yaml
|
|
104
|
+
# .jarvis
|
|
105
|
+
analyze_code: Analyze the code structure and quality in the current directory
|
|
106
|
+
fix_bugs: Help me find and fix potential bugs in the code
|
|
107
|
+
optimize: Suggest optimizations for the code
|
|
108
|
+
document: Generate documentation for the code
|
|
109
|
+
```
|
|
71
110
|
|
|
72
111
|
## 🚀 Installation
|
|
73
112
|
|
|
@@ -77,29 +116,50 @@ pip install jarvis-ai-assistant
|
|
|
77
116
|
|
|
78
117
|
## 💡 Usage
|
|
79
118
|
|
|
119
|
+
1. **Basic Usage**
|
|
80
120
|
```bash
|
|
81
|
-
#
|
|
121
|
+
# Start Jarvis
|
|
82
122
|
jarvis
|
|
83
123
|
|
|
84
|
-
#
|
|
85
|
-
jarvis
|
|
124
|
+
# Process specific files
|
|
125
|
+
jarvis -f file1.txt file2.py
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
2. **Using Predefined Tasks**
|
|
86
129
|
|
|
87
|
-
|
|
88
|
-
|
|
130
|
+
If you have a `.jarvis` file in your working directory:
|
|
131
|
+
```bash
|
|
132
|
+
# Jarvis will show available tasks on startup
|
|
133
|
+
# Select a task number or start a new conversation
|
|
89
134
|
```
|
|
90
135
|
|
|
136
|
+
3. **Interactive Features**
|
|
137
|
+
- Multi-line input support (press Enter twice to submit)
|
|
138
|
+
- File understanding and analysis
|
|
139
|
+
- Context-aware conversations
|
|
140
|
+
- Tool integration for system operations
|
|
141
|
+
|
|
142
|
+
4. **Environment Variables**
|
|
143
|
+
- `KIMI_API_KEY`: Your Kimi AI API key (required)
|
|
144
|
+
- Location: `~/.jarvis_env`
|
|
145
|
+
- Format: `KEY=value` (one per line)
|
|
146
|
+
|
|
147
|
+
5. **Task Configuration**
|
|
148
|
+
- File: `.jarvis` in working directory
|
|
149
|
+
- Format: `task_name: task_description`
|
|
150
|
+
- Purpose: Define commonly used tasks for quick access
|
|
151
|
+
- Example tasks:
|
|
152
|
+
- Code analysis
|
|
153
|
+
- Bug finding
|
|
154
|
+
- Documentation generation
|
|
155
|
+
- Performance optimization
|
|
156
|
+
|
|
91
157
|
## 🧰 Tools
|
|
92
158
|
|
|
93
159
|
| Tool | Description | Example |
|
|
94
160
|
|------|-------------|---------|
|
|
95
|
-
| 🔍 Search | Web search using DuckDuckGo | Search latest tech news |
|
|
96
|
-
| 📚 RAG | Document querying with embeddings | Query your documentation |
|
|
97
|
-
| 🐍 Python | Execute Python code | Run data analysis |
|
|
98
161
|
| 🖥️ Shell | Execute system commands | Manage files and processes |
|
|
99
162
|
| 📂 Files | Read/write operations | Handle configuration files |
|
|
100
|
-
| 🌐 Web | Extract webpage content | Gather information |
|
|
101
|
-
| 👤 User | Interactive input/confirmation | Get user preferences |
|
|
102
|
-
|
|
103
163
|
|
|
104
164
|
## 🤝 Contributing
|
|
105
165
|
|
|
@@ -115,6 +175,14 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
|
|
115
175
|
|
|
116
176
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
117
177
|
|
|
178
|
+
## ⚙️ Environment Setup
|
|
179
|
+
|
|
180
|
+
Create a `.jarvis_env` file in your home directory with:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
KIMI_API_KEY=your_kimi_api_key_here
|
|
184
|
+
```
|
|
185
|
+
|
|
118
186
|
---
|
|
119
187
|
|
|
120
188
|
<div align="center">
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
jarvis/__init__.py,sha256=
|
|
2
|
-
jarvis/agent.py,sha256=
|
|
3
|
-
jarvis/main.py,sha256=
|
|
1
|
+
jarvis/__init__.py,sha256=jrXHMn5gCi9cu3LcMmzS0ZilSm1247EmQAqdktXtCtI,50
|
|
2
|
+
jarvis/agent.py,sha256=xo5YdY8UbgE3AJaitT1dXoNoVm769LrWyFzEXxVCG7A,8672
|
|
3
|
+
jarvis/main.py,sha256=NnnMbAJxR_nfw74TI4paMSwm_1dHDA26WHwovJ2Dji0,5890
|
|
4
4
|
jarvis/utils.py,sha256=3hLtv-HcBL8Ngw69cowhARuIFrjcQ6yRP3Y1o9CvtsI,5992
|
|
5
|
-
jarvis/__pycache__/__init__.cpython-313.pyc,sha256=
|
|
6
|
-
jarvis/__pycache__/agent.cpython-313.pyc,sha256=
|
|
7
|
-
jarvis/__pycache__/main.cpython-313.pyc,sha256=
|
|
5
|
+
jarvis/__pycache__/__init__.cpython-313.pyc,sha256=ZPCBPXhfoJqLeQYXxIy9irsVB1FsLB6ZWJ3AWOJnLgM,209
|
|
6
|
+
jarvis/__pycache__/agent.cpython-313.pyc,sha256=DP0zgyKjGuwc62rH_vpoy_hXmGMI3zoHPlXZYu0qqp4,9956
|
|
7
|
+
jarvis/__pycache__/main.cpython-313.pyc,sha256=BQNr4ZeU7-Bsa1NbfND9ZjH0In4dcF_63NExSEY5NSM,8142
|
|
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=k4jyAlx4tlW0MKLMLzV7OOH9zsKrK0H955kY6M2SuFU,8772
|
|
@@ -14,7 +14,7 @@ jarvis/models/base.py,sha256=GgVl5N0qDqn-yqRcX_PX3wHjogouE6GPFAWktG40cXg,403
|
|
|
14
14
|
jarvis/models/kimi.py,sha256=J_0QB6XY61tY-Oeu2cexWto58QbMU_liYj1f6PKbNRw,9763
|
|
15
15
|
jarvis/models/__pycache__/__init__.cpython-313.pyc,sha256=jAwySX4diR7EWM_alK75tiIb_J8bVfs4Bh_U3bdjDLo,534
|
|
16
16
|
jarvis/models/__pycache__/base.cpython-313.pyc,sha256=4I9KZlXHvTB7vENA9YWK4Fx0sns_KvIOtWqzE9y_-Co,1094
|
|
17
|
-
jarvis/models/__pycache__/kimi.cpython-313.pyc,sha256=
|
|
17
|
+
jarvis/models/__pycache__/kimi.cpython-313.pyc,sha256=ks1WiR1d8NTu-0B4s9zIyifWUvijBN4qI6AFD0Jtgk0,12524
|
|
18
18
|
jarvis/tools/__init__.py,sha256=000SvX1Z0yzKtuVR9NS45r41DHUVpE6EiSEzzE99uR0,196
|
|
19
19
|
jarvis/tools/base.py,sha256=qm73kMOkqAWHjUisUWFye-x69LJuZdwm0U3Tct-mmMc,3890
|
|
20
20
|
jarvis/tools/file_ops.py,sha256=zTksx45NZm3iz9itN5iQGZ8DoxnSeTHdrnF08_ix7PU,3770
|
|
@@ -32,8 +32,8 @@ jarvis/tools/__pycache__/user_confirmation.cpython-313.pyc,sha256=wK3Ev10lHSUSRv
|
|
|
32
32
|
jarvis/tools/__pycache__/user_input.cpython-313.pyc,sha256=JjTFOhObKsKF4Pn8KBRuKfV1_Ssj083fjU7Mfc_5z7c,2531
|
|
33
33
|
jarvis/tools/__pycache__/user_interaction.cpython-313.pyc,sha256=RuVZ-pmiPBDywY3efgXSfohMAciC1avMGPmBK5qlnew,3305
|
|
34
34
|
jarvis/tools/__pycache__/webpage.cpython-313.pyc,sha256=BjzSfnNzsKCrLETCcWjt32lNDLzwnjqcVGg4JfWd9OM,3008
|
|
35
|
-
jarvis_ai_assistant-0.1.
|
|
36
|
-
jarvis_ai_assistant-0.1.
|
|
37
|
-
jarvis_ai_assistant-0.1.
|
|
38
|
-
jarvis_ai_assistant-0.1.
|
|
39
|
-
jarvis_ai_assistant-0.1.
|
|
35
|
+
jarvis_ai_assistant-0.1.13.dist-info/METADATA,sha256=eHll-S4aOAuIsUDqR4dcLL11uBIfipD6ySAC9N8oqlI,5233
|
|
36
|
+
jarvis_ai_assistant-0.1.13.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
37
|
+
jarvis_ai_assistant-0.1.13.dist-info/entry_points.txt,sha256=iKu7OMfew9dtfGhW71gIMTg4wvafuPqKb4wyQOnMAGU,44
|
|
38
|
+
jarvis_ai_assistant-0.1.13.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
|
|
39
|
+
jarvis_ai_assistant-0.1.13.dist-info/RECORD,,
|
|
File without changes
|
{jarvis_ai_assistant-0.1.11.dist-info → jarvis_ai_assistant-0.1.13.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|