You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+47-17Lines changed: 47 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,9 @@ When you right-click on a file and select `Reopen Editor With...` you can `confi
26
26
27
27
### Groq
28
28
29
-
-[Set up a Groq key here](https://platform.openai.com/account/api-keys) and change the setting: `mdlab: Groq key`
30
-
- Select `llama3-8b` as your language and ask it a question
29
+
-[Set up a Groq key here](https://console.groq.com/keys) and change the setting: `mdlab: Groq key`
30
+
- Default model is `llama3-8b-8192`, change the setting with `mdlab: groq model` to use other models like `llama3-70b-8192`, `llama-3.1-8b-instant`, `gemma2-9b-it`, `qwen-qwq-32b`, etc.
31
+
- Select `groq` as your language and ask it a question
31
32
- Run the code blocks it generates for you
32
33
33
34
## How it works
@@ -50,7 +51,7 @@ Press `alt+o` to open up the source code being used to generate outputs, which w
50
51
51
52
## Language Support
52
53
53
-
It's very simple to add your own language, look inside [src/languages/rust.ts](https://github.com/jackos/mdl/blob/main/src/languages/python.ts) for an example, then add your language to the switch statement in [`src/kernel.ts`](https://github.com/jackos/mdl/blob/main/src/kernel.ts). PRs welcomed!
54
+
It's very simple to add your own language, look inside [src/languages/rust.ts](https://github.com/jackos/mdlab/blob/main/src/languages/python.ts) for an example, then add your language to the switch statement in the [`src/kernel.ts`](https://github.com/jackos/mdlab/blob/main/src/kernel.ts)`createLanguageProcess` function. PRs welcomed!
54
55
55
56
This README.md was created with `mdlab`, these are some special features for different languages:
56
57
@@ -70,21 +71,10 @@ x
70
71
71
72
### Mojo
72
73
73
-
Mojo is a new Systems programming language for AI developers with Python syntax and interop.
74
+
Mojo is a new Systems programming language for AI developers with Python syntax.
74
75
75
76
It works with top level code and has some extra features like printing the last line.
76
77
77
-
Any variables you initialize in a Python cell will be available from Mojo via the `py` module:
78
-
79
-
```mojo
80
-
var res = String("Adding a String from Python to a Mojo variable: ") + py.x
81
-
res
82
-
```
83
-
84
-
```text
85
-
Adding a String from Python to a Mojo variable: [8, 7, 6, 5]
86
-
```
87
-
88
78
LSP features don't work yet
89
79
90
80
### Rust
@@ -106,7 +96,7 @@ x
106
96
107
97
### Go
108
98
109
-
```llama3-8b
99
+
```groq
110
100
You can write top level code in Go:
111
101
```
112
102
@@ -168,4 +158,44 @@ echo "[ "${reversed[@]} "]"
168
158
169
159
```text
170
160
[ 8 7 6 5 ]
171
-
```
161
+
```
162
+
163
+
## Tests
164
+
165
+
The project includes end-to-end tests that verify the expected outputs for all
166
+
supported languages. To run the test suite:
167
+
168
+
```bash
169
+
npm run test
170
+
```
171
+
172
+
```plaintext
173
+
🧪 Running Kernel End-to-End Tests
174
+
175
+
✅ Python: Simple print statement
176
+
✅ Python: Variables and arithmetic
177
+
✅ Python: Functions
178
+
✅ Python: Import math module
179
+
✅ Python: Error handling
180
+
✅ Python: List comprehensions
181
+
✅ Python: Dictionary operations
182
+
✅ Python: Class definition
183
+
✅ JavaScript: Console.log
184
+
✅ JavaScript: Arrow functions
185
+
✅ JavaScript: Array methods
186
+
✅ JavaScript: Object destructuring
187
+
✅ JavaScript: Promises
188
+
✅ Bash: Echo command
189
+
✅ Bash: Variables
190
+
✅ Bash: Arithmetic
191
+
✅ Bash: For loop
192
+
✅ Bash: Function
193
+
✅ Go: Hello World
194
+
✅ Go: Functions and variables
195
+
✅ Rust: Hello World
196
+
✅ Rust: Functions
197
+
198
+
📊 Results: 22 passed, 0 failed
199
+
```
200
+
201
+
If you don't have a language installed, the tests for that language will be skipped.
0 commit comments