Skip to content

Commit e2bcdb1

Browse files
authored
Merge pull request #61 from GarageGroup/feature/update-gpt
Feature/update gpt
2 parents 5853a71 + 7d68683 commit e2bcdb1

File tree

83 files changed

+2253
-332
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+2253
-332
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
- name: Ping Health Check URL
125125
uses: GarageGroup/platform-ping-app@v0.0.3
126126
with:
127-
health_check_url: https://${{ vars.TEST_WEBAPP_NAME }}.azurewebsites.net/api/health?code=${{ secrets.TEST_BOTFUNC_KEY }}
127+
health_check_url: https://${{ vars.TEST_WEBAPP_NAME }}.azurewebsites.net/health?code=${{ secrets.TEST_BOTFUNC_KEY }}
128128
contains: ${{ steps.get_version.outputs.version }}
129129
retry_delay_in_seconds: 15
130130
max_attempts: 10

.github/workflows/web-deploy-prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Ping Health Check URL
5454
uses: GarageGroup/platform-ping-app@v0.0.3
5555
with:
56-
health_check_url: https://${{ vars.PROD_WEBAPP_NAME }}.azurewebsites.net/api/health?code=${{ secrets.PROD_BOTFUNC_KEY }}
56+
health_check_url: https://${{ vars.PROD_WEBAPP_NAME }}.azurewebsites.net/health?code=${{ secrets.PROD_BOTFUNC_KEY }}
5757
contains: ${{ steps.get_version.outputs.version }}
5858
retry_delay_in_seconds: 15
5959
max_attempts: 10

.github/workflows/web-deploy-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Ping Health Check URL
5454
uses: GarageGroup/platform-ping-app@v0.0.3
5555
with:
56-
health_check_url: https://${{ vars.TEST_WEBAPP_NAME }}.azurewebsites.net/api/health?code=${{ secrets.TEST_BOTFUNC_KEY }}
56+
health_check_url: https://${{ vars.TEST_WEBAPP_NAME }}.azurewebsites.net/health?code=${{ secrets.TEST_BOTFUNC_KEY }}
5757
contains: ${{ steps.get_version.outputs.version }}
5858
retry_delay_in_seconds: 15
5959
max_attempts: 10

