Skip to content

Commit 374058e

Browse files
authored
Merge pull request #394 from ignatandrei/SKPromptGenerator
2 parents 79c9221 + 607d989 commit 374058e

File tree

31 files changed

+1298
-58
lines changed

31 files changed

+1298
-58
lines changed

README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# RSCG - 218 Examples of Roslyn Source Code Generators / 14 created by Microsoft /
1+
# RSCG - 219 Examples of Roslyn Source Code Generators / 14 created by Microsoft /
22

3-
## Latest Update : 2025-08-06 => 06 August 2025
3+
## Latest Update : 2025-08-07 => 07 August 2025
44

55
If you want to see examples with code, please click ***[List V2](https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG)***
66

77
If you want just those from Microsoft, please click ***[Microsoft](https://ignatandrei.github.io/RSCG_Examples/v2/docs/category/microsoft-examples)***
88

99
If you want to see by category, please click ***[category](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples)***
1010
or click any category below
11-
[actor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#actor) -[aop](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#aop) -[api](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#api) -[async](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#async) -[bitwise](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#bitwise) -[blazor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#blazor) -[builder](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#builder) -[clone](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#clone) -[codetostring](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#codetostring) -[commandline](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#commandline) -[console](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#console) -[constructor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#constructor) -[database](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#database) -[dependencyinjection](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#dependencyinjection) -[disposer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#disposer) -[enhancementclass](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementclass) -[enhancementproject](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementproject) -[enum](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enum) -[equals](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#equals) -[filestocode](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#filestocode) -[functionalprogramming](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#functionalprogramming) -[hangfire](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#hangfire) -[interface](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#interface) -[linq](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#linq) -[mapper](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mapper) -[mediator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mediator) -[mvc](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mvc) -[mvvm](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mvvm) -[optimizer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#optimizer) -[primitiveobsession](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#primitiveobsession) -[serializer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#serializer) -[signalr](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#signalr) -[statemachine](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#statemachine) -[templating](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#templating) -[tests](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#tests) -[winapi](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#winapi) -
11+
[actor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#actor) -[ai](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#ai) -[aop](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#aop) -[api](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#api) -[async](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#async) -[bitwise](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#bitwise) -[blazor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#blazor) -[builder](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#builder) -[clone](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#clone) -[codetostring](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#codetostring) -[commandline](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#commandline) -[console](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#console) -[constructor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#constructor) -[database](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#database) -[dependencyinjection](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#dependencyinjection) -[disposer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#disposer) -[enhancementclass](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementclass) -[enhancementproject](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementproject) -[enum](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enum) -[equals](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#equals) -[filestocode](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#filestocode) -[functionalprogramming](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#functionalprogramming) -[hangfire](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#hangfire) -[interface](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#interface) -[linq](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#linq) -[mapper](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mapper) -[mediator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mediator) -[mvc](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mvc) -[mvvm](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mvvm) -[optimizer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#optimizer) -[primitiveobsession](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#primitiveobsession) -[serializer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#serializer) -[signalr](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#signalr) -[statemachine](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#statemachine) -[templating](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#templating) -[tests](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#tests) -[winapi](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#winapi) -
1212

1313

1414
## If you have a Roslyn Source Code Generator, please create an issue.
@@ -20,8 +20,30 @@ If you want to be notified each time I add a new RSCG example , please click htt
2020

2121
## Content
2222

23-
Those are the 218 Roslyn Source Code Generators that I have tested you can see and download source code example.
23+
Those are the 219 Roslyn Source Code Generators that I have tested you can see and download source code example.
2424
( including 14 from Microsoft )
25+
### 219. [SKPromptGenerator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/SKPromptGenerator) , in the [AI](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#ai) category
26+
27+
Generated on : 2025-08-07 => 07 August 2025
28+
29+
<details>
30+
<summary>Expand</summary>
31+
32+
33+
34+
Author: Charlie Chen
35+
36+
A source generator to automatically create classes from string prompts.
37+
38+
Nuget: [https://www.nuget.org/packages/SKPromptGenerator/](https://www.nuget.org/packages/SKPromptGenerator/)
39+
40+
41+
Link: [https://ignatandrei.github.io/RSCG_Examples/v2/docs/SKPromptGenerator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/SKPromptGenerator)
42+
43+
Source: [https://github.com/CharlieDigital/SKPromptGenerator](https://github.com/CharlieDigital/SKPromptGenerator)
44+
45+
</details>
46+
2547
### 218. [Nino](https://ignatandrei.github.io/RSCG_Examples/v2/docs/Nino) , in the [Serializer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#serializer) category
2648

2749
Generated on : 2025-08-06 => 06 August 2025

later.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Just later
22

3-
## Latest Update : 2025-08-06 => 06 August 2025
3+
## Latest Update : 2025-08-07 => 07 August 2025
44

55

66

v2/Generator/DocusaurusExample.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,9 @@ Those are taken from $(BaseIntermediateOutputPath)\GX
103103
{{~ for fileContent in Description.Data.outputFiles.generatedFiles ~}}
104104

105105
<TabItem value="{{fileContent.fullPathFile}}" label="{{fileContent.file}}" >
106-
107-
{{~ if fileContent.content | string.contains "```" ~}}
108-
109-
{{fileContent.content}}
110-
111-
{{~ else ~}}
112-
113106
```csharp showLineNumbers
114107
{{fileContent.content}}
115108
```
116-
{{end}}
117109
</TabItem>
118110

119111
{{~ end ~}}

v2/Generator/MultiGeneratorV2.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ public string[] SourceNoRSCG()
120120
var text=await File.ReadAllTextAsync(nameFile);
121121
text = text.Replace("(img/", $"({d.Generator!.Source}/img/");
122122
text=text.Replace("(README_IMAGE.png)", $"({d.Generator!.Source}/README_IMAGE.png)");
123+
text = text.Replace("(README", $"({d.Generator!.Source}/README");
123124
text = text.Replace("(integ-tests/", $"({d.Generator!.Source}/integ-tests/");
124125
text = text.Replace("(./samples", $"({d.Generator!.Source}/samples");
125126
text = text.Replace("(./tests", $"({d.Generator!.Source}/tests");

v2/Generator/all.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,3 +217,4 @@ Nr,Key,Source,Category
217217
216,SG4MVC, https://github.com/SG4MVC/SG4MVC,MVC
218218
217,EnumsEnhanced, https://github.com/snowberry-software/EnumsEnhanced,Enum
219219
218,Nino, https://github.com/JasonXuDeveloper/Nino,Serializer
220+
219,SKPromptGenerator, https://github.com/CharlieDigital/SKPromptGenerator,AI

v2/GeneratorData/Category.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@ public enum Category
3939
Console=34,
4040
Async=35,
4141
MVC=36,
42+
AI=37,
4243
}
4344

v2/RSCGExamplesData/GeneratorDataRec.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,5 +1317,11 @@
13171317
"Category": 16,
13181318
"dtStart": "2025-08-06T00:00:00",
13191319
"show": true
1320+
},
1321+
{
1322+
"ID":"SKPromptGenerator",
1323+
"Category": 37,
1324+
"dtStart": "2025-08-07T00:00:00",
1325+
"show": true
13201326
}
13211327
]
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
2+
<h1>RSCG nr 219 : SKPromptGenerator</h1>
3+
4+
<h2>Info</h2>
5+
Nuget : <a href="https://www.nuget.org/packages/SKPromptGenerator/" target="_blank">https://www.nuget.org/packages/SKPromptGenerator/</a>
6+
7+
<p>You can find more details at : <a href="https://github.com/CharlieDigital/SKPromptGenerator" target="_blank"> https://github.com/CharlieDigital/SKPromptGenerator</a></p>
8+
9+
<p>Author :Charlie Chen</p>
10+
11+
<p>Source: <a href="https://github.com/CharlieDigital/SKPromptGenerator" target="_blank">https://github.com/CharlieDigital/SKPromptGenerator</a> </p>
12+
13+
<h2>About</h2>
14+
15+
Generate typed prompts for Semantic Kernel
16+
17+
<h2>
18+
How to use
19+
</h2>
20+
<h3>
21+
Add reference to the <a href="https://www.nuget.org/packages/SKPromptGenerator/" target="_blank">SKPromptGenerator</a> in the csproj
22+
</h3>
23+
<img src="images/SKPromptGenerator/DemoAI.csproj.png" width="580" height="580" />
24+
25+
<h3>This was for me the <b>starting</b> code</h3>
26+
27+
<br />
28+
I have <b>coded</b> the file Program.cs
29+
<br />
30+
<img src="images/SKPromptGenerator/csFiles/Program.cs.png" width="580" height="580" />
31+
<hr />
32+
33+
<br />
34+
I have <b>coded</b> the file WeatherCity.cs
35+
<br />
36+
<img src="images/SKPromptGenerator/csFiles/WeatherCity.cs.png" width="580" height="580" />
37+
<hr />
38+
<h3>And here are the <i>generated</i> files</h3>
39+
40+
<br />
41+
The file <i>generated</i> is WeatherPrompt.g.cs
42+
<br />
43+
<img src="images/SKPromptGenerator/generated/WeatherPrompt.g.cs.png" width="580" height="580" />
44+
45+
<br />
46+
The file <i>generated</i> is PromptTemplateAttribute.g.cs
47+
<br />
48+
<img src="images/SKPromptGenerator/generated/PromptTemplateAttribute.g.cs.png" width="580" height="580" />
49+
50+
<br />
51+
The file <i>generated</i> is PromptTemplateBase.g.cs
52+
<br />
53+
<img src="images/SKPromptGenerator/generated/PromptTemplateBase.g.cs.png" width="580" height="580" />
54+
55+
<p>
56+
You can download the code and this page as pdf from
57+
<a target="_blank" href='https://ignatandrei.github.io/RSCG_Examples/v2/docs/SKPromptGenerator'>
58+
https://ignatandrei.github.io/RSCG_Examples/v2/docs/SKPromptGenerator
59+
</a>
60+
</p>
61+
62+
63+
<p>
64+
You can see the whole list at
65+
<a target="_blank" href='https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG'>
66+
https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG
67+
</a>
68+
</p>
69+

v2/book/list.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</head>
1818
<body>
1919
<h1>
20-
This is the list of 218 RSCG with examples =>
20+
This is the list of 219 RSCG with examples =>
2121
</h1>
2222

2323
<table >
@@ -898,6 +898,10 @@ <h1>
898898
<td>218</td>
899899
<td><a href="examples/Nino.html">Nino</a></td>
900900
</tr>
901+
<tr>
902+
<td>219</td>
903+
<td><a href="examples/SKPromptGenerator.html">SKPromptGenerator</a></td>
904+
</tr>
901905
</table>
902906

903907

v2/book/pandocHTML.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ input-files:
232232
- examples/SG4MVC.html
233233
- examples/EnumsEnhanced.html
234234
- examples/Nino.html
235+
- examples/SKPromptGenerator.html
235236

236237
# or you may use input-file: with a single value
237238
# defaults:

0 commit comments

Comments
 (0)