Skip to content

Commit ab9ed79

Browse files
committed
new release features
1 parent 1603713 commit ab9ed79

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

docs/Sample-Genai.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
!!! pied-piper ":bulb: TL;DR - GenAI leverages AI and Microservice Automation for project creation"
22

3-
To create projects, the system (either the WebGenAI web app, or API Logic Server CLI) performs the following:
3+
To create projects (either the WebGenAI web app, or API Logic Server CLI), the system performs the following:
44

55
1. Uses ChatGPT APIs to submit prompts and obtain data model class responses
66

77
2. It then uses these to create a database and project
88

99
This document presumes you have already created the project, and are using VSCode or GitHub to explore it. It illustrates how to run and customize the genai_demo project.
1010

11-
> Note: if you have *not* already created the project, proceed to the Appendix ("Creating GenAI Demo").
11+
> Note: if you have *not* already created the project, see the Appendix ("Creating GenAI Demo").
1212

1313

1414
 
1515

1616
## Setup Codespaces
1717

18-
Codespaces enables you to run in the cloud: VSCode via your Browser, courtesy Codespaces. You can use codespaces on your GenAI project:
18+
Codespaces enables you to run in the cloud: VSCode via your Browser, courtesy GitHub. You can use codespaces on your GenAI project:
1919

2020
1. Open your project on GitHub
2121

@@ -90,7 +90,7 @@ Explore rules and Python customization below.
9090

9191
### Logic Automation
9292

93-
The project creation provided natural language logic. This is translated (not into lots of code, but) rules expressed in Python. To explore rules created from your prompt:
93+
The project creation provided natural language logic. This is translated into ***rules*** (vs. lots of code) expressed in Python. To explore rules created from your prompt:
9494

9595
1. Open `logic/declare_logic.py`
9696

@@ -104,14 +104,22 @@ The project creation provided natural language logic. This is translated (not i
104104

105105
### Standard Python, Libraries
106106

107-
To save time, issue the follow command to simulate changes you might make in your IDE, e.g., to create a new custom endpoint, and send a Kafka message.
107+
To save time, issue the follow command to simulate changes you might make in your IDE, e.g., to create a new custom endpoint, and send a Kafka message.
108108

109109
```bash title="Simulate IDE Customization"
110-
als cust
110+
als add-cust
111111
```
112112

113113
![Customize](images/sample-ai/copilot/genai_cust.png)
114114

115+
The customization is this code in the diagram above:
116+
117+
```python title="Send Kafka Message"
118+
119+
# Sends the order to Kafka topic 'order_shipping' if the date shipped is not None.
120+
Rule.after_flush_row_event(on_class=Order, calling=kafka_producer.send_row_to_kafka, if_condition=lambda row: row.date_shipped is not None, with_args={"topic": "order_shipping"})
121+
```
122+
115123
### Try it out
116124

117125
Set a breakpoint in the code above, and:
-25.2 KB
Loading
151 KB
Loading

0 commit comments

Comments
 (0)