Skip to content

Commit d39225b

Browse files
committed
Add docs
1 parent 4afea1f commit d39225b

File tree

21 files changed

+969
-30
lines changed

21 files changed

+969
-30
lines changed

docs/_meta.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11
[
22
{
33
"text": "Guide",
4-
"link": "/guide/",
4+
"link": "/guide/getting-started/introduction",
55
"activeMatch": "/guide/"
66
},
7-
{
8-
"text": "Get Started",
9-
"link": "/get-started/",
10-
"activeMatch": "/get-started/"
11-
},
127
{
138
"text": "Std library",
149
"link": "/std-library/",
1510
"activeMatch": "/std-library/"
1611
},
1712
{
1813
"text": "Reference",
19-
"link": "/referece/",
14+
"link": "/reference/language-syntax",
2015
"activeMatch": "/reference/"
2116
}
2217
]

docs/get-started/index.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/guide/_meta.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,22 @@
1-
["index"]
1+
[
2+
{
3+
"type": "dir",
4+
"name": "getting-started",
5+
"label": "Getting Started"
6+
},
7+
{
8+
"type": "dir",
9+
"name": "language",
10+
"label": "Language"
11+
},
12+
{
13+
"type": "dir",
14+
"name": "web-dsl",
15+
"label": "Web"
16+
},
17+
{
18+
"type": "dir",
19+
"name": "std-library",
20+
"label": "Standard Library"
21+
}
22+
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
["introduction", "installation"]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Installation
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Introduction to AIScript

docs/guide/index.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/reference/_meta.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[
2+
{
3+
"type": "file",
4+
"name": "language-syntax",
5+
"label": "Language Syntax"
6+
},
7+
{
8+
"type": "file",
9+
"name": "language-keyword",
10+
"label": "Language Keyword"
11+
},
12+
{
13+
"type": "file",
14+
"name": "route-request",
15+
"label": "Route Request"
16+
},
17+
{
18+
"type": "file",
19+
"name": "directives",
20+
"label": "Directives"
21+
},
22+
{
23+
"type": "file",
24+
"name": "cli",
25+
"label": "Commands"
26+
},
27+
{
28+
"type": "dir",
29+
"name": "configuration",
30+
"label": "Configuration"
31+
}
32+
]

docs/reference/cli.mdx

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
2+
**aim** (AiScript Manager) is a command-line tool for AiScript. Similar [cargo](https://github.com/rust-lang/cargo) for Rust. It provides a set of commands to help you build web applications quickly.
3+
4+
## ai
5+
6+
`aim ai` is a command to generate AI apps built in AiScript from a prompt.
7+
8+
```
9+
$ cat prompts.txt
10+
Please write a chatbot apps that can answer questions about the
11+
following topics:
12+
- history
13+
- geography
14+
15+
$ aim ai prompts.txt
16+
17+
```
18+
19+
## compile
20+
21+
## console
22+
23+
## deploy
24+
25+
Deploy the AiScript project to the aiscript.dev server.
26+
27+
```
28+
$ aim deploy
29+
```
30+
31+
## debug
32+
33+
Open interactive Postman like debug UI in the browser. **aim** will import the API routes into the debug UI.
34+
35+
```
36+
$ aim debug
37+
Opening http://localhost:8001
38+
```
39+
40+
## fmt
41+
42+
Format the source code.
43+
44+
## gen
45+
46+
Generate code from templates.
47+
48+
## lint
49+
50+
Lint the source code.
51+
52+
## migrate
53+
54+
Database schema migration.
55+
56+
### migrate up
57+
58+
### migrate down
59+
60+
## mock
61+
62+
Generate mock data.
63+
64+
## new
65+
66+
Create a new AiScript project.
67+
68+
## test
69+
70+
## server
71+
72+
Run the AiScript project as a web server.
73+
74+
## version
75+
76+
Show the version of AiScript.

docs/reference/configuration/ai.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
> For AI observability, please refer to [observability](./observability.md).
2+
3+
```toml
4+
[ai.embedding]
5+
model = "gpt-3.5-turbo"
6+
7+
[ai.openai]
8+
api_key = "YOUR_API_KEY"
9+
completion_model = "gpt-3.5-turbo"
10+
11+
[ai.anthropic]
12+
api_key = "YOUR_API_KEY"
13+
completion_model = "claude-2"
14+
15+
[ai.cohere]
16+
api_key = "YOUR_API_KEY"
17+
completion_model = "command"
18+
19+
[ai.huggingface]
20+
api_key = "YOUR_API_KEY"
21+
completion_model = "gpt2"
22+
23+
```

0 commit comments

Comments
 (0)