Skip to content

Commit c24d56f

Browse files
committed
2 parents 4905728 + bcaf456 commit c24d56f

26 files changed

+89
-293
lines changed

.github/workflows/build_and_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/checkout@v4
1818

1919
- name: Setup .NET
20-
uses: actions/setup-dotnet@v3
20+
uses: actions/setup-dotnet@v4
2121
with:
2222
dotnet-version: 8.0.x
2323

.github/workflows/dockerhub-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uses: actions/checkout@v4
2929

3030
- name: Setup .NET
31-
uses: actions/setup-dotnet@v3
31+
uses: actions/setup-dotnet@v4
3232
with:
3333
dotnet-version: 8.0.x
3434

.github/workflows/nuget-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uses: actions/checkout@v4
2929

3030
- name: Setup .NET
31-
uses: actions/setup-dotnet@v3
31+
uses: actions/setup-dotnet@v4
3232
with:
3333
dotnet-version: 8.0.x
3434

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Roslynator.Analyzers" Version="4.12.4">
15+
<PackageReference Include="Roslynator.Analyzers" Version="4.12.9">
1616
<PrivateAssets>all</PrivateAssets>
1717
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1818
</PackageReference>

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,17 @@
5050
## Goals
5151

5252
The library is based on the [Telegram Bot API](https://core.telegram.org/bots/api).
53-
The goal of this repository is to help developers/companies to implement solution based on Telegram Integration with AI services.
53+
The goal of this repository is to help developers/companies to implement solution based on Telegram Integration with OpenAI services.
5454
The solution contains integration with the following services:
55-
- Azure Cognitive Services to implement semantic ETL (Extraction Transformation and Loading).
56-
- OpenAI for the implementation of a chatbot that can be used to interact with the user.
55+
- **OpenAI** for the implementation of a chatbot that can be used to interact with the user.
56+
- **Stripe** for the implementation of a payment system that can be used to interact with the user.
57+
- **MongoDB** for the implementation of a storage system that can be used to store the user data.
58+
- **CloudAmqp** for the implementation of a message broker that can be used to send messages between the services.
59+
60+
> **Note:**
61+
> The library do not contains reference to ETL (Extraction Transformation and Loading).
62+
>
63+
> ETL is out of the scope of this library and is moved on other repository.
5764
5865

5966
## Prerequisites

TelegramIntegration.sln

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Genocs.TelegramIntegration.
1717
EndProject
1818
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Solution Items", "_Solution Items", "{ED15336C-78BC-4F5F-8CA3-0E811DF96BF9}"
1919
ProjectSection(SolutionItems) = preProject
20-
CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md
2120
Directory.Build.props = Directory.Build.props
2221
Directory.Build.targets = Directory.Build.targets
2322
docker-compose.yml = docker-compose.yml
2423
dotnet.ruleset = dotnet.ruleset
2524
global.json = global.json
26-
launchSettings.json = launchSettings.json
27-
LICENSE = LICENSE
2825
README.md = README.md
29-
stylecop.json = stylecop.json
3026
webapi.dockerfile = webapi.dockerfile
3127
worker.dockerfile = worker.dockerfile
3228
EndProjectSection

docker-compose.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
version: '3.9'
2-
31
services:
42
application.webapi:
5-
image: genocs/telegram_integration-webapi:3.1.1
3+
image: genocs/telegram_integration-webapi
64
build:
75
context: .
86
dockerfile: webapi.dockerfile
9-
10-
application.worker:
11-
image: genocs/telegram_integration-worker:3.1.1
12-
build:
13-
context: .
14-
dockerfile: worker.dockerfile

dotnet.ruleset

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<RuleSet Name=".Net Rules" Description="These rules enforces consistent code quality guidelines." ToolsVersion="16.0">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RuleSet Name=".Net Rules" Description="These rules enforces consistent code quality guidelines." ToolsVersion="17.0">
33
<Include Path="basicdesignguidelinerules.ruleset" Action="Default" />
44
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
55
<Rule Id="CA1014" Action="None" />
@@ -71,7 +71,6 @@
7171
<Rule Id="RCS1067" Action="None" />
7272
<Rule Id="RCS1075" Action="None" />
7373
<Rule Id="RCS1076" Action="Hidden" />
74-
<Rule Id="RCS1079" Action="None" />
7574
<Rule Id="RCS1082" Action="Warning" />
7675
<Rule Id="RCS1083" Action="Warning" />
7776
<Rule Id="RCS1086" Action="None" />
@@ -82,7 +81,6 @@
8281
<Rule Id="RCS1102" Action="None" />
8382
<Rule Id="RCS1109" Action="Info" />
8483
<Rule Id="RCS1115" Action="Hidden" />
85-
<Rule Id="RCS1155" Action="None" />
8684
<Rule Id="RCS1116" Action="Hidden" />
8785
<Rule Id="RCS1117" Action="Hidden" />
8886
<Rule Id="RCS1119" Action="Info" />
@@ -101,6 +99,7 @@
10199
<Rule Id="RCS1150" Action="Info" />
102100
<Rule Id="RCS1152" Action="Hidden" />
103101
<Rule Id="RCS1153" Action="None" />
102+
<Rule Id="RCS1155" Action="None" />
104103
<Rule Id="RCS1167" Action="Hidden" />
105104
<Rule Id="RCS1168" Action="None" />
106105
<Rule Id="RCS1178" Action="Info" />
@@ -112,36 +111,34 @@
112111
<Rule Id="RCS1210" Action="None" />
113112
<Rule Id="RCS1219" Action="None" />
114113
<Rule Id="RCS1231" Action="Info" />
115-
<Rule Id="RCS1046" Action="None" />
116114
</Rules>
117115
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
118-
<Rule Id="SA1649" Action="None"/>
119-
<Rule Id="SA1600" Action="None"/>
120-
<Rule Id="SA1208" Action="None"/>
121-
<Rule Id="SA1616" Action="None"/>
122-
<Rule Id="SA1614" Action="None"/>
123-
<Rule Id="SA1505" Action="None" />
124-
<Rule Id="SA1508" Action="None" />
125-
<Rule Id="SA1518" Action="None" />
126116
<Rule Id="SA1000" Action="Info" />
117+
<Rule Id="SA1009" Action="None" />
118+
<Rule Id="SA1013" Action="None" />
127119
<Rule Id="SA1101" Action="None" />
128120
<Rule Id="SA1118" Action="None" />
129-
<Rule Id="SA1129" Action="None" />
130121
<Rule Id="SA1124" Action="None" />
131-
<Rule Id="SA1009" Action="None" />
132-
<Rule Id="SA1013" Action="None" />
122+
<Rule Id="SA1129" Action="None" />
133123
<Rule Id="SA1201" Action="None" />
134124
<Rule Id="SA1202" Action="Info" />
135125
<Rule Id="SA1204" Action="None" />
126+
<Rule Id="SA1208" Action="None" />
136127
<Rule Id="SA1210" Action="None" />
137128
<Rule Id="SA1300" Action="None" />
138129
<Rule Id="SA1309" Action="None" />
139130
<Rule Id="SA1313" Action="None" />
140131
<Rule Id="SA1401" Action="None" />
141132
<Rule Id="SA1402" Action="None" />
142133
<Rule Id="SA1413" Action="None" />
134+
<Rule Id="SA1501" Action="None" />
135+
<Rule Id="SA1503" Action="None" />
136+
<Rule Id="SA1505" Action="None" />
137+
<Rule Id="SA1508" Action="None" />
143138
<Rule Id="SA1512" Action="None" />
144139
<Rule Id="SA1516" Action="None" />
140+
<Rule Id="SA1518" Action="None" />
141+
<Rule Id="SA1600" Action="None" />
145142
<Rule Id="SA1601" Action="None" />
146143
<Rule Id="SA1602" Action="None" />
147144
<Rule Id="SA1604" Action="None" />
@@ -150,15 +147,16 @@
150147
<Rule Id="SA1607" Action="None" />
151148
<Rule Id="SA1608" Action="None" />
152149
<Rule Id="SA1611" Action="None" />
150+
<Rule Id="SA1614" Action="None" />
153151
<Rule Id="SA1615" Action="None" />
152+
<Rule Id="SA1616" Action="None" />
154153
<Rule Id="SA1618" Action="None" />
155154
<Rule Id="SA1623" Action="None" />
155+
<Rule Id="SA1633" Action="None" />
156156
<Rule Id="SA1642" Action="None" />
157157
<Rule Id="SA1643" Action="None" />
158-
<Rule Id="SA1633" Action="None" />
159158
<Rule Id="SA1648" Action="None" />
159+
<Rule Id="SA1649" Action="None" />
160160
<Rule Id="SX1309" Action="Warning" />
161-
<Rule Id="SA1503" Action="None" />
162-
<Rule Id="SA1501" Action="None" />
163161
</Rules>
164162
</RuleSet>

src/Genocs.TelegramIntegration.Infrastructure/Extensions/ServiceCollectionExtensions.cs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using Genocs.Integration.CognitiveServices.Interfaces;
2-
using Genocs.Integration.CognitiveServices.Options;
3-
using Genocs.Integration.CognitiveServices.Services;
1+
using System.Reflection;
42
using Genocs.TelegramIntegration.Configurations;
53
using Genocs.TelegramIntegration.Contracts.Options;
64
using Genocs.TelegramIntegration.Services;
@@ -9,7 +7,6 @@
97
using Microsoft.Extensions.Configuration;
108
using Microsoft.Extensions.DependencyInjection;
119
using Microsoft.Extensions.DependencyInjection.Extensions;
12-
using System.Reflection;
1310

1411
namespace Genocs.TelegramIntegration.Infrastructure.Extensions;
1512

@@ -45,8 +42,6 @@ public static IServiceCollection AddCustomMassTransit(this IServiceCollection se
4542
{
4643
cfg.ConfigureEndpoints(context);
4744

48-
cfg.UseNServiceBusJsonSerializer();
49-
5045
// cfg.UseHealthCheck(context);
5146
cfg.Host(
5247
rabbitMQSettings.HostName,
@@ -80,17 +75,8 @@ public static IServiceCollection AddApplicationServices(this IServiceCollection
8075
{
8176
services.Configure<TelegramSettings>(configuration.GetSection(TelegramSettings.Position));
8277
services.Configure<OpenAISettings>(configuration.GetSection(OpenAISettings.Position));
83-
services.Configure<ApiClientSettings>(configuration.GetSection(ApiClientSettings.Position));
8478
services.Configure<StripeSettings>(configuration.GetSection(StripeSettings.Position));
8579

86-
services.Configure<AzureCognitiveServicesSettings>(configuration.GetSection(AzureCognitiveServicesSettings.Position));
87-
services.Configure<AzureStorageSettings>(configuration.GetSection(AzureStorageSettings.Position));
88-
services.Configure<ImageClassifierSettings>(configuration.GetSection(ImageClassifierSettings.Position));
89-
services.Configure<AzureCognitiveServicesSettings>(configuration.GetSection(AzureCognitiveServicesSettings.Position));
90-
91-
services.TryAddSingleton<IFormRecognizer, FormRecognizerService>();
92-
services.TryAddSingleton<IImageClassifier, ImageClassifierService>();
93-
9480
services.TryAddScoped<ITelegramProxy, TelegramProxy>();
9581
services.TryAddScoped<IOpenAIMiddleware, OpenAIMiddleware>();
9682

src/Genocs.TelegramIntegration.Infrastructure/Genocs.TelegramIntegration.Infrastructure.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="MassTransit.RabbitMQ" Version="8.2.5" />
14-
<PackageReference Include="MassTransit.Interop.NServiceBus" Version="8.2.5" />
15-
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="8.0.8" />
13+
<PackageReference Include="MassTransit.RabbitMQ" Version="8.3.0" />
14+
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="8.0.10" />
1615
</ItemGroup>
1716

1817
<ItemGroup>

0 commit comments

Comments
 (0)