-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDevika_Running_on_Colab
205 lines (205 loc) · 5.51 KB
/
Devika_Running_on_Colab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/FunkusBangru/Access-Of-Devika-Ai-Using-Colab/blob/main/Devika_Running_on_Colab\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"source": [
"Welcome to Devika Setup Guide!\n",
"\n",
"This notebook will guide you through setting up Devika, an AI software engineer, on your system.\n",
"\n",
"Please follow each step carefully.\n",
"\n",
"Step 1: Installing Required Packages\n",
"We'll start by installing the necessary packages for Devika."
],
"metadata": {
"id": "m6uwTqL8zjyr"
}
},
{
"cell_type": "code",
"source": [
"!pip install playwright uv"
],
"metadata": {
"id": "BgP_RgPwzloF"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"Step 2: Cloning Devika Repository\n",
"Next, we'll clone the Devika repository from GitHub."
],
"metadata": {
"id": "59YIrinEzqFD"
}
},
{
"cell_type": "code",
"source": [
"!git clone https://github.com/stitionai/devika.git %cd devika"
],
"metadata": {
"id": "M4osJGKyzxGe"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"Step 3: Installing Dependencies\n",
"Now, let's install all the required dependencies for Devika"
],
"metadata": {
"id": "ZGRG2vo40D8x"
}
},
{
"cell_type": "code",
"source": [
"!pip install -r requirements.txt !playwright install --with-deps"
],
"metadata": {
"id": "Xr4ZGeM40HlO"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"Step 4: Configuring Devika\n",
"We need to set up some configurations for Devika, including API keys and model settings."
],
"metadata": {
"id": "G_gkuJZ80LdH"
}
},
{
"cell_type": "markdown",
"source": [
"Replace the placeholders with your actual API keys and endpoints\n",
"\n",
"Replace placeholder values with actual API endpoints and keys. Adjust parameters like 'MODEL_NAME' if needed. Save changes. Follow instructions provided by Devika for setup or configuration."
],
"metadata": {
"id": "TBWPPQDp0SeU"
}
},
{
"cell_type": "code",
"source": [
"\n",
"# Set up Devika configurations\n",
"configurations = {\n",
" 'ENDPOINT_OΡΕΝΑΙ': 'YOUR_OΡΕΝΑΙ_ENDPOINT',\n",
" 'OPENAI_ENDPOINT': 'YOUR_OPENAI_ENDPOINT',\n",
" 'ΟΡΕΝΑΙ_ΑΡΙ_ΚΕΥ': 'YOUR_OΡΕΝΑΙ_API_KEY',\n",
" 'CLAUDE_API_KEY': 'YOUR_CLAUDE_API_KEY',\n",
" 'BING_API_KEY': 'YOUR_BING_API_KEY',\n",
" 'AZURE_API_KEY': 'YOUR_AZURE_API_KEY',\n",
" 'AZURE_ENDPOINT': 'YOUR_AZURE_ENDPOINT',\n",
" 'OPENROUTER_API_KEY': 'YOUR_OPENROUTER_API_KEY',\n",
" 'MODEL_NAME': 'gpt-3.5-turbo',\n",
" 'MAX_TOKENS': 8192,\n",
" # Remove token values and gpt-pilot\n",
"}\n",
"\n",
"# Write configurations to config.toml\n",
"with open('config.toml', 'a') as f:\n",
" f.write('\\n') # Add a new line before appending configurations\n",
" for key, value in configurations.items():\n",
" if isinstance(value, str):\n",
" f.write(f'{key} = \"{value}\"\\n')\n",
" else:\n",
" f.write(f'{key} = {value}\\n')"
],
"metadata": {
"id": "3i-6zp3n1LU_"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"Step 5: Starting Devika Server\n",
"\n",
"We'll now start the Devika server"
],
"metadata": {
"id": "gxFQXaFA1Txu"
}
},
{
"cell_type": "code",
"source": [
"\n",
"import subprocess\n",
"\n",
"# Start Devika server\n",
"devika_server_process = subprocess.Popen(['python', 'devika.py'])"
],
"metadata": {
"id": "Llb3sxrj2hpV"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"Step 6: Running UI Server with Improved Interface\n",
"Finally, we'll run the UI server with the improved user interface."
],
"metadata": {
"id": "ce5ruu1F2s7m"
}
},
{
"cell_type": "code",
"source": [
"%cd ui\n",
"!bun install\n",
"!bun run dev"
],
"metadata": {
"id": "fCtWTC7Q2-3i"
},
"execution_count": null,
"outputs": []
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"gpuType": "T4",
"provenance": [],
"authorship_tag": "ABX9TyO4fXSxWIJPkRMDABrrpyTg",
"include_colab_link": true
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 0
}