Skip to content

Commit 0948e2d

Browse files
committed
pre-create tutorial
1 parent 8f6f39f commit 0948e2d

File tree

2 files changed

+47
-8
lines changed

2 files changed

+47
-8
lines changed

docs/Manager.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,28 @@ The default IDE is VSCode. You can specify your favorite IDE, e.g.
2020
als start charm
2121
```
2222

23+
 
24+
25+
## Pre-created projects
26+
27+
We have pre-created 2 important projects you will want to review at some point:
28+
29+
* [tutorial](https://apilogicserver.github.io/Docs/Tutorial/) - short (< 1 hour) walk-through of using API Logic Server using the northwind (customers, orders...) database
30+
* sample - the completed tutorial. It's the same database, but with logic/Python ***customizations added***. It's a great resource for exploring.
31+
32+
* Hint: use your IDE to search for `#als`
33+
34+
You can always re-create them as follows:
35+
36+
1. Open a terminal window (**Terminal > New Terminal**), and paste the following CLI command:
37+
38+
```bash
39+
ApiLogicServer create --project-name=tutorial --db-url=
40+
ApiLogicServer create --project-name=sample --db-url=nw+
41+
42+
```
43+
44+
2345
&nbsp;
2446

2547
## Creating Projects: auto_open

docs/Sample-Genai.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
!!! pied-piper ":bulb: TL;DR - GENAI leverages AI for 'hands-free' project creation"
22

3-
ChatGPT APIs enable API Logic Server to submit prompts and obtain data model class responses.
3+
API Logic Server use ChatGPT APIs, to submit prompts and obtain data model class responses.
44

55
API Logic Server can use these to create databases and projects, from single command.
66

@@ -26,7 +26,7 @@ als genai --using=genai_demo.prompt --gen-using-file=system/genai/temp/chatgpt_r
2626

2727
&nbsp;
2828

29-
### What Just Happened?
29+
### What Just Happened? &nbsp;&nbsp;&nbsp;Next Steps...
3030

3131
`genai` processing is shown below (internal steps denoted in grey):
3232

@@ -72,25 +72,40 @@ To explore rules:
7272

7373
3. Paste them into the Copilot Chat windows
7474

75-
4. Paste the generated code back into `logic/declare_logic.py`. You will need to make a few small repairs.
75+
4. Paste the generated code back into `logic/declare_logic.py`. You will need to make a few small repairs:
76+
77+
* change *import models* to *import database.models*, and
78+
* change *as_formula* to *as_expression*
7679

7780
![Add Rules](images/sample-ai/copilot/add-rules.png)
7881

7982
&nbsp;
8083

8184
### Explore Using Standard Code
8285

83-
To save time, issue the follow command to mimic changes you might make in your IDE, e.g., to send Kafka messages.
86+
To save time, issue the follow command to simulate changes you might make in your IDE, e.g., to send Kafka messages.
8487

8588
```bash title="Mimic IDE Customization"
8689
als genai-cust
8790
```
8891

8992
&nbsp;
9093

91-
## Restart if AI Fails
94+
## Explore Deployment, for Collaboration
95+
96+
One of the best ways to de-risk projects is to verify the sponsors are in sync with what is happening. This is best addressed with *working software*, which often occurs project. Issues here can result in considerable rework... and frustrations.
97+
98+
GenAI Automation produces *working software, **now***, so you can find misunderstanding before investing serious effort ("fail fast"). To expose the working software, it's often desirable to deploy to the cloud.
9299

93-
AI results are not consistent, so the model file may need corrections. You can find it at `system/genai/temp/model.py`. You can correct the model file, and then run:
100+
API Logic Server creates the `devops` directory, which scripts to containerize your project, and deploy it to Azure. For more information, see [DevOps Automation](DevOps-Automation.md).
101+
102+
## Appendices
103+
104+
&nbsp;
105+
106+
### GenAI Restart Procedures
107+
108+
AI results are not consistent, so the created model file may need corrections. You can find it at `system/genai/temp/model.py`. You can correct the model file, and then run:
94109

95110
```bash
96111
als create --project-name=genai_demo --from-model=system/genai/temp/model.py --db-url=sqlite
@@ -111,10 +126,11 @@ We have seen failures such as:
111126
* bad test data creation: with Engine() as engine...
112127
* Bad load code (no session)
113128

114-
115129
&nbsp;
116130

117-
**Postgresql Example**
131+
### GenAI Using Postgresql
132+
133+
The above examples use *s1lite* since it requires no install. The GenAI process works for other database, such as Postgresql.
118134

119135
You can test this as follows:
120136

@@ -128,3 +144,4 @@ als create --project-name=genai_demo_pg.prompt --db-url=postgresql://postgres:p@
128144
Provisos:
129145

130146
* You have to create the database first
147+

0 commit comments

Comments
 (0)