src/app/AzureFunc/Applicaton/BotFlow/Flow.IncidentCreate.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ private static BotCommandBuilder WithIncidentCreateCommand(this BotCommandBuilde
1919

2020
private static Dependency<IChatCommand<IncidentCreateCommandIn, Unit>> UseIncidentCreateCommand()
2121
=>
22-
Pipeline.Pipe(
23-
UseDataverseApi().UseCrmIncidentApi())
22+
PrimaryHandler.UseStandardSocketsHttpHandler()
23+
.UseLogging("CrmIncidentFileApi")
24+
.UseHttpApi()
25+
.With(UseDataverseApi())
26+
.UseCrmIncidentApi()
2427
.With(
2528
UseDataverseApi().With(UseSqlApi()).UseCrmOwnerApi())
2629
.With(
@@ -72,6 +75,7 @@ private static SupportGptApiOption ResolveSupportGptApiOption(IServiceProvider s
7275
{
7376
MaxTokens = section.GetValue<int?>("MaxTokens"),
7477
Temperature = section.GetValue<decimal?>("Temperature"),
78+
IsImageProcessing = section.GetValue<bool>("IsImageProcessing"),
7579
CaseTypeTemplate = new(
7680
role: "user",
7781
contentTemplate: section["UserIncidentCaseTypeTemplate"].OrEmpty())

src/app/AzureFunc/AzureFunc.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
@@ -31,7 +31,7 @@
3131
<PackageReference Include="GarageGroup.Infra.Azure.DurableTask" Version="0.8.0" />
3232
<PackageReference Include="GarageGroup.Infra.Azure.Endpoint" Version="0.14.0" />
3333
<PackageReference Include="GarageGroup.Infra.Azure.Hosting" Version="0.11.0" />
34-
<PackageReference Include="GarageGroup.Infra.Dataverse.Api" Version="3.16.1" />
34+
<PackageReference Include="GarageGroup.Infra.Dataverse.Api" Version="3.17.0" />
3535
<PackageReference Include="GarageGroup.Infra.HealthCheck.Handler" Version="0.3.0" />
3636
<PackageReference Include="GarageGroup.Infra.Http.Api" Version="0.2.0" />
3737
<PackageReference Include="GarageGroup.Infra.Http.Header" Version="0.0.1" />
@@ -40,8 +40,8 @@
4040
<PackageReference Include="GarageGroup.Infra.Sql.Api.Provider.Dataverse" Version="0.1.0" />
4141
<PackageReference Include="GarageGroup.Infra.Telegram.Bot.Api" Version="0.1.0" />
4242
<PackageReference Include="GarageGroup.Infra.Telegram.Bot.Authorization.Api.Dataverse" Version="0.0.2" />
43-
<PackageReference Include="GarageGroup.Infra.Telegram.Bot.Authorization.Azure" Version="0.1.0" />
44-
<PackageReference Include="GarageGroup.Infra.Telegram.Bot.Engine" Version="0.1.0" />
43+
<PackageReference Include="GarageGroup.Infra.Telegram.Bot.Authorization.Azure" Version="0.2.0" />
44+
<PackageReference Include="GarageGroup.Infra.Telegram.Bot.Engine" Version="0.2.0" />
4545
<PackageReference Include="GarageGroup.Infra.Telegram.Bot.Storage.Azure.Blob" Version="0.0.1" />
4646
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.2.0" />
4747
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.17.2" OutputItemType="Analyzer" />

src/app/AzureFunc/Resources/BotCore.ru.resx

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,64 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<root>
3+
<!--
4+
Microsoft ResX Schema
5+
6+
Version 2.0
7+
8+
The primary goals of this format is to allow a simple XML format
9+
that is mostly human readable. The generation and parsing of the
10+
various data types are done through the TypeConverter classes
11+
associated with the data types.
12+
13+
Example:
14+
15+
... ado.net/XML headers & schema ...
16+
<resheader name="resmimetype">text/microsoft-resx</resheader>
17+
<resheader name="version">2.0</resheader>
18+
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19+
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20+
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21+
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22+
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23+
<value>[base64 mime encoded serialized .NET Framework object]</value>
24+
</data>
25+
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26+
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27+
<comment>This is a comment</comment>
28+
</data>
29+
30+
There are any number of "resheader" rows that contain simple
31+
name/value pairs.
32+
33+
Each data row contains a name, and value. The row also contains a
34+
type or mimetype. Type corresponds to a .NET class that support
35+
text/value conversion through the TypeConverter architecture.
36+
Classes that don't support this are serialized and stored with the
37+
mimetype set.
38+
39+
The mimetype is used for serialized objects, and tells the
40+
ResXResourceReader how to depersist the object. This is currently not
41+
extensible. For a given mimetype the value must be set accordingly:
42+
43+
Note - application/x-microsoft.net.object.binary.base64 is the format
44+
that the ResXResourceWriter will generate, however the reader can
45+
read any of the formats listed below.
46+
47+
mimetype: application/x-microsoft.net.object.binary.base64
48+
value : The object must be serialized with
49+
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50+
: and then encoded with base64 encoding.
51+
52+
mimetype: application/x-microsoft.net.object.soap.base64
53+
value : The object must be serialized with
54+
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55+
: and then encoded with base64 encoding.
56+
57+
mimetype: application/x-microsoft.net.object.bytearray.base64
58+
value : The object must be serialized into a byte array
59+
: using a System.ComponentModel.TypeConverter
60+
: and then encoded with base64 encoding.
61+
-->
362
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
463
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
564
<xsd:element name="root" msdata:IsDataSet="true">
@@ -83,7 +142,7 @@
83142
<value>Описание</value>
84143
</data>
85144
<data name="BotDescriptionValue" xml:space="preserve">
86-
<value>Бот учета рабочего времени Garage Group</value>
145+
<value>Бот для работы с инцидентами Garage Group</value>
87146
</data>
88147
<data name="BotVersion" xml:space="preserve">
89148
<value>Версия</value>

src/app/AzureFunc/Resources/ContactGet.resx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,13 @@
8888
<data name="ContactFieldName" xml:space="preserve">
8989
<value>Contact</value>
9090
</data>
91+
<data name="ConfirmationHeaderText" xml:space="preserve">
92+
<value>Contact is found</value>
93+
</data>
94+
<data name="ConfirmButton" xml:space="preserve">
95+
<value>Confirm</value>
96+
</data>
97+
<data name="CancelButton" xml:space="preserve">
98+
<value>Reject</value>
99+
</data>
91100
</root>

src/app/AzureFunc/Resources/ContactGet.ru.resx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,13 @@
8888
<data name="ContactFieldName" xml:space="preserve">
8989
<value>Контакт</value>
9090
</data>
91+
<data name="ConfirmationHeaderText" xml:space="preserve">
92+
<value>Найден контакт</value>
93+
</data>
94+
<data name="ConfirmButton" xml:space="preserve">
95+
<value>Подтвердить</value>
96+
</data>
97+
<data name="CancelButton" xml:space="preserve">
98+
<value>Отклонить</value>
99+
</data>
91100
</root>

src/app/AzureFunc/Resources/IncidentCreate.resx

Lines changed: 78 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,64 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<root>
3+
<!--
4+
Microsoft ResX Schema
5+
6+
Version 2.0
7+
8+
The primary goals of this format is to allow a simple XML format
9+
that is mostly human readable. The generation and parsing of the
10+
various data types are done through the TypeConverter classes
11+
associated with the data types.
12+
13+
Example:
14+
15+
... ado.net/XML headers & schema ...
16+
<resheader name="resmimetype">text/microsoft-resx</resheader>
17+
<resheader name="version">2.0</resheader>
18+
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19+
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20+
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21+
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22+
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23+
<value>[base64 mime encoded serialized .NET Framework object]</value>
24+
</data>
25+
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26+
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27+
<comment>This is a comment</comment>
28+
</data>
29+
30+
There are any number of "resheader" rows that contain simple
31+
name/value pairs.
32+
33+
Each data row contains a name, and value. The row also contains a
34+
type or mimetype. Type corresponds to a .NET class that support
35+
text/value conversion through the TypeConverter architecture.
36+
Classes that don't support this are serialized and stored with the
37+
mimetype set.
38+
39+
The mimetype is used for serialized objects, and tells the
40+
ResXResourceReader how to depersist the object. This is currently not
41+
extensible. For a given mimetype the value must be set accordingly:
42+
43+
Note - application/x-microsoft.net.object.binary.base64 is the format
44+
that the ResXResourceWriter will generate, however the reader can
45+
read any of the formats listed below.
46+
47+
mimetype: application/x-microsoft.net.object.binary.base64
48+
value : The object must be serialized with
49+
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50+
: and then encoded with base64 encoding.
51+
52+
mimetype: application/x-microsoft.net.object.soap.base64
53+
value : The object must be serialized with
54+
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55+
: and then encoded with base64 encoding.
56+
57+
mimetype: application/x-microsoft.net.object.bytearray.base64
58+
value : The object must be serialized into a byte array
59+
: using a System.ComponentModel.TypeConverter
60+
: and then encoded with base64 encoding.
61+
-->
362
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
463
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
564
<xsd:element name="root" msdata:IsDataSet="true">
@@ -145,4 +204,22 @@
145204
<data name="IncidentCreationSuccessTemplate" xml:space="preserve">
146205
<value>Incident {0} was successfully created</value>
147206
</data>
148-
</root>
207+
<data name="ChoosePriorityText" xml:space="preserve">
208+
<value>Choose the priority</value>
209+
</data>
210+
<data name="AttachmentsFieldName" xml:space="preserve">
211+
<value>Attachments</value>
212+
</data>
213+
<data name="IncidentCreationAnnotationFailureInvalidFileSizeTemplate" xml:space="preserve">
214+
<value>Failed to create the following attachments due to file size being too large: {0}</value>
215+
</data>
216+
<data name="IncidentCreationAnnotationFailureTemplate" xml:space="preserve">
217+
<value>Errors occurred when creating some attachments. Please follow the link and add them manually: {0}</value>
218+
</data>
219+
<data name="GptErrorMessage" xml:space="preserve">
220+
<value>An unexpected error occurred during generation. Fill in the title yourself</value>
221+
</data>
222+
<data name="GptTempMessage" xml:space="preserve">
223+
<value>The title is generated... It may take some time</value>
224+
</data>
225+
</root>

src/app/AzureFunc/Resources/IncidentCreate.ru.resx

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,64 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<root>
3+
<!--
4+
Microsoft ResX Schema
5+
6+
Version 2.0
7+
8+
The primary goals of this format is to allow a simple XML format
9+
that is mostly human readable. The generation and parsing of the
10+
various data types are done through the TypeConverter classes
11+
associated with the data types.
12+
13+
Example:
14+
15+
... ado.net/XML headers & schema ...
16+
<resheader name="resmimetype">text/microsoft-resx</resheader>
17+
<resheader name="version">2.0</resheader>
18+
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19+
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20+
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21+
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22+
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23+
<value>[base64 mime encoded serialized .NET Framework object]</value>
24+
</data>
25+
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26+
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27+
<comment>This is a comment</comment>
28+
</data>
29+
30+
There are any number of "resheader" rows that contain simple
31+
name/value pairs.
32+
33+
Each data row contains a name, and value. The row also contains a
34+
type or mimetype. Type corresponds to a .NET class that support
35+
text/value conversion through the TypeConverter architecture.
36+
Classes that don't support this are serialized and stored with the
37+
mimetype set.
38+
39+
The mimetype is used for serialized objects, and tells the
40+
ResXResourceReader how to depersist the object. This is currently not
41+
extensible. For a given mimetype the value must be set accordingly:
42+
43+
Note - application/x-microsoft.net.object.binary.base64 is the format
44+
that the ResXResourceWriter will generate, however the reader can
45+
read any of the formats listed below.
46+
47+
mimetype: application/x-microsoft.net.object.binary.base64
48+
value : The object must be serialized with
49+
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50+
: and then encoded with base64 encoding.
51+
52+
mimetype: application/x-microsoft.net.object.soap.base64
53+
value : The object must be serialized with
54+
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55+
: and then encoded with base64 encoding.
56+
57+
mimetype: application/x-microsoft.net.object.bytearray.base64
58+
value : The object must be serialized into a byte array
59+
: using a System.ComponentModel.TypeConverter
60+
: and then encoded with base64 encoding.
61+
-->
362
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
463
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
564
<xsd:element name="root" msdata:IsDataSet="true">
@@ -145,4 +204,22 @@
145204
<data name="IncidentCreationSuccessTemplate" xml:space="preserve">
146205
<value>Обращение {0} было создано успешно</value>
147206
</data>
207+
<data name="ChoosePriorityText" xml:space="preserve">
208+
<value>Выберите приоретет</value>
209+
</data>
210+
<data name="AttachmentsFieldName" xml:space="preserve">
211+
<value>Вложения</value>
212+
</data>
213+
<data name="IncidentCreationAnnotationFailureInvalidFileSizeTemplate" xml:space="preserve">
214+
<value>Не удалось создать следующие вложения из-за слишком большого размера файлов: {0}</value>
215+
</data>
216+
<data name="IncidentCreationAnnotationFailureTemplate" xml:space="preserve">
217+
<value>При создании некоторых вложений произошли ошибки. Пожалуйста, перейдите по ссылке и добавьте их вручную: {0}</value>
218+
</data>
219+
<data name="GptErrorMessage" xml:space="preserve">
220+
<value>Произошла непредвиденная ошибка при генерации. Заполните заголовок самостоятельно</value>
221+
</data>
222+
<data name="GptTempMessage" xml:space="preserve">
223+
<value>Генерируется заголовок... Это может занять некоторое время</value>
224+
</data>
148225
</root>

0 commit comments

Comments
 (0)