1
## one: runs an LLM on one input
1
## one: runs an LLM on one input
2
2
3
Before running this script, create a `klex.json` file in the
3
Before running this script, create a `klex.json` file in the
4
root of your git repo, and run this command once:
4
root of your git repo, and run this command once:
5
5
```back
6
```back
6
go get oscarkilo.com/klex-git
7
go get oscarkilo.com/klex-git
7
```
8
```
8
9
9
Hello world example:
10
Hello world example:
11
10
```bash
12
```bash
11
go run oscarkilo.com/klex-git/one <<EOF
13
go run oscarkilo.com/klex-git/one <<EOF
12
{
14
{
13
"model": "Any big LLM",
15
"model": "Any big LLM",
14
"messages": [{
16
"messages": [{
15
"role": "user",
17
"role": "user",
16
"content": {
18
"content": {
17
"type": "text",
19
"type": "text",
18
"text": "Who played Hotel California in Lebowski?"
20
"text": "Who played Hotel California in Lebowski?"
19
}
21
}
20
}]
22
}]
21
}
23
}
22
EOF
24
EOF
23
```
25
```