diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientEventExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientEventExtensions.cs index cafbc749..ab4a749c 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientEventExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientEventExtensions.cs @@ -43,7 +43,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api throw new Exceptions.WechatApiEventSerializationException("Decrypt event failed, because there is no encoding AES key."); InnerEncryptedEvent encryptedEvent = client.JsonSerializer.Deserialize(callbackJson); - callbackJson = Utilities.WechatEventDataCryptor.AESDecrypt(cipherText: encryptedEvent.EncryptedData, encodingAESKey: client.Credentials.PushEncodingAESKey!, out _); + callbackJson = Utilities.WxMsgCryptor.AESDecrypt(cipherText: encryptedEvent.EncryptedData, encodingAESKey: client.Credentials.PushEncodingAESKey!, out _); } return client.JsonSerializer.Deserialize(callbackJson); @@ -68,10 +68,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Api { if (callbackXml.Contains("") && callbackXml.Contains("")) { - if (!Utilities.WechatEventDataCryptor.TryParseXml(callbackXml, out string encryptedXml)) + if (!Utilities.WxMsgCryptor.TryParseXml(callbackXml, out string encryptedXml)) throw new Exceptions.WechatApiEventSerializationException("Decrypt event failed, because of empty encrypted data."); - callbackXml = Utilities.WechatEventDataCryptor.AESDecrypt(cipherText: encryptedXml, encodingAESKey: client.Credentials.PushEncodingAESKey!, out _); + callbackXml = Utilities.WxMsgCryptor.AESDecrypt(cipherText: encryptedXml, encodingAESKey: client.Credentials.PushEncodingAESKey!, out _); } return Utilities.XmlUtility.Deserialize(callbackXml); @@ -167,12 +167,12 @@ namespace SKIT.FlurlHttpClient.Wechat.Api { string timestamp = DateTimeOffset.Now.ToLocalTime().ToUnixTimeSeconds().ToString(); string nonce = DateTimeOffset.Now.Ticks.ToString("x"); - string cipher = Utilities.WechatEventDataCryptor.AESEncrypt( + string cipher = Utilities.WxMsgCryptor.AESEncrypt( plainText: json, encodingAESKey: client.Credentials.PushEncodingAESKey!, appId: client.Credentials.AppId ); - string sign = Utilities.WechatEventDataCryptor.GenerateSignature( + string sign = Utilities.WxMsgCryptor.GenerateSignature( sToken: client.Credentials.PushToken!, sTimestamp: timestamp, sNonce: nonce, @@ -227,13 +227,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api try { - string cipher = Utilities.WechatEventDataCryptor.AESEncrypt( + string cipher = Utilities.WxMsgCryptor.AESEncrypt( plainText: xml, encodingAESKey: client.Credentials.PushEncodingAESKey!, appId: client.Credentials.AppId ); - xml = Utilities.WechatEventDataCryptor.WrapXml(sToken: client.Credentials.PushToken!, sMsgEncrypt: cipher); + xml = Utilities.WxMsgCryptor.WrapXml(sToken: client.Credentials.PushToken!, sMsgEncrypt: cipher); } catch (Exception ex) { @@ -283,7 +283,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api try { var encryptedEvent = client.JsonSerializer.Deserialize(callbackJson); - return Utilities.WechatEventDataCryptor.VerifySignature( + return Utilities.WxMsgCryptor.VerifySignature( sToken: client.Credentials.PushToken!, sTimestamp: callbackTimestamp, sNonce: callbackNonce, @@ -317,7 +317,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api XDocument xDoc = XDocument.Parse(callbackXml); string? msgEncrypt = xDoc.Root?.Element("Encrypt")?.Value; - return Utilities.WechatEventDataCryptor.VerifySignature( + return Utilities.WxMsgCryptor.VerifySignature( sToken: client.Credentials.PushToken!, sTimestamp: callbackTimestamp, sNonce: callbackNonce, diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Utilities/Internal/WechatEventDataCryptor.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Utilities/Internal/WxMsgCryptor.cs similarity index 99% rename from src/SKIT.FlurlHttpClient.Wechat.Api/Utilities/Internal/WechatEventDataCryptor.cs rename to src/SKIT.FlurlHttpClient.Wechat.Api/Utilities/Internal/WxMsgCryptor.cs index dd249cfc..d964d76e 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Utilities/Internal/WechatEventDataCryptor.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Utilities/Internal/WxMsgCryptor.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -10,7 +10,7 @@ using System.Xml; namespace SKIT.FlurlHttpClient.Wechat.Api.Utilities { - internal static class WechatEventDataCryptor + internal static class WxMsgCryptor { private const int AES_KEY_SIZE = 256; private const int AES_BLOCK_SIZE = 128; diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Events/Platform/ThirdKf/UserEnterEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Events/ThirdKf/UserEnterEvent.cs similarity index 90% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Events/Platform/ThirdKf/UserEnterEvent.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Events/ThirdKf/UserEnterEvent.cs index c852af55..5061bafc 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Events/Platform/ThirdKf/UserEnterEvent.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Events/ThirdKf/UserEnterEvent.cs @@ -1,10 +1,10 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Events.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Events { /// /// 表示 userEnter 事件的数据。 /// REF: https://developers.weixin.qq.com/doc/aispeech/platform/thirdkefu/recivemsg.html /// - public class UserEnterEvent : WechatOpenAIPlatformEvent, WechatOpenAIPlatformEvent.Serialization.IXmlSerializable + public class UserEnterEvent : WechatOpenAIEvent, WechatOpenAIEvent.Serialization.IXmlSerializable { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Events/Platform/ThirdKf/UserQuitEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Events/ThirdKf/UserQuitEvent.cs similarity index 80% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Events/Platform/ThirdKf/UserQuitEvent.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Events/ThirdKf/UserQuitEvent.cs index 840d4c5c..f4851943 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Events/Platform/ThirdKf/UserQuitEvent.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Events/ThirdKf/UserQuitEvent.cs @@ -1,4 +1,4 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Events.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Events { /// /// 表示 userQuit 事件的数据。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteApiExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteApiExtensions.cs deleted file mode 100644 index f389174e..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteApiExtensions.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - public static class WechatOpenAIThirdPartyClientExecuteApiExtensions - { - /// - /// 异步调用 [POST] /v2/api/get_welcome_msg 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/get_welcomemsg.html - /// - /// - /// - /// - /// - public static async Task ExecuteApiGetWelcomeMessageAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.ApiGetWelcomeMessageRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "api", "get_welcome_msg"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/api/set_welcome_msg 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/set_welcomemsg.html - /// - /// - /// - /// - /// - public static async Task ExecuteApiSetWelcomeMessageAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.ApiSetWelcomeMessageRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "api", "set_welcome_msg"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteAsyncExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteAsyncExtensions.cs deleted file mode 100644 index 2a58b7d7..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteAsyncExtensions.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - public static class WechatOpenAIThirdPartyClientExecuteAsyncExtensions - { - /// - /// 异步调用 [GET] /v1/async/fetch 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v1/task_fetch.html - /// - /// - /// - /// - /// - public static async Task ExecuteAsyncFetchAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.AsyncFetchRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Get, "v1", "async", "fetch") - .SetQueryParam("task_id", request.TaskId); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteBotExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteBotExtensions.cs deleted file mode 100644 index b96d228f..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteBotExtensions.cs +++ /dev/null @@ -1,220 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - public static class WechatOpenAIThirdPartyClientExecuteBotExtensions - { - /// - /// 异步调用 [POST] /v2/bot/save 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/save.html - /// - /// - /// - /// - /// - public static async Task ExecuteBotSaveAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.BotSaveRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "bot", "save"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v2/bot/get_detail 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/get_detail.html - /// - /// - /// - /// - /// - public static async Task ExecuteBotGetDetailAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.BotGetDetailRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Get, "v2", "bot", "get_detail"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/bot/delete 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/save.html - /// - /// - /// - /// - /// - public static async Task ExecuteBotDeleteAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.BotDeleteRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "bot", "delete"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/bot/get_list 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/get_list.html - /// - /// - /// - /// - /// - public static async Task ExecuteBotGetListAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.BotGetListRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "bot", "get_list"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/bot/import 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/import.html - /// - /// - /// - /// - /// - public static async Task ExecuteBotImportAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.BotImportRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v1", "bot", "import"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/bot/export 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/export.html - /// - /// - /// - /// - /// - public static async Task ExecuteBotExportAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.BotExportRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Get, "v1", "bot", "export"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/bot/publish 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/publish.html - /// - /// - /// - /// - /// - public static async Task ExecuteBotPublishAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.BotPublishRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "bot", "publish"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/bot/publish/get_record 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/get_publish_record.html - /// - /// - /// - /// - /// - public static async Task ExecuteBotPublishGetRecordAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.BotPublishGetRecordRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "bot", "publish", "get_record"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/bot/import/json 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/json_import.html - /// - /// - /// - /// - /// - public static async Task ExecuteBotImportJsonAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.BotImportJsonRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v1", "bot", "import", "json"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/bot/test 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/test.html - /// - /// - /// - /// - /// - public static async Task ExecuteBotTestAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.BotTestRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Get, "v1", "bot", "test"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/bot/effective_progress 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/effective_progress.html - /// - /// - /// - /// - /// - public static async Task ExecuteBotEffectiveProgressAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.BotEffectiveProgressRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "bot", "effective_progress"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteDictionaryExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteDictionaryExtensions.cs deleted file mode 100644 index 0f19a55c..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteDictionaryExtensions.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - public static class WechatOpenAIThirdPartyClientExecuteDictionaryExtensions - { - /// - /// 异步调用 [POST] /v2/dict/save 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/dict/save.html - /// - /// - /// - /// - /// - public static async Task ExecuteDictionarySaveAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.DictionarySaveRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "dict", "save"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/dict/get_list 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/dict/get_list.html - /// - /// - /// - /// - /// - public static async Task ExecuteDictionaryGetListAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.DictionaryGetListRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "dict", "get_list"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v2/dict/get_builtin_list 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/dict/get_builtin_list.html - /// - /// - /// - /// - /// - public static async Task ExecuteDictionaryGetBuiltinListAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.DictionaryGetBuiltinListRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Get, "v2", "dict", "get_builtin_list"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/dict/get_all_list 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/dict/get_all_list.html - /// - /// - /// - /// - /// - public static async Task ExecuteDictionaryGetAllListAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.DictionaryGetAllListRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "dict", "get_all_list"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/dict/delete 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/dict/delete.html - /// - /// - /// - /// - /// - public static async Task ExecuteDictionaryDeleteAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.DictionaryDeleteRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "dict", "delete"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteFileExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteFileExtensions.cs deleted file mode 100644 index c095b047..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteFileExtensions.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Threading; -using System.Threading.Tasks; -using System.Web; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - public static class WechatOpenAIThirdPartyClientExecuteFileExtensions - { - /// - /// 异步调用 [POST] /v1/file/upload 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v1/file_upload.html - /// - /// - /// - /// - /// - public static async Task ExecuteFileUploadAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.FileUploadRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.FileName == null) - request.FileName = Guid.NewGuid().ToString("N").ToLower() + ".csv"; - - if (request.FileContentType == null) - request.FileContentType = "text/csv"; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v1", "file", "upload"); - - using var fileContent = new ByteArrayContent(request.FileBytes ?? Array.Empty()); - using var httpContent = new MultipartFormDataContent(); - httpContent.Add(fileContent, "\"file\"", $"\"{HttpUtility.UrlEncode(request.FileName)}\""); - fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse(request.FileContentType); - fileContent.Headers.ContentLength = request.FileBytes?.Length; - - return await client.SendRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteIntentExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteIntentExtensions.cs deleted file mode 100644 index c3c68d3e..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteIntentExtensions.cs +++ /dev/null @@ -1,206 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - public static class WechatOpenAIThirdPartyClientExecuteIntentExtensions - { - /// - /// 异步调用 [POST] /v2/intent/save 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/intent/batch_save.html - /// - /// - /// - /// - /// - public static async Task ExecuteIntentSaveAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.IntentSaveRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "intent", "save"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/intent/search 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/intent/search .html - /// - /// - /// - /// - /// - public static async Task ExecuteIntentSearchAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.IntentSearchRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "intent", "search"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/intent/get_detail 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/intent/get_detail .html - /// - /// - /// - /// - /// - public static async Task ExecuteIntentGetDetailAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.IntentGetDetailRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "intent", "get_detail"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/intent/name_exist 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/intent/name_exist .html - /// - /// - /// - /// - /// - public static async Task ExecuteIntentNameExistAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.IntentNameExistRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "intent", "name_exist"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/intent/delete 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/intent/batch_delete.html - /// - /// - /// - /// - /// - public static async Task ExecuteIntentDeleteAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.IntentDeleteRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "intent", "delete"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/intent/switch/batch 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/intent/batch_delete.html - /// - /// - /// - /// - /// - public static async Task ExecuteIntentSwitchBatchAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.IntentSwitchBatchRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v1", "intent", "switch", "batch"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - #region Config - /// - /// 异步调用 [POST] /v2/intent/config/save 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/intent/save_config.html - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/intent/save_config_normal_answer_config.html - /// - /// - /// - /// - /// - public static async Task ExecuteIntentConfigSaveAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.IntentConfigSaveRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "intent", "config", "save"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/intent/config/get 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/intent/get_config.html - /// - /// - /// - /// - /// - public static async Task ExecuteIntentConfigGetAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.IntentConfigGetRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "intent", "config", "get"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region Question - /// - /// 异步调用 [POST] /v2/intent/question/save 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/intent/batch_save_question.html - /// - /// - /// - /// - /// - public static async Task ExecuteIntentQuestionSaveAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.IntentQuestionSaveRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "intent", "question", "save"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/intent/question/delete 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/intent/batch_delete_question.html - /// - /// - /// - /// - /// - public static async Task ExecuteIntentQuestionDeleteAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.IntentQuestionDeleteRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "intent", "question", "delete"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteOpenApiExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteOpenApiExtensions.cs deleted file mode 100644 index 122d75ea..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteOpenApiExtensions.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - public static class WechatOpenAIThirdPartyClientExecuteOpenApiExtensions - { - /// - /// 异步调用 [POST] /v1/openapi/create 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v1/openapi/create.html - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiCreateAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.OpenApiCreateRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v1", "openapi", "create"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/openapi/reset 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v1/openapi/reset.html - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiResetAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.OpenApiResetRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v1", "openapi", "reset"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/openapi/get_detail 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v1/openapi/get_detail.html - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiGetDetailAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.OpenApiGetDetailRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Get, "v1", "openapi", "get_detail"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteSkillExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteSkillExtensions.cs deleted file mode 100644 index 0200d9dc..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteSkillExtensions.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - public static class WechatOpenAIThirdPartyClientExecuteSkillExtensions - { - /// - /// 异步调用 [POST] /v2/skill/save 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/skill/save.html - /// - /// - /// - /// - /// - public static async Task ExecuteSkillSaveAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.SkillSaveRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "skill", "save"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/skill/get_list 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/skill/get_list.html - /// - /// - /// - /// - /// - public static async Task ExecuteSkillGetListAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.SkillGetListRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "skill", "get_list"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/skill/get_detail 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/skill/get_detail.html - /// - /// - /// - /// - /// - public static async Task ExecuteSkillGetDetailAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.SkillGetDetailRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "skill", "get_detail"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/skill/delete 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/skill/delete.html - /// - /// - /// - /// - /// - public static async Task ExecuteSkillDeleteAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.SkillDeleteRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "skill", "delete"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteSkillStoreExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteSkillStoreExtensions.cs deleted file mode 100644 index 007b5107..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteSkillStoreExtensions.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - public static class WechatOpenAIThirdPartyClientExecuteSkillStoreExtensions - { - /// - /// 异步调用 [POST] /v2/skill_store/get_list 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/skill_store/get_store_skill_list.html - /// - /// - /// - /// - /// - public static async Task ExecuteSkillStoreGetListAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.SkillStoreGetListRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "skill_store", "get_list"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/skill_store/bot_acquire_state/update 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/skill_store/update_bot_acquire_state.html - /// - /// - /// - /// - /// - public static async Task ExecuteSkillStoreBotAcquireStateUpdateAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.SkillStoreBotAcquireStateUpdateRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "skill_store", "bot_acquire_state", "update"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/skill_store/bot_switch_state/update 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/skill_store/batch_update_state.html - /// - /// - /// - /// - /// - public static async Task ExecuteSkillStoreBotSwitchStateUpdateAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.SkillStoreBotSwitchStateUpdateRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "skill_store", "bot_switch_state", "update"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/skill_store/builtin_skill_switch/update 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/skill_store/update_builtin_skill_switch.html - /// - /// - /// - /// - /// - public static async Task ExecuteSkillStoreBuiltinSkillSwitchUpdateAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.SkillStoreBuiltinSkillSwitchUpdateRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "skill_store", "builtin_skill_switch", "update"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteSlotExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteSlotExtensions.cs deleted file mode 100644 index 18a1f9f0..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteSlotExtensions.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - public static class WechatOpenAIThirdPartyClientExecuteSlotExtensions - { - /// - /// 异步调用 [POST] /v2/slot/save 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/slot/save.html - /// - /// - /// - /// - /// - public static async Task ExecuteSlotSaveAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.SlotSaveRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "slot", "save"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/slot/get_list 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/slot/get_list.html - /// - /// - /// - /// - /// - public static async Task ExecuteSlotGetListAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.SlotGetListRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "slot", "get_list"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/slot/delete 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/slot/delete.html - /// - /// - /// - /// - /// - public static async Task ExecuteSlotDeleteAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.SlotDeleteRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "slot", "delete"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteStatisticsExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteStatisticsExtensions.cs deleted file mode 100644 index d2dbde90..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteStatisticsExtensions.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - public static class WechatOpenAIThirdPartyClientExecuteStatisticsExtensions - { - /// - /// 异步调用 [POST] /v2/dialog_user_specified_date 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/statistic/dialog_user_specified_date.html - /// - /// - /// - /// - /// - public static async Task ExecuteDialogUserSpecifiedDateAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.DialogUserSpecifiedDateRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "dialog_user_specified_date"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/user_query_yesterday_data 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/statistic/user_query_yesterday_data.html - /// - /// - /// - /// - /// - public static async Task ExecuteUserQueryYesterdayDataAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.UserQueryYesterdayDataRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "user_query_yesterday_data"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteTokenExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteTokenExtensions.cs deleted file mode 100644 index f3905e36..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteTokenExtensions.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - public static class WechatOpenAIThirdPartyClientExecuteTokenExtensions - { - /// - /// 异步调用 [POST] /v1/token 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v1/get_token.html - /// - /// - /// - /// - /// - public static async Task ExecuteTokenAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.TokenRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v1", "token") - .WithHeader("Client-Id", client.Credentials.ClientId) - .WithHeader("Client-Key", client.Credentials.ClientKey); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteUnmatchedClassExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteUnmatchedClassExtensions.cs deleted file mode 100644 index c9d9a5aa..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteUnmatchedClassExtensions.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - public static class WechatOpenAIThirdPartyClientExecuteUnmatchedClassExtensions - { - /// - /// 异步调用 [POST] /v1/unmatched/class/list 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/unmatched_class_list.html - /// - /// - /// - /// - /// - public static async Task ExecuteUnmatchedClassListAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.UnmatchedClassListRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v1", "unmatched", "class", "list"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/unmatched/class/detail 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/unmatched_class_detail.html - /// - /// - /// - /// - /// - public static async Task ExecuteUnmatchedClassDetailAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.UnmatchedClassDetailRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v1", "unmatched", "class", "detail"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteUserExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteUserExtensions.cs deleted file mode 100644 index 19c1e5b3..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteUserExtensions.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - public static class WechatOpenAIThirdPartyClientExecuteUserExtensions - { - /// - /// 异步调用 [POST] /v1/user/register 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v1/user_register.html - /// - /// - /// - /// - /// - public static async Task ExecuteUserRegisterAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.UserRegisterRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v1", "user", "register") - .WithHeader("Client-Id", client.Credentials.ClientId) - .WithHeader("Client-Key", client.Credentials.ClientKey); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteWordExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteWordExtensions.cs deleted file mode 100644 index 6253cd1d..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/ThirdParty/WechatOpenAIThirdPartyClientExecuteWordExtensions.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - public static class WechatOpenAIThirdPartyClientExecuteWordExtensions - { - /// - /// 异步调用 [POST] /v2/word/update/batch 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v1/word/batch_update.html - /// - /// - /// - /// - /// - public static async Task ExecuteWordUpdateBatchAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.WordUpdateBatchRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "word", "update", "batch"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/word/delete/batch 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v1/word/batch_delete.html - /// - /// - /// - /// - /// - public static async Task ExecuteWordDeleteBatchAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.WordDeleteBatchRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "word", "delete", "batch"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/word/import 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/word/import.html - /// - /// - /// - /// - /// - public static async Task ExecuteWordImportAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.WordImportRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "word", "import"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/word/import/json 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/word/json_import.html - /// - /// - /// - /// - /// - public static async Task ExecuteWordImportJsonAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.WordImportJsonRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "word", "import", "json"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/word/export 接口。 - /// REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/word/export.html - /// - /// - /// - /// - /// - public static async Task ExecuteWordExportAsync(this WechatOpenAIThirdPartyClient client, Models.ThirdParty.WordExportRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v2", "word", "export"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientEventExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientEventExtensions.cs similarity index 68% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientEventExtensions.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientEventExtensions.cs index d7fceb71..fb9bec73 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientEventExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientEventExtensions.cs @@ -3,22 +3,22 @@ using System; namespace SKIT.FlurlHttpClient.Wechat.OpenAI { /// - /// 为 提供回调通知事件的扩展方法。 + /// 为 提供回调通知事件的扩展方法。 /// - public static class WechatOpenAIPlatformClientEventExtensions + public static class WechatOpenAIClientEventExtensions { - private static TEvent InnerDeserializeEventFromXml(this WechatOpenAIPlatformClient client, string callbackXml) - where TEvent : WechatOpenAIPlatformEvent + private static TEvent InnerDeserializeEventFromXml(this WechatOpenAIClient client, string callbackXml) + where TEvent : WechatOpenAIEvent { if (client == null) throw new ArgumentNullException(nameof(client)); if (string.IsNullOrEmpty(callbackXml)) throw new ArgumentNullException(callbackXml); try { - if (!Utilities.WechatEventDataCryptor.TryParseXml(callbackXml, out string? encryptedXml)) + if (!Utilities.WxMsgCryptor.TryParseXml(callbackXml, out string? encryptedXml)) throw new Exceptions.WechatOpenAIEventSerializationException("Encrypt event failed, because of empty encrypted data."); - callbackXml = Utilities.WechatEventDataCryptor.AESDecrypt(cipherText: encryptedXml!, encodingAESKey: client.Credentials.EncodingAESKey!, out _); + callbackXml = Utilities.WxMsgCryptor.AESDecrypt(cipherText: encryptedXml!, encodingAESKey: client.Credentials.EncodingAESKey!, out _); return Utilities.XmlUtility.Deserialize(callbackXml); } catch (WechatOpenAIException) @@ -32,38 +32,38 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI } /// - /// 从 XML 反序列化得到 对象。 + /// 从 XML 反序列化得到 对象。 /// /// /// /// /// - public static TEvent DeserializeEventFromXml(this WechatOpenAIPlatformClient client, string callbackXml) - where TEvent : WechatOpenAIPlatformEvent, WechatOpenAIPlatformEvent.Serialization.IXmlSerializable, new() + public static TEvent DeserializeEventFromXml(this WechatOpenAIClient client, string callbackXml) + where TEvent : WechatOpenAIEvent, WechatOpenAIEvent.Serialization.IXmlSerializable, new() { return InnerDeserializeEventFromXml(client, callbackXml); } /// - /// 从 XML 反序列化得到 对象。 + /// 从 XML 反序列化得到 对象。 /// /// /// /// - public static WechatOpenAIPlatformEvent DeserializeEventFromXml(this WechatOpenAIPlatformClient client, string callbackXml) + public static WechatOpenAIEvent DeserializeEventFromXml(this WechatOpenAIClient client, string callbackXml) { - return InnerDeserializeEventFromXml(client, callbackXml); + return InnerDeserializeEventFromXml(client, callbackXml); } /// - /// 将 对象序列化成 XML。 + /// 将 对象序列化成 XML。 /// /// /// /// /// - public static string SerializeEventToXml(this WechatOpenAIPlatformClient client, TEvent callbackModel) - where TEvent : WechatOpenAIPlatformEvent, WechatOpenAIPlatformEvent.Serialization.IXmlSerializable, new() + public static string SerializeEventToXml(this WechatOpenAIClient client, TEvent callbackModel) + where TEvent : WechatOpenAIEvent, WechatOpenAIEvent.Serialization.IXmlSerializable, new() { string xml; @@ -83,13 +83,13 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI try { - string cipher = Utilities.WechatEventDataCryptor.AESEncrypt( + string cipher = Utilities.WxMsgCryptor.AESEncrypt( plainText: xml, encodingAESKey: client.Credentials.EncodingAESKey!, appId: client.Credentials.AppId! ); - xml = Utilities.WechatEventDataCryptor.WrapXml(sToken: client.Credentials.Token!, sMsgEncrypt: cipher); + xml = Utilities.WxMsgCryptor.WrapXml(sToken: client.Credentials.Token!, sMsgEncrypt: cipher); } catch (Exception ex) { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientExecuteBotExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientExecuteBotExtensions.cs similarity index 71% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientExecuteBotExtensions.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientExecuteBotExtensions.cs index 3ecca228..5f321488 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientExecuteBotExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientExecuteBotExtensions.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Net.Http; using System.Threading; using System.Threading.Tasks; @@ -6,7 +6,7 @@ using Flurl.Http; namespace SKIT.FlurlHttpClient.Wechat.OpenAI { - public static class WechatOpenAIPlatformClientExecuteBotExtensions + public static class WechatOpenAIClientExecuteBotExtensions { /// /// 异步调用 [POST] /batchimportskill/{TOKEN} 接口。 @@ -16,7 +16,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteBatchImportSkillAsync(this WechatOpenAIPlatformClient client, Models.Platform.BatchImportSkillRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteBatchImportSkillAsync(this WechatOpenAIClient client, Models.BatchImportSkillRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -24,7 +24,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "batchimportskill", client.Credentials.Token!); - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -35,7 +35,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecutePublishAsync(this WechatOpenAIPlatformClient client, Models.Platform.PublishRequest request, CancellationToken cancellationToken = default) + public static async Task ExecutePublishAsync(this WechatOpenAIClient client, Models.PublishRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -43,7 +43,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "publish", client.Credentials.Token!); - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -54,7 +54,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecutePublishProgressAsync(this WechatOpenAIPlatformClient client, Models.Platform.PublishProgressRequest request, CancellationToken cancellationToken = default) + public static async Task ExecutePublishProgressAsync(this WechatOpenAIClient client, Models.PublishProgressRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -62,7 +62,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "publish_progress", client.Credentials.Token!); - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -74,7 +74,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteSetAutoReplyAsync(this WechatOpenAIPlatformClient client, Models.Platform.SetAutoReplyRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteSetAutoReplyAsync(this WechatOpenAIClient client, Models.SetAutoReplyRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -82,7 +82,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "setautoreply", client.Credentials.Token!); - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -93,7 +93,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteLabelBatchSetAsync(this WechatOpenAIPlatformClient client, Models.Platform.LabelBatchSetRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteLabelBatchSetAsync(this WechatOpenAIClient client, Models.LabelBatchSetRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -101,7 +101,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "label", "batchset", client.Credentials.Token!); - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientExecuteDialogExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientExecuteDialogExtensions.cs similarity index 72% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientExecuteDialogExtensions.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientExecuteDialogExtensions.cs index 28240eb7..32767b54 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientExecuteDialogExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientExecuteDialogExtensions.cs @@ -6,7 +6,7 @@ using Flurl.Http; namespace SKIT.FlurlHttpClient.Wechat.OpenAI { - public static class WechatOpenAIPlatformClientExecuteDialogExtensions + public static class WechatOpenAIClientExecuteDialogExtensions { /// /// 异步调用 [POST] /sign/{TOKEN} 接口。 @@ -16,7 +16,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteSignAsync(this WechatOpenAIPlatformClient client, Models.Platform.SignRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteSignAsync(this WechatOpenAIClient client, Models.SignRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -24,7 +24,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "sign", client.Credentials.Token!); - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -35,7 +35,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteAIBotAsync(this WechatOpenAIPlatformClient client, Models.Platform.AIBotRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteAIBotAsync(this WechatOpenAIClient client, Models.AIBotRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -43,7 +43,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "aibot", client.Credentials.Token!); - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -54,7 +54,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteGetHotQueryListAsync(this WechatOpenAIPlatformClient client, Models.Platform.GetHotQueryListRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteGetHotQueryListAsync(this WechatOpenAIClient client, Models.GetHotQueryListRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -62,7 +62,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "gethotquerylist", client.Credentials.Token!); - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientExecuteLivingExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientExecuteLivingExtensions.cs similarity index 71% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientExecuteLivingExtensions.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientExecuteLivingExtensions.cs index 4c62317f..c3039e15 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientExecuteLivingExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientExecuteLivingExtensions.cs @@ -6,7 +6,7 @@ using Flurl.Http; namespace SKIT.FlurlHttpClient.Wechat.OpenAI { - public static class WechatOpenAIPlatformClientExecuteLivingExtensions + public static class WechatOpenAIClientExecuteLivingExtensions { /// /// 异步调用 [POST] /batchreply/{TOKEN} 接口。 @@ -16,7 +16,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteBatchReplyAsync(this WechatOpenAIPlatformClient client, Models.Platform.BatchReplyRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteBatchReplyAsync(this WechatOpenAIClient client, Models.BatchReplyRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -24,7 +24,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "batchreply", client.Credentials.Token!); - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -35,7 +35,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteGenerateReportAsync(this WechatOpenAIPlatformClient client, Models.Platform.GenerateReportRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteGenerateReportAsync(this WechatOpenAIClient client, Models.GenerateReportRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -43,7 +43,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "generatereport", client.Credentials.Token!); - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientExecuteMpExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientExecuteMpExtensions.cs similarity index 74% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientExecuteMpExtensions.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientExecuteMpExtensions.cs index 6e1377e1..5d7c6ca6 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientExecuteMpExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientExecuteMpExtensions.cs @@ -9,7 +9,7 @@ using Flurl.Http; namespace SKIT.FlurlHttpClient.Wechat.OpenAI { - public static class WechatOpenAIPlatformClientExecuteMpExtensions + public static class WechatOpenAIClientExecuteMpExtensions { /// /// 异步调用 [POST] /getbindlink/{TOKEN} 接口。 @@ -19,7 +19,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteGetBindLinkAsync(this WechatOpenAIPlatformClient client, Models.Platform.GetBindLinkRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteGetBindLinkAsync(this WechatOpenAIClient client, Models.GetBindLinkRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -27,7 +27,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "getbindlink", client.Credentials.Token!); - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -38,7 +38,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteGetBindListAsync(this WechatOpenAIPlatformClient client, Models.Platform.GetBindListRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteGetBindListAsync(this WechatOpenAIClient client, Models.GetBindListRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -46,7 +46,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "getbindlist", client.Credentials.Token!); - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -57,7 +57,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteUnbindMpAsync(this WechatOpenAIPlatformClient client, Models.Platform.UnbindMpRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteUnbindMpAsync(this WechatOpenAIClient client, Models.UnbindMpRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -65,7 +65,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "unbindmp", client.Credentials.Token!); - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -76,7 +76,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteGetH5LinkAsync(this WechatOpenAIPlatformClient client, Models.Platform.GetH5LinkRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteGetH5LinkAsync(this WechatOpenAIClient client, Models.GetH5LinkRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -84,7 +84,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "geth5link", client.Credentials.Token!); - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } @@ -96,7 +96,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteAssetsUploadAsync(this WechatOpenAIPlatformClient client, Models.Platform.AssetsUploadRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteAssetsUploadAsync(this WechatOpenAIClient client, Models.AssetsUploadRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -112,7 +112,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI using var fileContent = new ByteArrayContent(request.FileBytes ?? Array.Empty()); using var paramContent = new StringContent( - Utilities.WechatEventDataCryptor.AESEncrypt( + Utilities.WxMsgCryptor.AESEncrypt( plainText: Utilities.XmlUtility.Serialize(request), encodingAESKey: client.Credentials.EncodingAESKey!, appId: client.Credentials.AppId! @@ -125,7 +125,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse(request.FileContentType); fileContent.Headers.ContentLength = request.FileBytes?.Length; - return await client.SendRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken); + return await client.SendRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken); } } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientExecuteNLPExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientExecuteNLPExtensions.cs similarity index 70% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientExecuteNLPExtensions.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientExecuteNLPExtensions.cs index 0a8d3f97..3b9a38ce 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientExecuteNLPExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientExecuteNLPExtensions.cs @@ -6,7 +6,7 @@ using Flurl.Http; namespace SKIT.FlurlHttpClient.Wechat.OpenAI { - public static class WechatOpenAIPlatformClientExecuteNLPExtensions + public static class WechatOpenAIClientExecuteNLPExtensions { /// /// 异步调用 [POST] /nlp/tokenize/{TOKEN} 接口。 @@ -16,7 +16,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteNLPTokenizeAsync(this WechatOpenAIPlatformClient client, Models.Platform.NLPTokenizeRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteNLPTokenizeAsync(this WechatOpenAIClient client, Models.NLPTokenizeRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -24,7 +24,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "nlp", "tokenize", client.Credentials.Token!); - return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -35,7 +35,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteNLPNERAsync(this WechatOpenAIPlatformClient client, Models.Platform.NLPNERRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteNLPNERAsync(this WechatOpenAIClient client, Models.NLPNERRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -43,7 +43,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "nlp", "ner", client.Credentials.Token!); - return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -54,7 +54,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteNLPSentimentAsync(this WechatOpenAIPlatformClient client, Models.Platform.NLPSentimentRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteNLPSentimentAsync(this WechatOpenAIClient client, Models.NLPSentimentRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -62,7 +62,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "nlp", "sentiment", client.Credentials.Token!); - return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -73,7 +73,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteNLPNERProductAsync(this WechatOpenAIPlatformClient client, Models.Platform.NLPNERProductRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteNLPNERProductAsync(this WechatOpenAIClient client, Models.NLPNERProductRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -81,7 +81,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "nlp", "ner-product", client.Credentials.Token!); - return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -92,7 +92,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteNLPSensitiveAsync(this WechatOpenAIPlatformClient client, Models.Platform.NLPSensitiveRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteNLPSensitiveAsync(this WechatOpenAIClient client, Models.NLPSensitiveRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -100,7 +100,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "nlp", "sensitive", client.Credentials.Token!); - return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -111,7 +111,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteNLPRankAsync(this WechatOpenAIPlatformClient client, Models.Platform.NLPRankRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteNLPRankAsync(this WechatOpenAIClient client, Models.NLPRankRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -119,7 +119,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "nlp", "rank", client.Credentials.Token!); - return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -130,7 +130,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteNLPTranslateEnglish2ChineseAsync(this WechatOpenAIPlatformClient client, Models.Platform.NLPTranslateEnglish2ChineseRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteNLPTranslateEnglish2ChineseAsync(this WechatOpenAIClient client, Models.NLPTranslateEnglish2ChineseRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -138,7 +138,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "nlp", "translate_en2cn", client.Credentials.Token!); - return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -149,7 +149,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteNLPTranslateChinese2EnglishAsync(this WechatOpenAIPlatformClient client, Models.Platform.NLPTranslateChinese2EnglishRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteNLPTranslateChinese2EnglishAsync(this WechatOpenAIClient client, Models.NLPTranslateChinese2EnglishRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -157,7 +157,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "nlp", "translate_cn2en", client.Credentials.Token!); - return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -168,7 +168,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteNLPGetSimilarQueryAsync(this WechatOpenAIPlatformClient client, Models.Platform.NLPGetSimilarQueryRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteNLPGetSimilarQueryAsync(this WechatOpenAIClient client, Models.NLPGetSimilarQueryRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -176,7 +176,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "nlp", "get_similar_query", client.Credentials.Token!); - return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -187,7 +187,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteNLPNewsAbstractionAsync(this WechatOpenAIPlatformClient client, Models.Platform.NLPNewsAbstractionRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteNLPNewsAbstractionAsync(this WechatOpenAIClient client, Models.NLPNewsAbstractionRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -195,7 +195,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "nlp", "news-abstraction", client.Credentials.Token!); - return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -206,7 +206,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteNLPDocumentClassifyAsync(this WechatOpenAIPlatformClient client, Models.Platform.NLPDocumentClassifyRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteNLPDocumentClassifyAsync(this WechatOpenAIClient client, Models.NLPDocumentClassifyRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -214,7 +214,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "nlp", "document_classify", client.Credentials.Token!); - return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -225,7 +225,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteNLPRecommendQuestionsAsync(this WechatOpenAIPlatformClient client, Models.Platform.NLPRecommendQuestionsRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteNLPRecommendQuestionsAsync(this WechatOpenAIClient client, Models.NLPRecommendQuestionsRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -233,7 +233,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "nlp", "recommend_questions", client.Credentials.Token!); - return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithUrlEncodedAsync(flurlReq, data: request, cancellationToken: cancellationToken); } } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientExecuteThirdKefuExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientExecuteThirdKefuExtensions.cs similarity index 73% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientExecuteThirdKefuExtensions.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientExecuteThirdKefuExtensions.cs index 31c6681a..8ac53561 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/Platform/WechatOpenAIPlatformClientExecuteThirdKefuExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Extensions/WechatOpenAIClientExecuteThirdKefuExtensions.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Net.Http; using System.Threading; using System.Threading.Tasks; @@ -6,7 +6,7 @@ using Flurl.Http; namespace SKIT.FlurlHttpClient.Wechat.OpenAI { - public static class WechatOpenAIPlatformClientExecuteThirdKefuExtensions + public static class WechatOpenAIClientExecuteThirdKefuExtensions { /// /// 异步调用 [POST] /sendmsg/{TOKEN} 接口。 @@ -17,7 +17,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteSendMessageAsync(this WechatOpenAIPlatformClient client, Models.Platform.SendMessageRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteSendMessageAsync(this WechatOpenAIClient client, Models.SendMessageRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -28,7 +28,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "sendmsg", client.Credentials.Token!); - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -39,7 +39,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteKefuStateGetAsync(this WechatOpenAIPlatformClient client, Models.Platform.KefuStateGetRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteKefuStateGetAsync(this WechatOpenAIClient client, Models.KefuStateGetRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -50,7 +50,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "kefustate", "get", client.Credentials.Token!); - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } /// @@ -61,7 +61,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public static async Task ExecuteKefuStateChangeAsync(this WechatOpenAIPlatformClient client, Models.Platform.KefuStateChangeRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteKefuStateChangeAsync(this WechatOpenAIClient client, Models.KefuStateChangeRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -72,7 +72,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI IFlurlRequest flurlReq = client .CreateRequest(request, HttpMethod.Post, "kefustate", "change", client.Credentials.Token!); - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/BatchImportSkillRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/BatchImportSkillRequest.cs similarity index 89% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/BatchImportSkillRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/BatchImportSkillRequest.cs index 5db960b0..4579e75c 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/BatchImportSkillRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/BatchImportSkillRequest.cs @@ -1,13 +1,13 @@ using System.Collections.Generic; using System.Xml.Serialization; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /batchimportskill/{TOKEN} 接口的请求。 /// [XmlRoot("xml")] - public class BatchImportSkillRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedXmlable + public class BatchImportSkillRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedXmlable { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/BatchImportSkillResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/BatchImportSkillResponse.cs new file mode 100644 index 00000000..53d21a2c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/BatchImportSkillResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models +{ + /// + /// 表示 [POST] /batchimportskill/{TOKEN} 接口的响应。 + /// + public class BatchImportSkillResponse : WechatOpenAIResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/LabelBatchSetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/LabelBatchSetRequest.cs similarity index 86% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/LabelBatchSetRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/LabelBatchSetRequest.cs index e97ccff7..604550e9 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/LabelBatchSetRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/LabelBatchSetRequest.cs @@ -1,13 +1,13 @@ using System.Collections.Generic; using System.Xml.Serialization; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /label/batchset/{TOKEN} 接口的请求。 /// [XmlRoot("xml")] - public class LabelBatchSetRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedXmlable + public class LabelBatchSetRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedXmlable { /// /// 获取或设置微信 AppId。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/LabelBatchSetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/LabelBatchSetResponse.cs new file mode 100644 index 00000000..1fe33295 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/LabelBatchSetResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models +{ + /// + /// 表示 [POST] /label/batchset/{TOKEN} 接口的响应。 + /// + public class LabelBatchSetResponse : WechatOpenAIResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/PublishProgressRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/PublishProgressRequest.cs similarity index 66% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/PublishProgressRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/PublishProgressRequest.cs index 680ae097..900e94f3 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/PublishProgressRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/PublishProgressRequest.cs @@ -1,12 +1,12 @@ using System.Xml.Serialization; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /publish_progress/{TOKEN} 接口的请求。 /// [XmlRoot("xml")] - public class PublishProgressRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedXmlable + public class PublishProgressRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedXmlable { /// /// 获取或设置管理员 ID。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/PublishProgressResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/PublishProgressResponse.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/PublishProgressResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/PublishProgressResponse.cs index 18a512e9..23a1db50 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/PublishProgressResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/PublishProgressResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /publish_progress/{TOKEN} 接口的响应。 /// - public class PublishProgressResponse : WechatOpenAIPlatformResponse + public class PublishProgressResponse : WechatOpenAIResponse { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/PublishRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/PublishRequest.cs similarity index 66% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/PublishRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/PublishRequest.cs index ab87063a..42b9ead9 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/PublishRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/PublishRequest.cs @@ -1,12 +1,12 @@ using System.Xml.Serialization; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /publish/{TOKEN} 接口的请求。 /// [XmlRoot("xml")] - public class PublishRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedXmlable + public class PublishRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedXmlable { /// /// 获取或设置管理员 ID。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/PublishResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/PublishResponse.cs new file mode 100644 index 00000000..cb1d8d11 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/PublishResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models +{ + /// + /// 表示 [POST] /publish/{TOKEN} 接口的响应。 + /// + public class PublishResponse : WechatOpenAIResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/SetAutoReplyRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/SetAutoReplyRequest.cs similarity index 86% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/SetAutoReplyRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/SetAutoReplyRequest.cs index 1ddb18b0..2c4408dc 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/SetAutoReplyRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/SetAutoReplyRequest.cs @@ -1,13 +1,13 @@ using System.Collections.Generic; using System.Xml.Serialization; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /setautoreply/{TOKEN} 接口的请求。 /// [XmlRoot("xml")] - public class SetAutoReplyRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedXmlable + public class SetAutoReplyRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedXmlable { /// /// 获取或设置管理员 ID。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/SetAutoReplyResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/SetAutoReplyResponse.cs new file mode 100644 index 00000000..0f5f7f69 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Bot/SetAutoReplyResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models +{ + /// + /// 表示 [POST] /setautoreply/{TOKEN} 接口的响应。 + /// + public class SetAutoReplyResponse : WechatOpenAIResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/AIBotRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/AIBotRequest.cs similarity index 93% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/AIBotRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/AIBotRequest.cs index 532de134..7b33ad17 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/AIBotRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/AIBotRequest.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /aibot/{TOKEN} 接口的请求。 /// - public class AIBotRequest : WechatOpenAIPlatformRequest + public class AIBotRequest : WechatOpenAIRequest { /// /// 获取或设置请求签名。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/AIBotResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/AIBotResponse.cs similarity index 99% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/AIBotResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/AIBotResponse.cs index 0fbdcec5..916773f1 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/AIBotResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/AIBotResponse.cs @@ -1,11 +1,11 @@ using System; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /aibot/{TOKEN} 接口的响应。 /// - public class AIBotResponse : WechatOpenAIPlatformResponse + public class AIBotResponse : WechatOpenAIResponse { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/GetHotQueryDetailRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/GetHotQueryDetailRequest.cs similarity index 90% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/GetHotQueryDetailRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/GetHotQueryDetailRequest.cs index 40c41dac..b919b612 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/GetHotQueryDetailRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/GetHotQueryDetailRequest.cs @@ -1,12 +1,12 @@ using System.Xml.Serialization; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /gethotquerydetail/{TOKEN} 接口的请求。 /// [XmlRoot("xml")] - public class GetHotQueryDetailRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedXmlable + public class GetHotQueryDetailRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedXmlable { /// /// 获取或设置分页页数。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/GetHotQueryDetailResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/GetHotQueryDetailResponse.cs similarity index 95% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/GetHotQueryDetailResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/GetHotQueryDetailResponse.cs index 5418f8c9..a45790f2 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/GetHotQueryDetailResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/GetHotQueryDetailResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /gethotquerydetail/{TOKEN} 接口的响应。 /// - public class GetHotQueryDetailResponse : WechatOpenAIPlatformResponse + public class GetHotQueryDetailResponse : WechatOpenAIResponse { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/GetHotQueryListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/GetHotQueryListRequest.cs similarity index 89% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/GetHotQueryListRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/GetHotQueryListRequest.cs index 58214402..125a6f39 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/GetHotQueryListRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/GetHotQueryListRequest.cs @@ -1,12 +1,12 @@ using System.Xml.Serialization; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /gethotquerylist/{TOKEN} 接口的请求。 /// [XmlRoot("xml")] - public class GetHotQueryListRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedXmlable + public class GetHotQueryListRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedXmlable { /// /// 获取或设置分页页数。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/GetHotQueryListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/GetHotQueryListResponse.cs similarity index 97% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/GetHotQueryListResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/GetHotQueryListResponse.cs index d293e219..f9bd8bb0 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/GetHotQueryListResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/GetHotQueryListResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /gethotquerylist/{TOKEN} 接口的响应。 /// - public class GetHotQueryListResponse : WechatOpenAIPlatformResponse + public class GetHotQueryListResponse : WechatOpenAIResponse { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/SignRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/SignRequest.cs similarity index 88% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/SignRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/SignRequest.cs index 6f568aed..88312303 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/SignRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/SignRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /sign/{TOKEN} 接口的请求。 /// - public class SignRequest : WechatOpenAIPlatformRequest + public class SignRequest : WechatOpenAIRequest { /// /// 获取或设置用户 ID。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/SignResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/SignResponse.cs similarity index 84% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/SignResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/SignResponse.cs index 221c8c7a..de622555 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Dialog/SignResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Dialog/SignResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /sign/{TOKEN} 接口的响应。 /// - public class SignResponse : WechatOpenAIPlatformResponse + public class SignResponse : WechatOpenAIResponse { /// /// 获取或设置请求签名。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Living/BatchReplyRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Living/BatchReplyRequest.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Living/BatchReplyRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Living/BatchReplyRequest.cs index 13dc8689..69510b83 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Living/BatchReplyRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Living/BatchReplyRequest.cs @@ -1,13 +1,13 @@ using System.Collections.Generic; using System.Xml.Serialization; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /batchreply/{TOKEN} 接口的请求。 /// [XmlRoot("xml")] - public class BatchReplyRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedXmlable + public class BatchReplyRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedXmlable { /// /// 获取或设置直播 ID。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Living/BatchReplyResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Living/BatchReplyResponse.cs new file mode 100644 index 00000000..5114ae13 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Living/BatchReplyResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models +{ + /// + /// 表示 [POST] /batchreply/{TOKEN} 接口的响应。 + /// + public class BatchReplyResponse : WechatOpenAIResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Living/GenerateReportRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Living/GenerateReportRequest.cs similarity index 73% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Living/GenerateReportRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Living/GenerateReportRequest.cs index 16982eda..b3a48308 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Living/GenerateReportRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Living/GenerateReportRequest.cs @@ -1,12 +1,12 @@ using System.Xml.Serialization; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /generatereport/{TOKEN} 接口的请求。 /// [XmlRoot("xml")] - public class GenerateReportRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedXmlable + public class GenerateReportRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedXmlable { /// /// 获取或设置直播 ID。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Living/GenerateReportResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Living/GenerateReportResponse.cs new file mode 100644 index 00000000..272b5884 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Living/GenerateReportResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models +{ + /// + /// 表示 [POST] /generatereport/{TOKEN} 接口的响应。 + /// + public class GenerateReportResponse : WechatOpenAIResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/AssetsUploadRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/AssetsUploadRequest.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/AssetsUploadRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/AssetsUploadRequest.cs index 66eae56e..5512a92c 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/AssetsUploadRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/AssetsUploadRequest.cs @@ -1,13 +1,13 @@ using System; using System.Xml.Serialization; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /assetsupload/{TOKEN} 接口的请求。 /// [XmlRoot("xml")] - public class AssetsUploadRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedXmlable + public class AssetsUploadRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedXmlable { /// /// 获取或设置用户 ID。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/AssetsUploadResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/AssetsUploadResponse.cs similarity index 82% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/AssetsUploadResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/AssetsUploadResponse.cs index 11b1e7af..ad1fb67e 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/AssetsUploadResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/AssetsUploadResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /assetsupload/{TOKEN} 接口的响应。 /// - public class AssetsUploadResponse : WechatOpenAIPlatformResponse + public class AssetsUploadResponse : WechatOpenAIResponse { /// /// 获取或设置文件标识。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/GetBindLinkRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/GetBindLinkRequest.cs similarity index 66% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/GetBindLinkRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/GetBindLinkRequest.cs index e43ea0e7..b3038c8a 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/GetBindLinkRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/GetBindLinkRequest.cs @@ -1,12 +1,12 @@ using System.Xml.Serialization; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /getbindlink/{TOKEN} 接口的请求。 /// [XmlRoot("xml")] - public class GetBindLinkRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedXmlable + public class GetBindLinkRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedXmlable { /// /// 获取或设置直播 ID。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/GetBindLinkResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/GetBindLinkResponse.cs similarity index 74% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/GetBindLinkResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/GetBindLinkResponse.cs index 3309797e..c3b43d8d 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/GetBindLinkResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/GetBindLinkResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /getbindlink/{TOKEN} 接口的响应。 /// - public class GetBindLinkResponse : WechatOpenAIPlatformResponse + public class GetBindLinkResponse : WechatOpenAIResponse { /// /// 获取或设置绑定链接 URL。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/GetBindListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/GetBindListRequest.cs new file mode 100644 index 00000000..6ab10a6b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/GetBindListRequest.cs @@ -0,0 +1,12 @@ +using System.Xml.Serialization; + +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models +{ + /// + /// 表示 [POST] /getbindlist/{TOKEN} 接口的请求。 + /// + [XmlRoot("xml")] + public class GetBindListRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedXmlable + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/GetBindListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/GetBindListResponse.cs similarity index 79% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/GetBindListResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/GetBindListResponse.cs index 186f5438..c039bd77 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/GetBindListResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/GetBindListResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /getbindlist/{TOKEN} 接口的响应。 /// - public class GetBindListResponse : WechatOpenAIPlatformResponse + public class GetBindListResponse : WechatOpenAIResponse { /// /// 获取或设置绑定列表。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/GetH5LinkRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/GetH5LinkRequest.cs similarity index 66% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/GetH5LinkRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/GetH5LinkRequest.cs index 77cb104a..9bf4de85 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/GetH5LinkRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/GetH5LinkRequest.cs @@ -1,12 +1,12 @@ using System.Xml.Serialization; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /geth5link/{TOKEN} 接口的请求。 /// [XmlRoot("xml")] - public class GetH5LinkRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedXmlable + public class GetH5LinkRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedXmlable { /// /// 获取或设置页面标题。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/GetH5LinkResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/GetH5LinkResponse.cs similarity index 74% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/GetH5LinkResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/GetH5LinkResponse.cs index 304bff5d..3850278e 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/GetH5LinkResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/GetH5LinkResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /geth5link/{TOKEN} 接口的响应。 /// - public class GetH5LinkResponse : WechatOpenAIPlatformResponse + public class GetH5LinkResponse : WechatOpenAIResponse { /// /// 获取或设置机器人链接 URL。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/UnbindMpRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/UnbindMpRequest.cs similarity index 60% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/UnbindMpRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/UnbindMpRequest.cs index 8f6a156f..c0b8c9b0 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/UnbindMpRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/UnbindMpRequest.cs @@ -1,12 +1,12 @@ -using System.Xml.Serialization; +using System.Xml.Serialization; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /unbindmp/{TOKEN} 接口的请求。 /// [XmlRoot("xml")] - public class UnbindMpRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedXmlable + public class UnbindMpRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedXmlable { /// /// 获取或设置微信 AppId。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/UnbindMpResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/UnbindMpResponse.cs new file mode 100644 index 00000000..f433cdfd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Mp/UnbindMpResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models +{ + /// + /// 表示 [POST] /unbindmp/{TOKEN} 接口的响应。 + /// + public class UnbindMpResponse : WechatOpenAIResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPDocumentClassifyRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPDocumentClassifyRequest.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPDocumentClassifyRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPDocumentClassifyRequest.cs index fd0233d0..9fed907d 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPDocumentClassifyRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPDocumentClassifyRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/document_classify/{TOKEN} 接口的请求。 /// - public class NLPDocumentClassifyRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedUrlEncoded + public class NLPDocumentClassifyRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedUrlEncoded { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPDocumentClassifyResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPDocumentClassifyResponse.cs similarity index 91% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPDocumentClassifyResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPDocumentClassifyResponse.cs index b7016b69..a3a83eeb 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPDocumentClassifyResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPDocumentClassifyResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/document_classify/{TOKEN} 接口的响应。 /// - public class NLPDocumentClassifyResponse : WechatOpenAIPlatformResponse + public class NLPDocumentClassifyResponse : WechatOpenAIResponse { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPGetSimilarQueryRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPGetSimilarQueryRequest.cs similarity index 84% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPGetSimilarQueryRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPGetSimilarQueryRequest.cs index c6d6d556..74229301 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPGetSimilarQueryRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPGetSimilarQueryRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/get_similar_query/{TOKEN} 接口的请求。 /// - public class NLPGetSimilarQueryRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedUrlEncoded + public class NLPGetSimilarQueryRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedUrlEncoded { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPGetSimilarQueryResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPGetSimilarQueryResponse.cs similarity index 92% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPGetSimilarQueryResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPGetSimilarQueryResponse.cs index 250757fd..6bfe91e6 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPGetSimilarQueryResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPGetSimilarQueryResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/get_similar_query/{TOKEN} 接口的响应。 /// - public class NLPGetSimilarQueryResponse : WechatOpenAIPlatformResponse + public class NLPGetSimilarQueryResponse : WechatOpenAIResponse { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPNERProductRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPNERProductRequest.cs similarity index 84% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPNERProductRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPNERProductRequest.cs index c8194cf8..1b28a69d 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPNERProductRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPNERProductRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/ner-product/{TOKEN} 接口的请求。 /// - public class NLPNERProductRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedUrlEncoded + public class NLPNERProductRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedUrlEncoded { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPNERProductResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPNERProductResponse.cs similarity index 98% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPNERProductResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPNERProductResponse.cs index 052039c6..90110096 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPNERProductResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPNERProductResponse.cs @@ -1,12 +1,12 @@ using System; using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/ner-product/{TOKEN} 接口的响应。 /// - public class NLPNERProductResponse : WechatOpenAIPlatformResponse + public class NLPNERProductResponse : WechatOpenAIResponse { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPNERRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPNERRequest.cs similarity index 84% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPNERRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPNERRequest.cs index f896bec6..2e8da1c9 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPNERRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPNERRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/ner/{TOKEN} 接口的请求。 /// - public class NLPNERRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedUrlEncoded + public class NLPNERRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedUrlEncoded { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPNERResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPNERResponse.cs similarity index 93% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPNERResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPNERResponse.cs index f14e6544..8b51ced5 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPNERResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPNERResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/ner/{TOKEN} 接口的响应。 /// - public class NLPNERResponse : WechatOpenAIPlatformResponse + public class NLPNERResponse : WechatOpenAIResponse { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPNewsAbstractionRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPNewsAbstractionRequest.cs similarity index 91% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPNewsAbstractionRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPNewsAbstractionRequest.cs index bf00565b..8e587d48 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPNewsAbstractionRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPNewsAbstractionRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/news-abstraction/{TOKEN} 接口的请求。 /// - public class NLPNewsAbstractionRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedUrlEncoded + public class NLPNewsAbstractionRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedUrlEncoded { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPNewsAbstractionResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPNewsAbstractionResponse.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPNewsAbstractionResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPNewsAbstractionResponse.cs index 23ad3f47..598a1a71 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPNewsAbstractionResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPNewsAbstractionResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/news-abstraction/{TOKEN} 接口的响应。 /// - public class NLPNewsAbstractionResponse : WechatOpenAIPlatformResponse + public class NLPNewsAbstractionResponse : WechatOpenAIResponse { /// /// 获取或设置摘要提取的结果。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPRankRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPRankRequest.cs similarity index 91% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPRankRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPRankRequest.cs index 65e1324d..d24c061f 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPRankRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPRankRequest.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/rank/{TOKEN} 接口的请求。 /// - public class NLPRankRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedUrlEncoded + public class NLPRankRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedUrlEncoded { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPRankResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPRankResponse.cs similarity index 91% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPRankResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPRankResponse.cs index 3abf9e1a..cea2b371 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPRankResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPRankResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/rank/{TOKEN} 接口的响应。 /// - public class NLPRankResponse : WechatOpenAIPlatformResponse + public class NLPRankResponse : WechatOpenAIResponse { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPRecommendQuestionsRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPRecommendQuestionsRequest.cs similarity index 79% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPRecommendQuestionsRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPRecommendQuestionsRequest.cs index b590b171..e57f7c76 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPRecommendQuestionsRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPRecommendQuestionsRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/recommend_questions/{TOKEN} 接口的请求。 /// - public class NLPRecommendQuestionsRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedUrlEncoded + public class NLPRecommendQuestionsRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedUrlEncoded { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPRecommendQuestionsResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPRecommendQuestionsResponse.cs similarity index 74% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPRecommendQuestionsResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPRecommendQuestionsResponse.cs index ddc0cd04..bc77b3f4 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPRecommendQuestionsResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPRecommendQuestionsResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/recommend_questions/{TOKEN} 接口的响应。 /// - public class NLPRecommendQuestionsResponse : WechatOpenAIPlatformResponse + public class NLPRecommendQuestionsResponse : WechatOpenAIResponse { /// /// 获取或设置推荐的结果。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPSensitiveRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPSensitiveRequest.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPSensitiveRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPSensitiveRequest.cs index a8ac565b..617af1a3 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPSensitiveRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPSensitiveRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/sensitive/{TOKEN} 接口的请求。 /// - public class NLPSensitiveRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedUrlEncoded + public class NLPSensitiveRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedUrlEncoded { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPSensitiveResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPSensitiveResponse.cs similarity index 98% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPSensitiveResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPSensitiveResponse.cs index dc27d2e2..fb30d37b 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPSensitiveResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPSensitiveResponse.cs @@ -1,12 +1,12 @@ using System; using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/sensitive/{TOKEN} 接口的响应。 /// - public class NLPSensitiveResponse : WechatOpenAIPlatformResponse + public class NLPSensitiveResponse : WechatOpenAIResponse { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPSentimentRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPSentimentRequest.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPSentimentRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPSentimentRequest.cs index bba18b78..9fcdc8c6 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPSentimentRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPSentimentRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/sentiment/{TOKEN} 接口的请求。 /// - public class NLPSentimentRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedUrlEncoded + public class NLPSentimentRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedUrlEncoded { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPSentimentResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPSentimentResponse.cs similarity index 98% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPSentimentResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPSentimentResponse.cs index e8b9a676..ac0e0a0f 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPSentimentResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPSentimentResponse.cs @@ -1,12 +1,12 @@ using System; using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/sentiment/{TOKEN} 接口的响应。 /// - public class NLPSentimentResponse : WechatOpenAIPlatformResponse + public class NLPSentimentResponse : WechatOpenAIResponse { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPTokenizeRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPTokenizeRequest.cs similarity index 84% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPTokenizeRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPTokenizeRequest.cs index 08ae57f5..db84e7f3 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPTokenizeRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPTokenizeRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/tokenize/{TOKEN} 接口的请求。 /// - public class NLPTokenizeRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedUrlEncoded + public class NLPTokenizeRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedUrlEncoded { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPTokenizeResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPTokenizeResponse.cs similarity index 93% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPTokenizeResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPTokenizeResponse.cs index 7314e64b..9654daf9 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPTokenizeResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPTokenizeResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/tokenize/{TOKEN} 接口的响应。 /// - public class NLPTokenizeResponse : WechatOpenAIPlatformResponse + public class NLPTokenizeResponse : WechatOpenAIResponse { /// /// 获取或设置常规粒度分词结果列表。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPTranslateChinese2EnglishRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPTranslateChinese2EnglishRequest.cs similarity index 88% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPTranslateChinese2EnglishRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPTranslateChinese2EnglishRequest.cs index f97220a2..f53ab0aa 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPTranslateChinese2EnglishRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPTranslateChinese2EnglishRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/translate_cn2en/{TOKEN} 接口的请求。 /// - public class NLPTranslateChinese2EnglishRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedUrlEncoded + public class NLPTranslateChinese2EnglishRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedUrlEncoded { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPTranslateChinese2EnglishResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPTranslateChinese2EnglishResponse.cs similarity index 84% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPTranslateChinese2EnglishResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPTranslateChinese2EnglishResponse.cs index 09e03028..71fc0535 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPTranslateChinese2EnglishResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPTranslateChinese2EnglishResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/translate_cn2en/{TOKEN} 接口的响应。 /// - public class NLPTranslateChinese2EnglishResponse : WechatOpenAIPlatformResponse + public class NLPTranslateChinese2EnglishResponse : WechatOpenAIResponse { /// /// 获取或设置结果。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPTranslateEnglish2ChineseRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPTranslateEnglish2ChineseRequest.cs similarity index 88% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPTranslateEnglish2ChineseRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPTranslateEnglish2ChineseRequest.cs index 7a7c3fd3..a965e244 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPTranslateEnglish2ChineseRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPTranslateEnglish2ChineseRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/translate_en2cn/{TOKEN} 接口的请求。 /// - public class NLPTranslateEnglish2ChineseRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedUrlEncoded + public class NLPTranslateEnglish2ChineseRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedUrlEncoded { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPTranslateEnglish2ChineseResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPTranslateEnglish2ChineseResponse.cs similarity index 84% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPTranslateEnglish2ChineseResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPTranslateEnglish2ChineseResponse.cs index 0dbeaebd..f8042686 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/NLP/NLPTranslateEnglish2ChineseResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/NLP/NLPTranslateEnglish2ChineseResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /nlp/translate_en2cn/{TOKEN} 接口的响应。 /// - public class NLPTranslateEnglish2ChineseResponse : WechatOpenAIPlatformResponse + public class NLPTranslateEnglish2ChineseResponse : WechatOpenAIResponse { /// /// 获取或设置结果。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/BatchImportSkillResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/BatchImportSkillResponse.cs deleted file mode 100644 index 25722ff6..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/BatchImportSkillResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform -{ - /// - /// 表示 [POST] /batchimportskill/{TOKEN} 接口的响应。 - /// - public class BatchImportSkillResponse : WechatOpenAIPlatformResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/LabelBatchSetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/LabelBatchSetResponse.cs deleted file mode 100644 index 531568a6..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/LabelBatchSetResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform -{ - /// - /// 表示 [POST] /label/batchset/{TOKEN} 接口的响应。 - /// - public class LabelBatchSetResponse : WechatOpenAIPlatformResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/PublishResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/PublishResponse.cs deleted file mode 100644 index e41b0f61..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/PublishResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform -{ - /// - /// 表示 [POST] /publish/{TOKEN} 接口的响应。 - /// - public class PublishResponse : WechatOpenAIPlatformResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/SetAutoReplyResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/SetAutoReplyResponse.cs deleted file mode 100644 index 1f87aa16..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Bot/SetAutoReplyResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform -{ - /// - /// 表示 [POST] /setautoreply/{TOKEN} 接口的响应。 - /// - public class SetAutoReplyResponse : WechatOpenAIPlatformResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Living/BatchReplyResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Living/BatchReplyResponse.cs deleted file mode 100644 index b89f898c..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Living/BatchReplyResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform -{ - /// - /// 表示 [POST] /batchreply/{TOKEN} 接口的响应。 - /// - public class BatchReplyResponse : WechatOpenAIPlatformResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Living/GenerateReportResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Living/GenerateReportResponse.cs deleted file mode 100644 index 07336325..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Living/GenerateReportResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform -{ - /// - /// 表示 [POST] /generatereport/{TOKEN} 接口的响应。 - /// - public class GenerateReportResponse : WechatOpenAIPlatformResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/GetBindListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/GetBindListRequest.cs deleted file mode 100644 index ef6ab049..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/GetBindListRequest.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Xml.Serialization; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform -{ - /// - /// 表示 [POST] /getbindlist/{TOKEN} 接口的请求。 - /// - [XmlRoot("xml")] - public class GetBindListRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedXmlable - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/UnbindMpResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/UnbindMpResponse.cs deleted file mode 100644 index bc823e92..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/Mp/UnbindMpResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform -{ - /// - /// 表示 [POST] /unbindmp/{TOKEN} 接口的响应。 - /// - public class UnbindMpResponse : WechatOpenAIPlatformResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/ThirdKefu/KefuStateChangeResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/ThirdKefu/KefuStateChangeResponse.cs deleted file mode 100644 index da18e3ae..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/ThirdKefu/KefuStateChangeResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform -{ - /// - /// 表示 [POST] /kefustate/change/{TOKEN} 接口的响应。 - /// - public class KefuStateChangeResponse : WechatOpenAIPlatformResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/ThirdKefu/SendMessageResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/ThirdKefu/SendMessageResponse.cs deleted file mode 100644 index c5dcbc2e..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/ThirdKefu/SendMessageResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform -{ - /// - /// 表示 [POST] /sendmsg/{TOKEN} 接口的响应。 - /// - public class SendMessageResponse : WechatOpenAIPlatformResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/ThirdKefu/KefuStateChangeRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdKf/KefuStateChangeRequest.cs similarity index 74% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/ThirdKefu/KefuStateChangeRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdKf/KefuStateChangeRequest.cs index aadde520..d1cc32f3 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/ThirdKefu/KefuStateChangeRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdKf/KefuStateChangeRequest.cs @@ -1,15 +1,15 @@ using System.Xml.Serialization; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /kefustate/change/{TOKEN} 接口的请求。 /// [XmlRoot("xml")] - public class KefuStateChangeRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedXmlable + public class KefuStateChangeRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedXmlable { /// - /// 获取或设置微信 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置微信 AppId。如果不指定将使用构造 时的 参数。 /// [XmlElement("appid")] public string? AppId { get; set; } diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdKf/KefuStateChangeResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdKf/KefuStateChangeResponse.cs new file mode 100644 index 00000000..b39a7ab0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdKf/KefuStateChangeResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models +{ + /// + /// 表示 [POST] /kefustate/change/{TOKEN} 接口的响应。 + /// + public class KefuStateChangeResponse : WechatOpenAIResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/ThirdKefu/KefuStateGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdKf/KefuStateGetRequest.cs similarity index 70% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/ThirdKefu/KefuStateGetRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdKf/KefuStateGetRequest.cs index cc240d2b..0726e038 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/ThirdKefu/KefuStateGetRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdKf/KefuStateGetRequest.cs @@ -1,15 +1,15 @@ using System.Xml.Serialization; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /kefustate/get/{TOKEN} 接口的请求。 /// [XmlRoot("xml")] - public class KefuStateGetRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedXmlable + public class KefuStateGetRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedXmlable { /// - /// 获取或设置微信 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置微信 AppId。如果不指定将使用构造 时的 参数。 /// [XmlElement("appid")] public string? AppId { get; set; } diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/ThirdKefu/KefuStateGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdKf/KefuStateGetResponse.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/ThirdKefu/KefuStateGetResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdKf/KefuStateGetResponse.cs index 09616369..0434042d 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/ThirdKefu/KefuStateGetResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdKf/KefuStateGetResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /kefustate/get/{TOKEN} 接口的响应。 /// - public class KefuStateGetResponse : WechatOpenAIPlatformResponse + public class KefuStateGetResponse : WechatOpenAIResponse { /// /// 获取或设置客服接入状态。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/ThirdKefu/SendMessageRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdKf/SendMessageRequest.cs similarity index 84% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/ThirdKefu/SendMessageRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdKf/SendMessageRequest.cs index 86f31347..c7e9bbe6 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/Platform/ThirdKefu/SendMessageRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdKf/SendMessageRequest.cs @@ -1,15 +1,15 @@ using System.Xml.Serialization; -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.Platform +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models { /// /// 表示 [POST] /sendmsg/{TOKEN} 接口的请求。 /// [XmlRoot("xml")] - public class SendMessageRequest : WechatOpenAIPlatformRequest, WechatOpenAIPlatformRequest.Serialization.IEncryptedXmlable + public class SendMessageRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedXmlable { /// - /// 获取或设置微信 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置微信 AppId。如果不指定将使用构造 时的 参数。 /// [XmlElement("appid")] public string? AppId { get; set; } diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdKf/SendMessageResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdKf/SendMessageResponse.cs new file mode 100644 index 00000000..728a4205 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdKf/SendMessageResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models +{ + /// + /// 表示 [POST] /sendmsg/{TOKEN} 接口的响应。 + /// + public class SendMessageResponse : WechatOpenAIResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Api/ApiGetWelcomeMessageRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Api/ApiGetWelcomeMessageRequest.cs deleted file mode 100644 index 7eb99be3..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Api/ApiGetWelcomeMessageRequest.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/api/get_welcome_msg 接口的请求。 - /// - public class ApiGetWelcomeMessageRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置渠道 ID。 - /// - [Newtonsoft.Json.JsonProperty("channelId")] - [System.Text.Json.Serialization.JsonPropertyName("channelId")] - public string ChannelId { get; set; } = string.Empty; - - /// - /// 获取或设置标签 ID。 - /// - [Newtonsoft.Json.JsonProperty("lableId")] - [System.Text.Json.Serialization.JsonPropertyName("lableId")] - public string? LabelId { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Api/ApiGetWelcomeMessageResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Api/ApiGetWelcomeMessageResponse.cs deleted file mode 100644 index 2ec186df..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Api/ApiGetWelcomeMessageResponse.cs +++ /dev/null @@ -1,76 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/api/get_welcome_msg 接口的响应。 - /// - public class ApiGetWelcomeMessageResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class WelcomeMessage - { - /// - /// 获取或设置来源类型。 - /// - [Newtonsoft.Json.JsonProperty("source")] - [System.Text.Json.Serialization.JsonPropertyName("source")] - public int Source { get; set; } - - /// - /// 获取或设置欢迎语 ID。 - /// - [Newtonsoft.Json.JsonProperty("msgId")] - [System.Text.Json.Serialization.JsonPropertyName("msgId")] - public string MessageId { get; set; } = default!; - - /// - /// 获取或设置欢迎语类型。 - /// - [Newtonsoft.Json.JsonProperty("msgType")] - [System.Text.Json.Serialization.JsonPropertyName("msgType")] - public string MessageType { get; set; } = default!; - - /// - /// 获取或设置欢迎语内容。 - /// - [Newtonsoft.Json.JsonProperty("welcomeMsg")] - [System.Text.Json.Serialization.JsonPropertyName("welcomeMsg")] - public string MessageContent { get; set; } = default!; - - /// - /// 获取或设置标签。 - /// - [Newtonsoft.Json.JsonProperty("label")] - [System.Text.Json.Serialization.JsonPropertyName("label")] - public string? Label { get; set; } - - /// - /// 获取或设置发送间隔(单位:秒)。 - /// - [Newtonsoft.Json.JsonProperty("newSendInterval")] - [System.Text.Json.Serialization.JsonPropertyName("newSendInterval")] - public int SendInterval { get; set; } - } - } - - /// - /// 获取或设置欢迎语列表。 - /// - [Newtonsoft.Json.JsonProperty("list")] - [System.Text.Json.Serialization.JsonPropertyName("list")] - public Types.WelcomeMessage[] WelcomeMessageList { get; set; } = default!; - - /// - /// 获取或设置欢迎语总数量。 - /// - [Newtonsoft.Json.JsonProperty("total")] - [System.Text.Json.Serialization.JsonPropertyName("total")] - public int TotalCount { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Api/ApiSetWelcomeMessageRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Api/ApiSetWelcomeMessageRequest.cs deleted file mode 100644 index 8c2e4d78..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Api/ApiSetWelcomeMessageRequest.cs +++ /dev/null @@ -1,57 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/api/set_welcome_msg 接口的请求。 - /// - public class ApiSetWelcomeMessageRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置渠道 ID。 - /// - [Newtonsoft.Json.JsonProperty("channelId")] - [System.Text.Json.Serialization.JsonPropertyName("channelId")] - public string ChannelId { get; set; } = string.Empty; - - /// - /// 获取或设置来源类型。 - /// - [Newtonsoft.Json.JsonProperty("source")] - [System.Text.Json.Serialization.JsonPropertyName("source")] - public int Source { get; set; } - - /// - /// 获取或设置欢迎语 ID。 - /// - [Newtonsoft.Json.JsonProperty("msgId")] - [System.Text.Json.Serialization.JsonPropertyName("msgId")] - public string? MessageId { get; set; } - - /// - /// 获取或设置欢迎语类型。 - /// - [Newtonsoft.Json.JsonProperty("msgType")] - [System.Text.Json.Serialization.JsonPropertyName("msgType")] - public string MessageType { get; set; } = string.Empty; - - /// - /// 获取或设置欢迎语内容。 - /// - [Newtonsoft.Json.JsonProperty("welcomeMsg")] - [System.Text.Json.Serialization.JsonPropertyName("welcomeMsg")] - public string MessageContent { get; set; } = string.Empty; - - /// - /// 获取或设置标签 ID。 - /// - [Newtonsoft.Json.JsonProperty("lableId")] - [System.Text.Json.Serialization.JsonPropertyName("lableId")] - public string? LabelId { get; set; } - - /// - /// 获取或设置发送间隔(单位:秒)。 - /// - [Newtonsoft.Json.JsonProperty("newSendInterval")] - [System.Text.Json.Serialization.JsonPropertyName("newSendInterval")] - public int SendInterval { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Api/ApiSetWelcomeMessageResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Api/ApiSetWelcomeMessageResponse.cs deleted file mode 100644 index f7522078..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Api/ApiSetWelcomeMessageResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/api/set_welcome_msg 接口的响应。 - /// - public class ApiSetWelcomeMessageResponse : WechatOpenAIThirdPartyResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Async/AsyncFetchRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Async/AsyncFetchRequest.cs deleted file mode 100644 index 384642b5..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Async/AsyncFetchRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [GET] /v1/async/fetch 接口的请求。 - /// - public class AsyncFetchRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置异步任务 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string TaskId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Async/AsyncFetchResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Async/AsyncFetchResponse.cs deleted file mode 100644 index c231633b..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Async/AsyncFetchResponse.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [GET] /v1/async/fetch 接口的响应。 - /// - public class AsyncFetchResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置任务状态。 - /// - [Newtonsoft.Json.JsonProperty("state")] - [System.Text.Json.Serialization.JsonPropertyName("state")] - public int State { get; set; } - - /// - /// 获取或设置任务进度字符串。 - /// - [Newtonsoft.Json.JsonProperty("progress")] - [System.Text.Json.Serialization.JsonPropertyName("progress")] - public string ProgressString { get; set; } = default!; - - /// - /// 获取或设置任务耗时字符串。 - /// - [Newtonsoft.Json.JsonProperty("cost")] - [System.Text.Json.Serialization.JsonPropertyName("cost")] - public string CostString { get; set; } = default!; - - /// - /// 获取或设置导出任务的下载链接。 - /// - [Newtonsoft.Json.JsonProperty("url")] - [System.Text.Json.Serialization.JsonPropertyName("url")] - public string? Url { get; set; } - - /// - /// 获取或设置接口访问令牌。 - /// - [Newtonsoft.Json.JsonProperty("success_skill_info")] - [System.Text.Json.Serialization.JsonPropertyName("success_skill_info")] - public IDictionary? SuccessSkillMap { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotDeleteRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotDeleteRequest.cs deleted file mode 100644 index 56a23759..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotDeleteRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/bot/delete 接口的请求。 - /// - public class BotDeleteRequest : WechatOpenAIThirdPartyRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotDeleteResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotDeleteResponse.cs deleted file mode 100644 index 9f6aae22..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotDeleteResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/bot/delete 接口的响应。 - /// - public class BotDeleteResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置异步任务 ID。 - /// - [Newtonsoft.Json.JsonProperty("task_id")] - [System.Text.Json.Serialization.JsonPropertyName("task_id")] - public string TaskId { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotEffectiveProgressRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotEffectiveProgressRequest.cs deleted file mode 100644 index 3c79c624..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotEffectiveProgressRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/bot/effective_progress 接口的请求。 - /// - public class BotEffectiveProgressRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置环境。 - /// - [Newtonsoft.Json.JsonProperty("env")] - [System.Text.Json.Serialization.JsonPropertyName("env")] - public string? Environment { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotEffectiveProgressResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotEffectiveProgressResponse.cs deleted file mode 100644 index 714efd7e..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotEffectiveProgressResponse.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/bot/effective_progress 接口的响应。 - /// - public class BotEffectiveProgressResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置进度(范围:0~100)。 - /// - [Newtonsoft.Json.JsonProperty("progress")] - [System.Text.Json.Serialization.JsonPropertyName("progress")] - public int Progress { get; set; } - - /// - /// 获取或设置状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int Status { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotExportRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotExportRequest.cs deleted file mode 100644 index da6eb719..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotExportRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [GET] /v1/bot/export 接口的请求。 - /// - public class BotExportRequest : WechatOpenAIThirdPartyRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotExportResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotExportResponse.cs deleted file mode 100644 index 0105f8f3..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotExportResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [GET] /v1/bot/export 接口的响应。 - /// - public class BotExportResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置异步任务 ID。 - /// - [Newtonsoft.Json.JsonProperty("task_id")] - [System.Text.Json.Serialization.JsonPropertyName("task_id")] - public string TaskId { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotGetDetailRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotGetDetailRequest.cs deleted file mode 100644 index 43f78121..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotGetDetailRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [GET] /v2/bot/get_detail 接口的请求。 - /// - public class BotGetDetailRequest : WechatOpenAIThirdPartyRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotGetDetailResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotGetDetailResponse.cs deleted file mode 100644 index 7f6972c6..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotGetDetailResponse.cs +++ /dev/null @@ -1,98 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [GET] /v2/bot/get_detail 接口的响应。 - /// - public class BotGetDetailResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置机器人 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string BotId { get; set; } = default!; - - /// - /// 获取或设置机器人中文名。 - /// - [Newtonsoft.Json.JsonProperty("name_ch")] - [System.Text.Json.Serialization.JsonPropertyName("name_ch")] - public string ChineseName { get; set; } = default!; - - /// - /// 获取或设置机器人英文名。 - /// - [Newtonsoft.Json.JsonProperty("name_en")] - [System.Text.Json.Serialization.JsonPropertyName("name_en")] - public string? EnglishName { get; set; } - - /// - /// 获取或设置机器人昵称。 - /// - [Newtonsoft.Json.JsonProperty("nickname")] - [System.Text.Json.Serialization.JsonPropertyName("nickname")] - public string? Nickname { get; set; } - - /// - /// 获取或设置机器人类型。 - /// - [Newtonsoft.Json.JsonProperty("bot_type")] - [System.Text.Json.Serialization.JsonPropertyName("bot_type")] - public int BotType { get; set; } - - /// - /// 获取或设置行业 ID。 - /// - [Newtonsoft.Json.JsonProperty("industry")] - [System.Text.Json.Serialization.JsonPropertyName("industry")] - public int IndustryId { get; set; } - - /// - /// 获取或设置默认回答开关。 - /// - [Newtonsoft.Json.JsonProperty("default_answer_switch")] - [System.Text.Json.Serialization.JsonPropertyName("default_answer_switch")] - public bool DefaultAnswerSwitch { get; set; } - - /// - /// 获取或设置默认回答。 - /// - [Newtonsoft.Json.JsonProperty("default_answer")] - [System.Text.Json.Serialization.JsonPropertyName("default_answer")] - public string? DefaultAnswer { get; set; } - - /// - /// 获取或设置相似度阈值。 - /// - [Newtonsoft.Json.JsonProperty("similarity")] - [System.Text.Json.Serialization.JsonPropertyName("similarity")] - public double Similarity { get; set; } - - /// - /// 获取或设置相似度阈值下限。 - /// - [Newtonsoft.Json.JsonProperty("similarity_low")] - [System.Text.Json.Serialization.JsonPropertyName("similarity_low")] - public double SimilarityMinimum { get; set; } - - /// - /// 获取或设置相似问题推荐数量。 - /// - [Newtonsoft.Json.JsonProperty("similar_question_recommend_num")] - [System.Text.Json.Serialization.JsonPropertyName("similar_question_recommend_num")] - public int SimilarityQuestionRecommendCount { get; set; } - - /// - /// 获取或设置收集用户反馈开关。 - /// - [Newtonsoft.Json.JsonProperty("user_feedback")] - [System.Text.Json.Serialization.JsonPropertyName("user_feedback")] - public bool UserFeedbackSwitch { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotGetListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotGetListRequest.cs deleted file mode 100644 index 137dc33b..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotGetListRequest.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/bot/get_list 接口的请求。 - /// - public class BotGetListRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置关键字。 - /// - [Newtonsoft.Json.JsonProperty("keyword")] - [System.Text.Json.Serialization.JsonPropertyName("keyword")] - public string? Keyword { get; set; } - - /// - /// 获取或设置机器人类型。 - /// - [Newtonsoft.Json.JsonProperty("bot_type")] - [System.Text.Json.Serialization.JsonPropertyName("bot_type")] - public int? BotType { get; set; } - - /// - /// 获取或设置分页页数。 - /// 默认值:0 - /// - [Newtonsoft.Json.JsonProperty("page")] - [System.Text.Json.Serialization.JsonPropertyName("page")] - public int Page { get; set; } - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonProperty("size")] - [System.Text.Json.Serialization.JsonPropertyName("size")] - public int Limit { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotGetListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotGetListResponse.cs deleted file mode 100644 index 384cc071..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotGetListResponse.cs +++ /dev/null @@ -1,83 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/bot/get_list 接口的响应。 - /// - public class BotGetListResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Bot - { - /// - /// 获取或设置机器人 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string BotId { get; set; } = default!; - - /// - /// 获取或设置机器人中文名。 - /// - [Newtonsoft.Json.JsonProperty("name_ch")] - [System.Text.Json.Serialization.JsonPropertyName("name_ch")] - public string ChineseName { get; set; } = default!; - - /// - /// 获取或设置机器人英文名。 - /// - [Newtonsoft.Json.JsonProperty("name_en")] - [System.Text.Json.Serialization.JsonPropertyName("name_en")] - public string? EnglishName { get; set; } - - /// - /// 获取或设置机器人类型。 - /// - [Newtonsoft.Json.JsonProperty("bot_type")] - [System.Text.Json.Serialization.JsonPropertyName("bot_type")] - public int BotType { get; set; } - - /// - /// 获取或设置操作权限类型。 - /// - [Newtonsoft.Json.JsonProperty("auth")] - [System.Text.Json.Serialization.JsonPropertyName("auth")] - public int AuthType { get; set; } - } - } - - /// - /// 获取或设置机器人列表。 - /// - [Newtonsoft.Json.JsonProperty("list")] - [System.Text.Json.Serialization.JsonPropertyName("list")] - public Types.Bot[] BotList { get; set; } = default!; - - /// - /// 获取或设置机器人总数量。 - /// - [Newtonsoft.Json.JsonProperty("count")] - [System.Text.Json.Serialization.JsonPropertyName("count")] - public int TotalCount { get; set; } - - /// - /// 获取或设置默认机器人数量。 - /// - [Newtonsoft.Json.JsonProperty("default_bot_count")] - [System.Text.Json.Serialization.JsonPropertyName("default_bot_count")] - public int DefaultBotCount { get; set; } - - /// - /// 获取或设置直播机器人数量。 - /// - [Newtonsoft.Json.JsonProperty("live_bot_count")] - [System.Text.Json.Serialization.JsonPropertyName("live_bot_count")] - public int LiveBotCount { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotImportJsonRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotImportJsonRequest.cs deleted file mode 100644 index 91472d3b..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotImportJsonRequest.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/bot/import/json 接口的请求。 - /// - public class BotImportJsonRequest : WechatOpenAIThirdPartyRequest - { - public static class Types - { - public class Intent - { - /// - /// 获取或设置技能名称。 - /// - [Newtonsoft.Json.JsonProperty("skill")] - [System.Text.Json.Serialization.JsonPropertyName("skill")] - public string SkillName { get; set; } = string.Empty; - - /// - /// 获取或设置原来意图名称。 - /// - [Newtonsoft.Json.JsonProperty("old_intent")] - [System.Text.Json.Serialization.JsonPropertyName("old_intent")] - public string? OldIntentName { get; set; } - - /// - /// 获取或设置意图名称。 - /// - [Newtonsoft.Json.JsonProperty("intent")] - [System.Text.Json.Serialization.JsonPropertyName("intent")] - public string IntentName { get; set; } = string.Empty; - - /// - /// 获取或设置相似度。 - /// - [Newtonsoft.Json.JsonProperty("threshold")] - [System.Text.Json.Serialization.JsonPropertyName("threshold")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] - public double Threshold { get; set; } - - /// - /// 获取或设置是否禁用。 - /// - [Newtonsoft.Json.JsonProperty("disable")] - [System.Text.Json.Serialization.JsonPropertyName("disable")] - public bool IsDisabled { get; set; } - - /// - /// 获取或设置问题列表。 - /// - [Newtonsoft.Json.JsonProperty("questions")] - [System.Text.Json.Serialization.JsonPropertyName("questions")] - public IList QuestionList { get; set; } = new List(); - - /// - /// 获取或设置回答列表。 - /// - [Newtonsoft.Json.JsonProperty("answers")] - [System.Text.Json.Serialization.JsonPropertyName("answers")] - public IList AnswerList { get; set; } = new List(); - } - } - - /// - /// 获取或设置意图列表。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public IList IntentList { get; set; } = new List(); - - /// - /// 获取或设置导入模式。 - /// - [Newtonsoft.Json.JsonProperty("mode")] - [System.Text.Json.Serialization.JsonPropertyName("mode")] - public int Mode { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotImportJsonResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotImportJsonResponse.cs deleted file mode 100644 index 220403af..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotImportJsonResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/bot/import/json 接口的响应。 - /// - public class BotImportJsonResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置异步任务 ID。 - /// - [Newtonsoft.Json.JsonProperty("task_id")] - [System.Text.Json.Serialization.JsonPropertyName("task_id")] - public string TaskId { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotImportRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotImportRequest.cs deleted file mode 100644 index 6971af27..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotImportRequest.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/bot/import 接口的请求。 - /// - public class BotImportRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置上传的文件标识。 - /// - [Newtonsoft.Json.JsonProperty("file_key")] - [System.Text.Json.Serialization.JsonPropertyName("file_key")] - public string FileKey { get; set; } = string.Empty; - - /// - /// 获取或设置是否覆盖。 - /// - [Newtonsoft.Json.JsonProperty("cover")] - [System.Text.Json.Serialization.JsonPropertyName("cover")] - public bool IsCover { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotImportResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotImportResponse.cs deleted file mode 100644 index 5c658512..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotImportResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/bot/import 接口的响应。 - /// - public class BotImportResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置异步任务 ID。 - /// - [Newtonsoft.Json.JsonProperty("task_id")] - [System.Text.Json.Serialization.JsonPropertyName("task_id")] - public string TaskId { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotPublishGetRecordRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotPublishGetRecordRequest.cs deleted file mode 100644 index 6e5a3f34..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotPublishGetRecordRequest.cs +++ /dev/null @@ -1,24 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/bot/publish/get_record 接口的请求。 - /// - public class BotPublishGetRecordRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置分页页数。 - /// 默认值:0 - /// - [Newtonsoft.Json.JsonProperty("page")] - [System.Text.Json.Serialization.JsonPropertyName("page")] - public int Page { get; set; } - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonProperty("size")] - [System.Text.Json.Serialization.JsonPropertyName("size")] - public int Limit { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotPublishGetRecordResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotPublishGetRecordResponse.cs deleted file mode 100644 index 21c3a77f..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotPublishGetRecordResponse.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/bot/publish/get_record 接口的响应。 - /// - public class BotPublishGetRecordResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Record - { - /// - /// 获取或设置 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string Id { get; set; } = default!; - - /// - /// 获取或设置发布者 OpenId。 - /// - [Newtonsoft.Json.JsonProperty("open_id")] - [System.Text.Json.Serialization.JsonPropertyName("open_id")] - public string OpenId { get; set; } = default!; - - /// - /// 获取或设置发布状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int Status { get; set; } - - /// - /// 获取或设置同步数据状态。 - /// - [Newtonsoft.Json.JsonProperty("sync_status")] - [System.Text.Json.Serialization.JsonPropertyName("sync_status")] - public int SyncStatus { get; set; } - - /// - /// 获取或设置描述。 - /// - [Newtonsoft.Json.JsonProperty("description")] - [System.Text.Json.Serialization.JsonPropertyName("description")] - public string Description { get; set; } = default!; - - /// - /// 获取或设置发布时间戳。 - /// - [Newtonsoft.Json.JsonProperty("created_time")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RegularDateTimeOffsetConverter))] - [System.Text.Json.Serialization.JsonPropertyName("created_time")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RegularDateTimeOffsetConverter))] - public DateTimeOffset CreateTimestamp { get; set; } - } - } - - /// - /// 获取或设置发布记录列表。 - /// - [Newtonsoft.Json.JsonProperty("list")] - [System.Text.Json.Serialization.JsonPropertyName("list")] - public Types.Record[] RecordList { get; set; } = default!; - - /// - /// 获取或设置总数量。 - /// - [Newtonsoft.Json.JsonProperty("count")] - [System.Text.Json.Serialization.JsonPropertyName("count")] - public int TotalCount { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotPublishRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotPublishRequest.cs deleted file mode 100644 index 764b2b19..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotPublishRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/bot/publish 接口的请求。 - /// - public class BotPublishRequest : WechatOpenAIThirdPartyRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotPublishResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotPublishResponse.cs deleted file mode 100644 index f6690870..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotPublishResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/bot/publish 接口的响应。 - /// - public class BotPublishResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置异步任务 ID。 - /// - [Newtonsoft.Json.JsonProperty("task_id")] - [System.Text.Json.Serialization.JsonPropertyName("task_id")] - public string TaskId { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotSaveRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotSaveRequest.cs deleted file mode 100644 index 82ca2b1e..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotSaveRequest.cs +++ /dev/null @@ -1,85 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/bot/save 接口的请求。 - /// - public class BotSaveRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置机器人中文名。 - /// - [Newtonsoft.Json.JsonProperty("name_ch")] - [System.Text.Json.Serialization.JsonPropertyName("name_ch")] - public string ChineseName { get; set; } = string.Empty; - - /// - /// 获取或设置机器人英文名。 - /// - [Newtonsoft.Json.JsonProperty("name_en")] - [System.Text.Json.Serialization.JsonPropertyName("name_en")] - public string? EnglishName { get; set; } - - /// - /// 获取或设置机器人昵称。 - /// - [Newtonsoft.Json.JsonProperty("nickname")] - [System.Text.Json.Serialization.JsonPropertyName("nickname")] - public string? Nickname { get; set; } - - /// - /// 获取或设置机器人类型。 - /// - [Newtonsoft.Json.JsonProperty("bot_type")] - [System.Text.Json.Serialization.JsonPropertyName("bot_type")] - public int? BotType { get; set; } - - /// - /// 获取或设置行业 ID。 - /// - [Newtonsoft.Json.JsonProperty("industry")] - [System.Text.Json.Serialization.JsonPropertyName("industry")] - public int? IndustryId { get; set; } - - /// - /// 获取或设置默认回答开关。 - /// - [Newtonsoft.Json.JsonProperty("default_answer_switch")] - [System.Text.Json.Serialization.JsonPropertyName("default_answer_switch")] - public bool? DefaultAnswerSwitch { get; set; } - - /// - /// 获取或设置默认回答。 - /// - [Newtonsoft.Json.JsonProperty("default_answer")] - [System.Text.Json.Serialization.JsonPropertyName("default_answer")] - public string? DefaultAnswer { get; set; } - - /// - /// 获取或设置相似度阈值。 - /// - [Newtonsoft.Json.JsonProperty("similarity")] - [System.Text.Json.Serialization.JsonPropertyName("similarity")] - public double? Similarity { get; set; } - - /// - /// 获取或设置相似度阈值下限。 - /// - [Newtonsoft.Json.JsonProperty("similarity_low")] - [System.Text.Json.Serialization.JsonPropertyName("similarity_low")] - public double? SimilarityMinimum { get; set; } - - /// - /// 获取或设置相似问题推荐数量。 - /// - [Newtonsoft.Json.JsonProperty("similar_question_recommend_num")] - [System.Text.Json.Serialization.JsonPropertyName("similar_question_recommend_num")] - public int? SimilarityQuestionRecommendCount { get; set; } - - /// - /// 获取或设置收集用户反馈开关。 - /// - [Newtonsoft.Json.JsonProperty("user_feedback")] - [System.Text.Json.Serialization.JsonPropertyName("user_feedback")] - public bool? UserFeedbackSwitch { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotSaveResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotSaveResponse.cs deleted file mode 100644 index 28442fac..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotSaveResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/bot/save 接口的响应。 - /// - public class BotSaveResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置机器人 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string BotId { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotTestRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotTestRequest.cs deleted file mode 100644 index d0caff82..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotTestRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [GET] /v1/bot/test 接口的请求。 - /// - public class BotTestRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置询问语句。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string QueryString { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotTestResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotTestResponse.cs deleted file mode 100644 index 4f4d5ff0..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Bot/BotTestResponse.cs +++ /dev/null @@ -1,91 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [GET] /v1/bot/test 接口的响应。 - /// - public class BotTestResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class BotState - { - /// - /// 获取或设置机器人配置错误信息。 - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public string? ErrorMessage { get; set; } - - /// - /// 获取或设置最后有效时间字符串。 - /// - [Newtonsoft.Json.JsonProperty("last_effective_time")] - [System.Text.Json.Serialization.JsonPropertyName("last_effective_time")] - public string? LastEffectiveTimeString { get; set; } - } - } - - /// - /// 获取或设置技能 ID。 - /// - [Newtonsoft.Json.JsonProperty("ans_node_id")] - [System.Text.Json.Serialization.JsonPropertyName("ans_node_id")] - public int AnswerNodeId { get; set; } - - /// - /// 获取或设置技能名称。 - /// - [Newtonsoft.Json.JsonProperty("ans_node_name")] - [System.Text.Json.Serialization.JsonPropertyName("ans_node_name")] - public string AnswerNodeName { get; set; } = default!; - - /// - /// 获取或设置回复类型。 - /// - [Newtonsoft.Json.JsonProperty("answer_type")] - [System.Text.Json.Serialization.JsonPropertyName("answer_type")] - public string AnswerType { get; set; } = default!; - - /// - /// 获取或设置回复内容。 - /// - [Newtonsoft.Json.JsonProperty("answer")] - [System.Text.Json.Serialization.JsonPropertyName("answer")] - public string Answer { get; set; } = default!; - - /// - /// 获取或设置意图标题。 - /// - [Newtonsoft.Json.JsonProperty("title")] - [System.Text.Json.Serialization.JsonPropertyName("title")] - public string Title { get; set; } = default!; - - /// - /// 获取或设置回复状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public string Status { get; set; } = default!; - - /// - /// 获取或设置机器人状态信息。 - /// - [Newtonsoft.Json.JsonProperty("bot_state")] - [System.Text.Json.Serialization.JsonPropertyName("bot_state")] - public Types.BotState? BotState { get; set; } - - /// - /// 获取或设置创建时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time")] - [System.Text.Json.Serialization.JsonPropertyName("create_time")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public long CreateTimestamp { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryDeleteRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryDeleteRequest.cs deleted file mode 100644 index e92da9d2..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryDeleteRequest.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/dict/delete 接口的请求。 - /// - public class DictionaryDeleteRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置词典 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("id_list")] - [System.Text.Json.Serialization.JsonPropertyName("id_list")] - public IList DictionaryIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryDeleteResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryDeleteResponse.cs deleted file mode 100644 index 29cb1622..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryDeleteResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/dict/delete 接口的响应。 - /// - public class DictionaryDeleteResponse : WechatOpenAIThirdPartyResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryGetAllListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryGetAllListRequest.cs deleted file mode 100644 index 0b0d6c54..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryGetAllListRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/dict/get_all_list 接口的请求。 - /// - public class DictionaryGetAllListRequest : WechatOpenAIThirdPartyRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryGetAllListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryGetAllListResponse.cs deleted file mode 100644 index 3478cf0e..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryGetAllListResponse.cs +++ /dev/null @@ -1,72 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/dict/get_all_list 接口的响应。 - /// - public class DictionaryGetAllListResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class DictionaryItem - { - /// - /// 获取或设置词典 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public long? DictionaryId { get; set; } - - /// - /// 获取或设置中文名称。 - /// - [Newtonsoft.Json.JsonProperty("name_ch")] - [System.Text.Json.Serialization.JsonPropertyName("name_ch")] - public string ChineseName { get; set; } = default!; - - /// - /// 获取或设置英文名称。 - /// - [Newtonsoft.Json.JsonProperty("name_en")] - [System.Text.Json.Serialization.JsonPropertyName("name_en")] - public string EnglishName { get; set; } = default!; - } - - public class DictionaryList - { - /// - /// 获取或设置词典列表。 - /// - [Newtonsoft.Json.JsonProperty("list")] - [System.Text.Json.Serialization.JsonPropertyName("list")] - public DictionaryItem[] Items { get; set; } = default!; - - /// - /// 获取或设置词典总数量。 - /// - [Newtonsoft.Json.JsonProperty("count")] - [System.Text.Json.Serialization.JsonPropertyName("count")] - public int TotalCount { get; set; } - } - } - - /// - /// 获取或设置系统内置的词典列表。 - /// - [Newtonsoft.Json.JsonProperty("sys")] - [System.Text.Json.Serialization.JsonPropertyName("sys")] - public Types.DictionaryList BuiltinDictionaryList { get; set; } = default!; - - /// - /// 获取或设置自定义的词典列表。 - /// - [Newtonsoft.Json.JsonProperty("user")] - [System.Text.Json.Serialization.JsonPropertyName("user")] - public Types.DictionaryList CustomDictionaryList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryGetBuiltinListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryGetBuiltinListRequest.cs deleted file mode 100644 index 335fdc2f..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryGetBuiltinListRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [GET] /v2/dict/get_builtin_list 接口的请求。 - /// - public class DictionaryGetBuiltinListRequest : WechatOpenAIThirdPartyRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryGetBuiltinListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryGetBuiltinListResponse.cs deleted file mode 100644 index c5930316..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryGetBuiltinListResponse.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [GET] /v2/dict/get_builtin_list 接口的响应。 - /// - public class DictionaryGetBuiltinListResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Dictionary - { - /// - /// 获取或设置中文名称。 - /// - [Newtonsoft.Json.JsonProperty("name_ch")] - [System.Text.Json.Serialization.JsonPropertyName("name_ch")] - public string ChineseName { get; set; } = default!; - - /// - /// 获取或设置英文名称。 - /// - [Newtonsoft.Json.JsonProperty("name_en")] - [System.Text.Json.Serialization.JsonPropertyName("name_en")] - public string EnglishName { get; set; } = default!; - } - } - - /// - /// 获取或设置系统内置的词典列表。 - /// - [Newtonsoft.Json.JsonProperty("list")] - [System.Text.Json.Serialization.JsonPropertyName("list")] - public Types.Dictionary[] DictionaryList { get; set; } = default!; - - /// - /// 获取或设置系统内置的词典总数量。 - /// - [Newtonsoft.Json.JsonProperty("count")] - [System.Text.Json.Serialization.JsonPropertyName("count")] - public int TotalCount { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryGetListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryGetListRequest.cs deleted file mode 100644 index f80fee39..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryGetListRequest.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/dict/get_list 接口的请求。 - /// - public class DictionaryGetListRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置关键词。 - /// - [Newtonsoft.Json.JsonProperty("keyword")] - [System.Text.Json.Serialization.JsonPropertyName("keyword")] - public string? Keyword { get; set; } - - /// - /// 获取或设置分页页数。 - /// 默认值:1 - /// - [Newtonsoft.Json.JsonProperty("page")] - [System.Text.Json.Serialization.JsonPropertyName("page")] - public int Page { get; set; } = 1; - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonProperty("size")] - [System.Text.Json.Serialization.JsonPropertyName("size")] - public int Limit { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryGetListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryGetListResponse.cs deleted file mode 100644 index 707131d2..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionaryGetListResponse.cs +++ /dev/null @@ -1,55 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/dict/get_list 接口的响应。 - /// - public class DictionaryGetListResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Dictionary - { - /// - /// 获取或设置词典 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public long DictionaryId { get; set; } - - /// - /// 获取或设置中文名称。 - /// - [Newtonsoft.Json.JsonProperty("name_ch")] - [System.Text.Json.Serialization.JsonPropertyName("name_ch")] - public string ChineseName { get; set; } = default!; - - /// - /// 获取或设置英文名称。 - /// - [Newtonsoft.Json.JsonProperty("name_en")] - [System.Text.Json.Serialization.JsonPropertyName("name_en")] - public string EnglishName { get; set; } = default!; - } - } - - /// - /// 获取或设置词典列表。 - /// - [Newtonsoft.Json.JsonProperty("list")] - [System.Text.Json.Serialization.JsonPropertyName("list")] - public Types.Dictionary[] DictionaryList { get; set; } = default!; - - /// - /// 获取或设置词典总数量。 - /// - [Newtonsoft.Json.JsonProperty("count")] - [System.Text.Json.Serialization.JsonPropertyName("count")] - public int TotalCount { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionarySaveRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionarySaveRequest.cs deleted file mode 100644 index dbadddf5..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionarySaveRequest.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/dict/save 接口的请求。 - /// - public class DictionarySaveRequest : WechatOpenAIThirdPartyRequest - { - public static class Types - { - public class Dictionary - { - /// - /// 获取或设置词典 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public long? DictionaryId { get; set; } - - /// - /// 获取或设置中文名称。 - /// - [Newtonsoft.Json.JsonProperty("name_ch")] - [System.Text.Json.Serialization.JsonPropertyName("name_ch")] - public string ChineseName { get; set; } = string.Empty; - - /// - /// 获取或设置英文名称。 - /// - [Newtonsoft.Json.JsonProperty("name_en")] - [System.Text.Json.Serialization.JsonPropertyName("name_en")] - public string? EnglishName { get; set; } - } - } - - /// - /// 获取或设置词典列表。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public IList DictionaryList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionarySaveResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionarySaveResponse.cs deleted file mode 100644 index 1783bf54..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Dictionary/DictionarySaveResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/dict/save 接口的响应。 - /// - public class DictionarySaveResponse : WechatOpenAIThirdPartyResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/File/FileUploadRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/File/FileUploadRequest.cs deleted file mode 100644 index 44d57ca1..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/File/FileUploadRequest.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/file/upload 接口的请求。 - /// - public class FileUploadRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置文件字节数组。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public byte[] FileBytes { get; set; } = Array.Empty(); - - /// - /// 获取或设置文件名。如果不指定将由系统自动生成。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string? FileName { get; set; } - - /// - /// 获取或设置文件 Conent-Type。如果不指定将由系统自动生成。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string? FileContentType { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/File/FileUploadResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/File/FileUploadResponse.cs deleted file mode 100644 index bb085d55..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/File/FileUploadResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/file/upload 接口的响应。 - /// - public class FileUploadResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置文件唯一标识。 - /// - [Newtonsoft.Json.JsonProperty("file_key")] - [System.Text.Json.Serialization.JsonPropertyName("file_key")] - public string FileKey { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Config/IntentConfigGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Config/IntentConfigGetRequest.cs deleted file mode 100644 index 0dab2602..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Config/IntentConfigGetRequest.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/intent/config/get 接口的请求。 - /// - public class IntentConfigGetRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置意图 ID。 - /// - [Newtonsoft.Json.JsonProperty("intent_id")] - [System.Text.Json.Serialization.JsonPropertyName("intent_id")] - public long IntentId { get; set; } - - /// - /// 获取或设置技能 ID。 - /// - [Newtonsoft.Json.JsonProperty("skill_id")] - [System.Text.Json.Serialization.JsonPropertyName("skill_id")] - public long SkillId { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Config/IntentConfigGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Config/IntentConfigGetResponse.cs deleted file mode 100644 index b7cc8e2f..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Config/IntentConfigGetResponse.cs +++ /dev/null @@ -1,445 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/intent/config/get 接口的响应。 - /// - public class IntentConfigGetResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Slot - { - /// - /// 获取或设置语义槽名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = default!; - - /// - /// 获取或设置词典名称列表。 - /// - [Newtonsoft.Json.JsonProperty("dicts")] - [System.Text.Json.Serialization.JsonPropertyName("dicts")] - public string[] DictionaryNameList { get; set; } = default!; - - /// - /// 获取或设置是否追问。 - /// - [Newtonsoft.Json.JsonProperty("keep_ask")] - [System.Text.Json.Serialization.JsonPropertyName("keep_ask")] - public bool IsKeepAsk { get; set; } - - /// - /// 获取或设置追问话术列表。 - /// - [Newtonsoft.Json.JsonProperty("ask_content")] - [System.Text.Json.Serialization.JsonPropertyName("ask_content")] - public string[]? AskContentList { get; set; } = default!; - } - - public class Previous - { - /// - /// 获取或设置意图名称。 - /// - [Newtonsoft.Json.JsonProperty("intent")] - [System.Text.Json.Serialization.JsonPropertyName("intent")] - public string IntentName { get; set; } = default!; - - /// - /// 获取或设置技能名称。 - /// - [Newtonsoft.Json.JsonProperty("skill")] - [System.Text.Json.Serialization.JsonPropertyName("skill")] - public string SkillName { get; set; } = default!; - } - - public class Next : Previous - { - } - - public class NormalAnswerConfig - { - public static class Types - { - public class Answer - { - /// - /// 获取或设置类型。 - /// - [Newtonsoft.Json.JsonProperty("type")] - [System.Text.Json.Serialization.JsonPropertyName("type")] - public int Type { get; set; } - - /// - /// 获取或设置回答内容。 - /// - [Newtonsoft.Json.JsonProperty("content")] - [System.Text.Json.Serialization.JsonPropertyName("content")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.DynamicObjectConverter))] - public dynamic Content { get; set; } = default!; - } - } - - /// - /// 获取或设置是否合并。 - /// - [Newtonsoft.Json.JsonProperty("merge_answer")] - [System.Text.Json.Serialization.JsonPropertyName("merge_answer")] - public bool RequireMergeAnswer { get; set; } - - /// - /// 获取或设置回答列表。 - /// - [Newtonsoft.Json.JsonProperty("answer")] - [System.Text.Json.Serialization.JsonPropertyName("answer")] - public Types.Answer[] AnswerList { get; set; } = default!; - } - - public class ApiAnswerConfig - { - public static class Types - { - public class Argument - { - public static class Types - { - public class Item - { - /// - /// 获取或设置参数名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = default!; - - /// - /// 获取或设置是否必填。 - /// - [Newtonsoft.Json.JsonProperty("input")] - [System.Text.Json.Serialization.JsonPropertyName("input")] - public bool IsRequired { get; set; } - - /// - /// 获取或设置参数含义。 - /// - [Newtonsoft.Json.JsonProperty("desc")] - [System.Text.Json.Serialization.JsonPropertyName("desc")] - public string Description { get; set; } = default!; - - /// - /// 获取或设置对应语义槽。 - /// - [Newtonsoft.Json.JsonProperty("slot")] - [System.Text.Json.Serialization.JsonPropertyName("slot")] - public string Slot { get; set; } = default!; - - /// - /// 获取或设置默认值。 - /// - [Newtonsoft.Json.JsonProperty("default_value")] - [System.Text.Json.Serialization.JsonPropertyName("default_value")] - public string DefaultValue { get; set; } = default!; - - /// - /// 获取或设置追问话术列表。 - /// - [Newtonsoft.Json.JsonProperty("ask_content")] - [System.Text.Json.Serialization.JsonPropertyName("ask_content")] - public string[]? AskContentList { get; set; } - } - } - - /// - /// 获取或设置入参列表。 - /// - [Newtonsoft.Json.JsonProperty("input")] - [System.Text.Json.Serialization.JsonPropertyName("input")] - public Types.Item[]? InputArgumentList { get; set; } - - /// - /// 获取或设置出参列表。 - /// - [Newtonsoft.Json.JsonProperty("output")] - [System.Text.Json.Serialization.JsonPropertyName("output")] - public Types.Item[]? OutArgumentList { get; set; } - } - } - - /// - /// 获取或设置服务接口调用 API。 - /// - [Newtonsoft.Json.JsonProperty("api")] - [System.Text.Json.Serialization.JsonPropertyName("api")] - public string Api { get; set; } = default!; - - /// - /// 获取或设置 API 类型。 - /// - [Newtonsoft.Json.JsonProperty("http_method")] - [System.Text.Json.Serialization.JsonPropertyName("http_method")] - public string HttpMethod { get; set; } = default!; - - /// - /// 获取或设置 API 地址。 - /// - [Newtonsoft.Json.JsonProperty("http_url")] - [System.Text.Json.Serialization.JsonPropertyName("http_url")] - public string HttpUrl { get; set; } = default!; - - /// - /// 获取或设置是否征求用户意见。 - /// - [Newtonsoft.Json.JsonProperty("need_confirm")] - [System.Text.Json.Serialization.JsonPropertyName("need_confirm")] - public bool RequireConfirm { get; set; } - - /// - /// 获取或设置征求语句。 - /// - [Newtonsoft.Json.JsonProperty("need_confirm_response")] - [System.Text.Json.Serialization.JsonPropertyName("need_confirm_response")] - public string? ConfirmResponse { get; set; } - - /// - /// 获取或设置参数信息。 - /// - [Newtonsoft.Json.JsonProperty("arguments")] - [System.Text.Json.Serialization.JsonPropertyName("arguments")] - public Types.Argument Argument { get; set; } = default!; - - /// - /// 获取或设置结果列表。 - /// - [Newtonsoft.Json.JsonProperty("result")] - [System.Text.Json.Serialization.JsonPropertyName("result")] - public Result[] ResultList { get; set; } = default!; - } - - public class AskSlotAnswerConfig - { - public static class Types - { - public class Argument - { - /// - /// 获取或设置参数名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = default!; - - /// - /// 获取或设置对应语义槽。 - /// - [Newtonsoft.Json.JsonProperty("slot")] - [System.Text.Json.Serialization.JsonPropertyName("slot")] - public string Slot { get; set; } = default!; - - /// - /// 获取或设置追问话术列表。 - /// - [Newtonsoft.Json.JsonProperty("ask_content")] - [System.Text.Json.Serialization.JsonPropertyName("ask_content")] - public string[]? AskContentList { get; set; } - } - } - - /// - /// 获取或设置语义槽信息追问 API。 - /// - [Newtonsoft.Json.JsonProperty("api")] - [System.Text.Json.Serialization.JsonPropertyName("api")] - public string Api { get; set; } = default!; - - /// - /// 获取或设置参数列表。 - /// - [Newtonsoft.Json.JsonProperty("arguments")] - [System.Text.Json.Serialization.JsonPropertyName("arguments")] - public Types.Argument[]? ArgumentList { get; set; } - - /// - /// 获取或设置结果列表。 - /// - [Newtonsoft.Json.JsonProperty("result")] - [System.Text.Json.Serialization.JsonPropertyName("result")] - public Result[] ResultList { get; set; } = default!; - } - - public class AskAnswerConfig - { - /// - /// 获取或设置机器人提问 API。 - /// - [Newtonsoft.Json.JsonProperty("api")] - [System.Text.Json.Serialization.JsonPropertyName("api")] - public string Api { get; set; } = default!; - - /// - /// 获取或设置问题。 - /// - [Newtonsoft.Json.JsonProperty("question")] - [System.Text.Json.Serialization.JsonPropertyName("question")] - public string Question { get; set; } = default!; - - /// - /// 获取或设置结果列表。 - /// - [Newtonsoft.Json.JsonProperty("result")] - [System.Text.Json.Serialization.JsonPropertyName("result")] - public Result[] ResultList { get; set; } = default!; - } - - public class Result - { - /// - /// 获取或设置错误码。 - /// - [Newtonsoft.Json.JsonProperty("code")] - [System.Text.Json.Serialization.JsonPropertyName("code")] - public string ErrorCode { get; set; } = default!; - - /// - /// 获取或设置错误描述。 - /// - [Newtonsoft.Json.JsonProperty("desc")] - [System.Text.Json.Serialization.JsonPropertyName("desc")] - public string ErrorDescription { get; set; } = default!; - - /// - /// 获取或设置回答配置类型。 - /// - [Newtonsoft.Json.JsonProperty("answer_config_type")] - [System.Text.Json.Serialization.JsonPropertyName("answer_config_type")] - public int AnswerConfigType { get; set; } - - /// - /// 获取或设置回答。 - /// - [Newtonsoft.Json.JsonProperty("answer")] - [System.Text.Json.Serialization.JsonPropertyName("answer")] - public string Answer { get; set; } = default!; - - /// - /// 获取或设置普通技能信息。 - /// - [Newtonsoft.Json.JsonProperty("normal_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("normal_answer_config")] - public NormalAnswerConfig? AnswerConfigForNormal { get; set; } - - /// - /// 获取或设置服务接口调用信息。 - /// - [Newtonsoft.Json.JsonProperty("api_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("api_answer_config")] - public ApiAnswerConfig? AnswerConfigForApi { get; set; } - - /// - /// 获取或设置语义槽追问信息。 - /// - [Newtonsoft.Json.JsonProperty("ask_slot_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("ask_slot_answer_config")] - public AskSlotAnswerConfig? AnswerConfigForAskSlot { get; set; } - - /// - /// 获取或设置机器人提问信息。 - /// - [Newtonsoft.Json.JsonProperty("ask_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("ask_answer_config")] - public AskAnswerConfig? AnswerConfigForAsk { get; set; } - - /// - /// 获取或设置机器人动态提问信息。 - /// - [Newtonsoft.Json.JsonProperty("dynamic_ask_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("dynamic_ask_answer_config")] - public AskAnswerConfig? AnswerConfigForAskDynamic { get; set; } - } - } - - /// - /// 获取或设置语义槽列表。 - /// - [Newtonsoft.Json.JsonProperty("slots")] - [System.Text.Json.Serialization.JsonPropertyName("slots")] - public Types.Slot[] IntentQuestionList { get; set; } = default!; - - /// - /// 获取或设置前置对话列表。 - /// - [Newtonsoft.Json.JsonProperty("pre")] - [System.Text.Json.Serialization.JsonPropertyName("pre")] - public Types.Previous[] PreviousList { get; set; } = default!; - - /// - /// 获取或设置后续对话列表。 - /// - [Newtonsoft.Json.JsonProperty("next")] - [System.Text.Json.Serialization.JsonPropertyName("next")] - public Types.Next[] NextList { get; set; } = default!; - - /// - /// 获取或设置是否追问。 - /// - [Newtonsoft.Json.JsonProperty("keep_ask")] - [System.Text.Json.Serialization.JsonPropertyName("keep_ask")] - public bool IsKeepAsk { get; set; } - - /// - /// 获取或设置最大追问次数。 - /// - [Newtonsoft.Json.JsonProperty("keep_ask_num")] - [System.Text.Json.Serialization.JsonPropertyName("keep_ask_num")] - public int KeepAskCount { get; set; } - - /// - /// 获取或设置回答配置类型。 - /// - [Newtonsoft.Json.JsonProperty("answer_config_type")] - [System.Text.Json.Serialization.JsonPropertyName("answer_config_type")] - public int AnswerConfigType { get; set; } - - /// - /// 获取或设置普通技能信息。 - /// - [Newtonsoft.Json.JsonProperty("normal_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("normal_answer_config")] - public Types.NormalAnswerConfig? AnswerConfigForNormal { get; set; } - - /// - /// 获取或设置服务接口调用信息。 - /// - [Newtonsoft.Json.JsonProperty("api_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("api_answer_config")] - public Types.ApiAnswerConfig? AnswerConfigForApi { get; set; } - - /// - /// 获取或设置语义槽追问信息。 - /// - [Newtonsoft.Json.JsonProperty("ask_slot_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("ask_slot_answer_config")] - public Types.AskSlotAnswerConfig? AnswerConfigForAskSlot { get; set; } - - /// - /// 获取或设置机器人提问信息。 - /// - [Newtonsoft.Json.JsonProperty("ask_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("ask_answer_config")] - public Types.AskAnswerConfig? AnswerConfigForAsk { get; set; } - - /// - /// 获取或设置机器人动态提问信息。 - /// - [Newtonsoft.Json.JsonProperty("dynamic_ask_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("dynamic_ask_answer_config")] - public Types.AskAnswerConfig? AnswerConfigForAskDynamic { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Config/IntentConfigSaveRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Config/IntentConfigSaveRequest.cs deleted file mode 100644 index 18c57442..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Config/IntentConfigSaveRequest.cs +++ /dev/null @@ -1,454 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/intent/config/save 接口的请求。 - /// - public class IntentConfigSaveRequest : WechatOpenAIThirdPartyRequest - { - public static class Types - { - public class Slot - { - /// - /// 获取或设置语义槽名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = string.Empty; - - /// - /// 获取或设置词典名称列表。 - /// - [Newtonsoft.Json.JsonProperty("dicts")] - [System.Text.Json.Serialization.JsonPropertyName("dicts")] - public IList DictionaryNameList { get; set; } = new List(); - - /// - /// 获取或设置是否追问。 - /// - [Newtonsoft.Json.JsonProperty("keep_ask")] - [System.Text.Json.Serialization.JsonPropertyName("keep_ask")] - public bool IsKeepAsk { get; set; } - - /// - /// 获取或设置追问话术列表。 - /// - [Newtonsoft.Json.JsonProperty("ask_content")] - [System.Text.Json.Serialization.JsonPropertyName("ask_content")] - public IList? AskContentList { get; set; } - } - - public class Previous - { - /// - /// 获取或设置意图名称。 - /// - [Newtonsoft.Json.JsonProperty("intent")] - [System.Text.Json.Serialization.JsonPropertyName("intent")] - public string IntentName { get; set; } = string.Empty; - - /// - /// 获取或设置技能名称。 - /// - [Newtonsoft.Json.JsonProperty("skill")] - [System.Text.Json.Serialization.JsonPropertyName("skill")] - public string SkillName { get; set; } = string.Empty; - } - - public class Next : Previous - { - } - - public class NormalAnswerConfig - { - public static class Types - { - public class Answer - { - /// - /// 获取或设置类型。 - /// - [Newtonsoft.Json.JsonProperty("type")] - [System.Text.Json.Serialization.JsonPropertyName("type")] - public int Type { get; set; } - - /// - /// 获取或设置回答内容。 - /// - [Newtonsoft.Json.JsonProperty("content")] - [System.Text.Json.Serialization.JsonPropertyName("content")] - public string Content { get; set; } = string.Empty; - } - } - - /// - /// 获取或设置是否合并。 - /// - [Newtonsoft.Json.JsonProperty("merge_answer")] - [System.Text.Json.Serialization.JsonPropertyName("merge_answer")] - public bool RequireMergeAnswer { get; set; } - - /// - /// 获取或设置回答列表。 - /// - [Newtonsoft.Json.JsonProperty("answer")] - [System.Text.Json.Serialization.JsonPropertyName("answer")] - public IList AnswerList { get; set; } = new List(); - } - - public class ApiAnswerConfig - { - public static class Types - { - public class Argument - { - public static class Types - { - public class Item - { - /// - /// 获取或设置参数名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = string.Empty; - - /// - /// 获取或设置是否必填。 - /// - [Newtonsoft.Json.JsonProperty("input")] - [System.Text.Json.Serialization.JsonPropertyName("input")] - public bool IsRequired { get; set; } - - /// - /// 获取或设置参数含义。 - /// - [Newtonsoft.Json.JsonProperty("desc")] - [System.Text.Json.Serialization.JsonPropertyName("desc")] - public string Description { get; set; } = string.Empty; - - /// - /// 获取或设置对应语义槽。 - /// - [Newtonsoft.Json.JsonProperty("slot")] - [System.Text.Json.Serialization.JsonPropertyName("slot")] - public string Slot { get; set; } = string.Empty; - - /// - /// 获取或设置默认值。 - /// - [Newtonsoft.Json.JsonProperty("default_value")] - [System.Text.Json.Serialization.JsonPropertyName("default_value")] - public string DefaultValue { get; set; } = string.Empty; - - /// - /// 获取或设置追问话术列表。 - /// - [Newtonsoft.Json.JsonProperty("ask_content")] - [System.Text.Json.Serialization.JsonPropertyName("ask_content")] - public IList? AskContentList { get; set; } - } - } - - /// - /// 获取或设置入参列表。 - /// - [Newtonsoft.Json.JsonProperty("input")] - [System.Text.Json.Serialization.JsonPropertyName("input")] - public IList? InputArgumentList { get; set; } - - /// - /// 获取或设置出参列表。 - /// - [Newtonsoft.Json.JsonProperty("output")] - [System.Text.Json.Serialization.JsonPropertyName("output")] - public IList? OutArgumentList { get; set; } - } - } - - /// - /// 获取或设置服务接口调用 API。 - /// - [Newtonsoft.Json.JsonProperty("api")] - [System.Text.Json.Serialization.JsonPropertyName("api")] - public string Api { get; set; } = string.Empty; - - /// - /// 获取或设置 API 类型。 - /// - [Newtonsoft.Json.JsonProperty("http_method")] - [System.Text.Json.Serialization.JsonPropertyName("http_method")] - public string HttpMethod { get; set; } = string.Empty; - - /// - /// 获取或设置 API 地址。 - /// - [Newtonsoft.Json.JsonProperty("http_url")] - [System.Text.Json.Serialization.JsonPropertyName("http_url")] - public string HttpUrl { get; set; } = string.Empty; - - /// - /// 获取或设置是否征求用户意见。 - /// - [Newtonsoft.Json.JsonProperty("need_confirm")] - [System.Text.Json.Serialization.JsonPropertyName("need_confirm")] - public bool RequireConfirm { get; set; } - - /// - /// 获取或设置征求语句。 - /// - [Newtonsoft.Json.JsonProperty("need_confirm_response")] - [System.Text.Json.Serialization.JsonPropertyName("need_confirm_response")] - public string? ConfirmResponse { get; set; } - - /// - /// 获取或设置参数信息。 - /// - [Newtonsoft.Json.JsonProperty("arguments")] - [System.Text.Json.Serialization.JsonPropertyName("arguments")] - public Types.Argument Argument { get; set; } = new Types.Argument(); - - /// - /// 获取或设置结果列表。 - /// - [Newtonsoft.Json.JsonProperty("result")] - [System.Text.Json.Serialization.JsonPropertyName("result")] - public IList ResultList { get; set; } = new List(); - } - - public class AskSlotAnswerConfig - { - public static class Types - { - public class Argument - { - /// - /// 获取或设置参数名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = string.Empty; - - /// - /// 获取或设置对应语义槽。 - /// - [Newtonsoft.Json.JsonProperty("slot")] - [System.Text.Json.Serialization.JsonPropertyName("slot")] - public string Slot { get; set; } = string.Empty; - - /// - /// 获取或设置追问话术列表。 - /// - [Newtonsoft.Json.JsonProperty("ask_content")] - [System.Text.Json.Serialization.JsonPropertyName("ask_content")] - public IList? AskContentList { get; set; } - } - } - - /// - /// 获取或设置语义槽信息追问 API。 - /// - [Newtonsoft.Json.JsonProperty("api")] - [System.Text.Json.Serialization.JsonPropertyName("api")] - public string Api { get; set; } = string.Empty; - - /// - /// 获取或设置参数信息。 - /// - [Newtonsoft.Json.JsonProperty("arguments")] - [System.Text.Json.Serialization.JsonPropertyName("arguments")] - public IList Argument { get; set; } = new List(); - - /// - /// 获取或设置结果列表。 - /// - [Newtonsoft.Json.JsonProperty("result")] - [System.Text.Json.Serialization.JsonPropertyName("result")] - public IList ResultList { get; set; } = new List(); - } - - public class AskAnswerConfig - { - /// - /// 获取或设置机器人提问 API。 - /// - [Newtonsoft.Json.JsonProperty("api")] - [System.Text.Json.Serialization.JsonPropertyName("api")] - public string Api { get; set; } = string.Empty; - - /// - /// 获取或设置问题。 - /// - [Newtonsoft.Json.JsonProperty("question")] - [System.Text.Json.Serialization.JsonPropertyName("question")] - public string Question { get; set; } = string.Empty; - - /// - /// 获取或设置结果列表。 - /// - [Newtonsoft.Json.JsonProperty("result")] - [System.Text.Json.Serialization.JsonPropertyName("result")] - public IList ResultList { get; set; } = new List(); - } - - public class Result - { - /// - /// 获取或设置错误码。 - /// - [Newtonsoft.Json.JsonProperty("code")] - [System.Text.Json.Serialization.JsonPropertyName("code")] - public string ErrorCode { get; set; } = string.Empty; - - /// - /// 获取或设置错误描述。 - /// - [Newtonsoft.Json.JsonProperty("desc")] - [System.Text.Json.Serialization.JsonPropertyName("desc")] - public string ErrorDescription { get; set; } = string.Empty; - - /// - /// 获取或设置回答配置类型。 - /// - [Newtonsoft.Json.JsonProperty("answer_config_type")] - [System.Text.Json.Serialization.JsonPropertyName("answer_config_type")] - public int AnswerConfigType { get; set; } - - /// - /// 获取或设置回答。 - /// - [Newtonsoft.Json.JsonProperty("answer")] - [System.Text.Json.Serialization.JsonPropertyName("answer")] - public string Answer { get; set; } = string.Empty; - - /// - /// 获取或设置普通技能信息。 - /// - [Newtonsoft.Json.JsonProperty("normal_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("normal_answer_config")] - public NormalAnswerConfig? AnswerConfigForNormal { get; set; } - - /// - /// 获取或设置服务接口调用信息。 - /// - [Newtonsoft.Json.JsonProperty("api_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("api_answer_config")] - public ApiAnswerConfig? AnswerConfigForApi { get; set; } - - /// - /// 获取或设置语义槽追问信息。 - /// - [Newtonsoft.Json.JsonProperty("ask_slot_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("ask_slot_answer_config")] - public AskSlotAnswerConfig? AnswerConfigForAskSlot { get; set; } - - /// - /// 获取或设置机器人提问信息。 - /// - [Newtonsoft.Json.JsonProperty("ask_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("ask_answer_config")] - public AskAnswerConfig? AnswerConfigForAsk { get; set; } - - /// - /// 获取或设置机器人动态提问信息。 - /// - [Newtonsoft.Json.JsonProperty("dynamic_ask_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("dynamic_ask_answer_config")] - public AskAnswerConfig? AnswerConfigForAskDynamic { get; set; } - } - } - - /// - /// 获取或设置意图 ID。 - /// - [Newtonsoft.Json.JsonProperty("intent_id")] - [System.Text.Json.Serialization.JsonPropertyName("intent_id")] - public long IntentId { get; set; } - - /// - /// 获取或设置技能 ID。 - /// - [Newtonsoft.Json.JsonProperty("skill_id")] - [System.Text.Json.Serialization.JsonPropertyName("skill_id")] - public long SkillId { get; set; } - - /// - /// 获取或设置语义槽列表。 - /// - [Newtonsoft.Json.JsonProperty("slots")] - [System.Text.Json.Serialization.JsonPropertyName("slots")] - public IList IntentQuestionList { get; set; } = new List(); - - /// - /// 获取或设置前置对话列表。 - /// - [Newtonsoft.Json.JsonProperty("pre")] - [System.Text.Json.Serialization.JsonPropertyName("pre")] - public IList PreviousList { get; set; } = new List(); - - /// - /// 获取或设置后续对话列表。 - /// - [Newtonsoft.Json.JsonProperty("next")] - [System.Text.Json.Serialization.JsonPropertyName("next")] - public IList NextList { get; set; } = new List(); - - /// - /// 获取或设置是否追问。 - /// - [Newtonsoft.Json.JsonProperty("keep_ask")] - [System.Text.Json.Serialization.JsonPropertyName("keep_ask")] - public bool IsKeepAsk { get; set; } - - /// - /// 获取或设置最大追问次数。 - /// - [Newtonsoft.Json.JsonProperty("keep_ask_num")] - [System.Text.Json.Serialization.JsonPropertyName("keep_ask_num")] - public int KeepAskCount { get; set; } - - /// - /// 获取或设置回答配置类型。 - /// - [Newtonsoft.Json.JsonProperty("answer_config_type")] - [System.Text.Json.Serialization.JsonPropertyName("answer_config_type")] - public int AnswerConfigType { get; set; } - - /// - /// 获取或设置普通技能信息。 - /// - [Newtonsoft.Json.JsonProperty("normal_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("normal_answer_config")] - public Types.NormalAnswerConfig? AnswerConfigForNormal { get; set; } - - /// - /// 获取或设置服务接口调用信息。 - /// - [Newtonsoft.Json.JsonProperty("api_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("api_answer_config")] - public Types.ApiAnswerConfig? AnswerConfigForApi { get; set; } - - /// - /// 获取或设置语义槽追问信息。 - /// - [Newtonsoft.Json.JsonProperty("ask_slot_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("ask_slot_answer_config")] - public Types.AskSlotAnswerConfig? AnswerConfigForAskSlot { get; set; } - - /// - /// 获取或设置机器人提问信息。 - /// - [Newtonsoft.Json.JsonProperty("ask_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("ask_answer_config")] - public Types.AskAnswerConfig? AnswerConfigForAsk { get; set; } - - /// - /// 获取或设置机器人动态提问信息。 - /// - [Newtonsoft.Json.JsonProperty("dynamic_ask_answer_config")] - [System.Text.Json.Serialization.JsonPropertyName("dynamic_ask_answer_config")] - public Types.AskAnswerConfig? AnswerConfigForAskDynamic { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Config/IntentConfigSaveResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Config/IntentConfigSaveResponse.cs deleted file mode 100644 index 35c64df0..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Config/IntentConfigSaveResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/intent/config/save 接口的响应。 - /// - public class IntentConfigSaveResponse : WechatOpenAIThirdPartyResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentDeleteRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentDeleteRequest.cs deleted file mode 100644 index c90e9777..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentDeleteRequest.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/intent/delete 接口的请求。 - /// - public class IntentDeleteRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置意图 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("id_list")] - [System.Text.Json.Serialization.JsonPropertyName("id_list")] - public IList IntentIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentDeleteResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentDeleteResponse.cs deleted file mode 100644 index 545ad3c1..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentDeleteResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/intent/delete 接口的响应。 - /// - public class IntentDeleteResponse : WechatOpenAIThirdPartyResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentGetDetailRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentGetDetailRequest.cs deleted file mode 100644 index a3b58ba0..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentGetDetailRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/intent/get_detail 接口的请求。 - /// - public class IntentGetDetailRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置意图 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public long IntentId { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentGetDetailResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentGetDetailResponse.cs deleted file mode 100644 index fc8d8a19..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentGetDetailResponse.cs +++ /dev/null @@ -1,118 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/intent/get_detail 接口的响应。 - /// - public class IntentGetDetailResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Question - { - /// - /// 获取或设置问题 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public long QuestionId { get; set; } - - /// - /// 获取或设置问题内容。 - /// - [Newtonsoft.Json.JsonProperty("question")] - [System.Text.Json.Serialization.JsonPropertyName("question")] - public string Content { get; set; } = default!; - - /// - /// 获取或设置优先级。 - /// - [Newtonsoft.Json.JsonProperty("rank_level")] - [System.Text.Json.Serialization.JsonPropertyName("rank_level")] - public double RankLevel { get; set; } - - /// - /// 获取或设置相似度。 - /// - [Newtonsoft.Json.JsonProperty("threshold")] - [System.Text.Json.Serialization.JsonPropertyName("threshold")] - public double Threshold { get; set; } - - /// - /// 获取或设置是否为反例。 - /// - [Newtonsoft.Json.JsonProperty("counter_example")] - [System.Text.Json.Serialization.JsonPropertyName("counter_example")] - public bool IsCounterExample { get; set; } - } - } - - /// - /// 获取或设置意图 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public long IntentId { get; set; } - - /// - /// 获取或设置技能 ID。 - /// - [Newtonsoft.Json.JsonProperty("skill_id")] - [System.Text.Json.Serialization.JsonPropertyName("skill_id")] - public long SkillId { get; set; } - - /// - /// 获取或设置意图名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = default!; - - /// - /// 获取或设置优先级。 - /// - [Newtonsoft.Json.JsonProperty("rank_level")] - [System.Text.Json.Serialization.JsonPropertyName("rank_level")] - public double RankLevel { get; set; } - - /// - /// 获取或设置相似度。 - /// - [Newtonsoft.Json.JsonProperty("threshold")] - [System.Text.Json.Serialization.JsonPropertyName("threshold")] - public double Threshold { get; set; } - - /// - /// 获取或设置意图开关。 - /// - [Newtonsoft.Json.JsonProperty("switch")] - [System.Text.Json.Serialization.JsonPropertyName("switch")] - public bool Switch { get; set; } - - /// - /// 获取或设置命中次数。 - /// - [Newtonsoft.Json.JsonProperty("frequency")] - [System.Text.Json.Serialization.JsonPropertyName("frequency")] - public int Frequency { get; set; } - - /// - /// 获取或设置意图问题列表。 - /// - [Newtonsoft.Json.JsonProperty("questions")] - [System.Text.Json.Serialization.JsonPropertyName("questions")] - public Types.Question[] QuestionList { get; set; } = default!; - - /// - /// 获取或设置更新时间戳。 - /// - [Newtonsoft.Json.JsonProperty("updated_time")] - [System.Text.Json.Serialization.JsonPropertyName("updated_time")] - public long UpdateTimestamp { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentNameExistRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentNameExistRequest.cs deleted file mode 100644 index 0b224400..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentNameExistRequest.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/intent/name_exist 接口的请求。 - /// - public class IntentNameExistRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置技能 ID。 - /// - [Newtonsoft.Json.JsonProperty("skill_id")] - [System.Text.Json.Serialization.JsonPropertyName("skill_id")] - public long SkillId { get; set; } - - /// - /// 获取或设置意图名称。 - /// - [Newtonsoft.Json.JsonProperty("intent_name")] - [System.Text.Json.Serialization.JsonPropertyName("intent_name")] - public string IntentName { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentNameExistResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentNameExistResponse.cs deleted file mode 100644 index 494237c4..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentNameExistResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/intent/name_exist 接口的响应。 - /// - public class IntentNameExistResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置是否已存在。 - /// - [Newtonsoft.Json.JsonProperty("exist")] - [System.Text.Json.Serialization.JsonPropertyName("exist")] - public bool IsExisted { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentSaveRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentSaveRequest.cs deleted file mode 100644 index 54b78f62..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentSaveRequest.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/intent/save 接口的请求。 - /// - public class IntentSaveRequest : WechatOpenAIThirdPartyRequest - { - public static class Types - { - public class Intent - { - /// - /// 获取或设置意图 ID。 - /// - [Newtonsoft.Json.JsonProperty("intent_id")] - [System.Text.Json.Serialization.JsonPropertyName("intent_id")] - public long? IntentId { get; set; } - - /// - /// 获取或设置技能 ID。 - /// - [Newtonsoft.Json.JsonProperty("skill_id")] - [System.Text.Json.Serialization.JsonPropertyName("skill_id")] - public long SkillId { get; set; } - - /// - /// 获取或设置意图名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = string.Empty; - - /// - /// 获取或设置优先级。 - /// - [Newtonsoft.Json.JsonProperty("rank_level")] - [System.Text.Json.Serialization.JsonPropertyName("rank_level")] - public double RankLevel { get; set; } - - /// - /// 获取或设置相似度。 - /// - [Newtonsoft.Json.JsonProperty("threshold")] - [System.Text.Json.Serialization.JsonPropertyName("threshold")] - public double Threshold { get; set; } - - /// - /// 获取或设置意图开关。 - /// - [Newtonsoft.Json.JsonProperty("switch")] - [System.Text.Json.Serialization.JsonPropertyName("switch")] - public bool Switch { get; set; } - } - } - - /// - /// 获取或设置意图列表。 - /// - [Newtonsoft.Json.JsonProperty("intent_list")] - [System.Text.Json.Serialization.JsonPropertyName("intent_list")] - public IList IntentList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentSaveResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentSaveResponse.cs deleted file mode 100644 index 33ac48df..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentSaveResponse.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/intent/save 接口的响应。 - /// - public class IntentSaveResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - - public static class Types - { - public class Intent - { - /// - /// 获取或设置意图 ID。 - /// - [Newtonsoft.Json.JsonProperty("intent_id")] - [System.Text.Json.Serialization.JsonPropertyName("intent_id")] - public long IntentId { get; set; } - - /// - /// 获取或设置意图名称。 - /// - [Newtonsoft.Json.JsonProperty("intent_name")] - [System.Text.Json.Serialization.JsonPropertyName("intent_name")] - public string Name { get; set; } = default!; - } - } - - /// - /// 获取或设置意图列表。 - /// - [Newtonsoft.Json.JsonProperty("list")] - [System.Text.Json.Serialization.JsonPropertyName("list")] - public Types.Intent[] IntentList { get; set; } = default!; - - /// - /// 获取或设置意图数量。 - /// - [Newtonsoft.Json.JsonProperty("count")] - [System.Text.Json.Serialization.JsonPropertyName("count")] - public int Count { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentSearchRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentSearchRequest.cs deleted file mode 100644 index f998fc71..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentSearchRequest.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/intent/search 接口的请求。 - /// - public class IntentSearchRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置关键字。 - /// - [Newtonsoft.Json.JsonProperty("keyword")] - [System.Text.Json.Serialization.JsonPropertyName("keyword")] - public string? Keyword { get; set; } - - /// - /// 获取或设置分页页数。 - /// 默认值:1 - /// - [Newtonsoft.Json.JsonProperty("page")] - [System.Text.Json.Serialization.JsonPropertyName("page")] - public int Page { get; set; } = 1; - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonProperty("size")] - [System.Text.Json.Serialization.JsonPropertyName("size")] - public int Limit { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentSearchResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentSearchResponse.cs deleted file mode 100644 index 7d6d5386..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentSearchResponse.cs +++ /dev/null @@ -1,62 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/intent/search 接口的响应。 - /// - public class IntentSearchResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Intent - { - /// - /// 获取或设置意图 ID。 - /// - [Newtonsoft.Json.JsonProperty("intent_id")] - [System.Text.Json.Serialization.JsonPropertyName("intent_id")] - public long IntentId { get; set; } - - /// - /// 获取或设置意图名称。 - /// - [Newtonsoft.Json.JsonProperty("intent_name")] - [System.Text.Json.Serialization.JsonPropertyName("intent_name")] - public string IntentName { get; set; } = default!; - - /// - /// 获取或设置技能 ID。 - /// - [Newtonsoft.Json.JsonProperty("skill_id")] - [System.Text.Json.Serialization.JsonPropertyName("skill_id")] - public long SkillId { get; set; } - - /// - /// 获取或设置技能名称。 - /// - [Newtonsoft.Json.JsonProperty("skill_name")] - [System.Text.Json.Serialization.JsonPropertyName("skill_name")] - public string SkillName { get; set; } = default!; - } - } - - /// - /// 获取或设置意图列表。 - /// - [Newtonsoft.Json.JsonProperty("list")] - [System.Text.Json.Serialization.JsonPropertyName("list")] - public Types.Intent[] IntentList { get; set; } = default!; - - /// - /// 获取或设置意图总数量。 - /// - [Newtonsoft.Json.JsonProperty("count")] - [System.Text.Json.Serialization.JsonPropertyName("count")] - public int TotalCount { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentSwitchBatchRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentSwitchBatchRequest.cs deleted file mode 100644 index 2b8a572e..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentSwitchBatchRequest.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/intent/switch/batch 接口的请求。 - /// - public class IntentSwitchBatchRequest : WechatOpenAIThirdPartyRequest - { - public static class Types - { - public class Intent - { - /// - /// 获取或设置意图 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public long IntentId { get; set; } - - /// - /// 获取或设置意图开关。 - /// - [Newtonsoft.Json.JsonProperty("switch")] - [System.Text.Json.Serialization.JsonPropertyName("switch")] - public bool Switch { get; set; } - } - } - - /// - /// 获取或设置意图列表。 - /// - [Newtonsoft.Json.JsonProperty("switch_list")] - [System.Text.Json.Serialization.JsonPropertyName("switch_list")] - public IList IntentList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentSwitchBatchResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentSwitchBatchResponse.cs deleted file mode 100644 index 2af12770..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/IntentSwitchBatchResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/intent/switch/batch 接口的响应。 - /// - public class IntentSwitchBatchResponse : WechatOpenAIThirdPartyResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Question/IntentQuestionDeleteRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Question/IntentQuestionDeleteRequest.cs deleted file mode 100644 index f1a171f3..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Question/IntentQuestionDeleteRequest.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/intent/question/delete 接口的请求。 - /// - public class IntentQuestionDeleteRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置意图问题 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("id_list")] - [System.Text.Json.Serialization.JsonPropertyName("id_list")] - public IList IntentQuestionIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Question/IntentQuestionDeleteResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Question/IntentQuestionDeleteResponse.cs deleted file mode 100644 index baf250ee..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Question/IntentQuestionDeleteResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/intent/question/delete 接口的响应。 - /// - public class IntentQuestionDeleteResponse : WechatOpenAIThirdPartyResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Question/IntentQuestionSaveRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Question/IntentQuestionSaveRequest.cs deleted file mode 100644 index 318ce370..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Question/IntentQuestionSaveRequest.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/intent/question/save 接口的请求。 - /// - public class IntentQuestionSaveRequest : WechatOpenAIThirdPartyRequest - { - public static class Types - { - public class Question - { - /// - /// 获取或设置问题 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public long QuestionId { get; set; } - - /// - /// 获取或设置问题内容。 - /// - [Newtonsoft.Json.JsonProperty("question")] - [System.Text.Json.Serialization.JsonPropertyName("question")] - public string Content { get; set; } = string.Empty; - - /// - /// 获取或设置优先级。 - /// - [Newtonsoft.Json.JsonProperty("rank_level")] - [System.Text.Json.Serialization.JsonPropertyName("rank_level")] - public double RankLevel { get; set; } - - /// - /// 获取或设置相似度。 - /// - [Newtonsoft.Json.JsonProperty("threshold")] - [System.Text.Json.Serialization.JsonPropertyName("threshold")] - public double Threshold { get; set; } - - /// - /// 获取或设置是否为反例。 - /// - [Newtonsoft.Json.JsonProperty("counter_example")] - [System.Text.Json.Serialization.JsonPropertyName("counter_example")] - public bool IsCounterExample { get; set; } - } - } - - /// - /// 获取或设置保存模式。 - /// - [Newtonsoft.Json.JsonProperty("mode")] - [System.Text.Json.Serialization.JsonPropertyName("mode")] - public int Mode { get; set; } - - /// - /// 获取或设置意图 ID。 - /// - [Newtonsoft.Json.JsonProperty("intent_id")] - [System.Text.Json.Serialization.JsonPropertyName("intent_id")] - public long IntentId { get; set; } - - /// - /// 获取或设置意图名称。 - /// - [Newtonsoft.Json.JsonProperty("intent_name")] - [System.Text.Json.Serialization.JsonPropertyName("intent_name")] - public string? IntentName { get; set; } - - /// - /// 获取或设置技能 ID。 - /// - [Newtonsoft.Json.JsonProperty("skill_id")] - [System.Text.Json.Serialization.JsonPropertyName("skill_id")] - public long SkillId { get; set; } - - /// - /// 获取或设置技能名称。 - /// - [Newtonsoft.Json.JsonProperty("skill_name")] - [System.Text.Json.Serialization.JsonPropertyName("skill_name")] - public string? SkillName { get; set; } - - /// - /// 获取或设置意图问题列表。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public IList IntentQuestionList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Question/IntentQuestionSaveResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Question/IntentQuestionSaveResponse.cs deleted file mode 100644 index c42c3aa4..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Intent/Question/IntentQuestionSaveResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/intent/question/save 接口的响应。 - /// - public class IntentQuestionSaveResponse : WechatOpenAIThirdPartyResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/OpenApi/OpenApiCreateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/OpenApi/OpenApiCreateRequest.cs deleted file mode 100644 index 517b0d5a..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/OpenApi/OpenApiCreateRequest.cs +++ /dev/null @@ -1,43 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/openapi/create 接口的请求。 - /// - public class OpenApiCreateRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置联系人名字。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = string.Empty; - - /// - /// 获取或设置联系电话。 - /// - [Newtonsoft.Json.JsonProperty("phone")] - [System.Text.Json.Serialization.JsonPropertyName("phone")] - public string PhoneNumber { get; set; } = string.Empty; - - /// - /// 获取或设置微信号。 - /// - [Newtonsoft.Json.JsonProperty("wechat")] - [System.Text.Json.Serialization.JsonPropertyName("wechat")] - public string Wechat { get; set; } = string.Empty; - - /// - /// 获取或设置邮箱。 - /// - [Newtonsoft.Json.JsonProperty("email")] - [System.Text.Json.Serialization.JsonPropertyName("email")] - public string Email { get; set; } = string.Empty; - - /// - /// 获取或设置地址。 - /// - [Newtonsoft.Json.JsonProperty("address")] - [System.Text.Json.Serialization.JsonPropertyName("address")] - public string? Address { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/OpenApi/OpenApiCreateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/OpenApi/OpenApiCreateResponse.cs deleted file mode 100644 index 507c3115..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/OpenApi/OpenApiCreateResponse.cs +++ /dev/null @@ -1,35 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/openapi/create 接口的响应。 - /// - public class OpenApiCreateResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置 AppId。 - /// - [Newtonsoft.Json.JsonProperty("appid")] - [System.Text.Json.Serialization.JsonPropertyName("appid")] - public string AppId { get; set; } = default!; - - /// - /// 获取或设置 Token。 - /// - [Newtonsoft.Json.JsonProperty("token")] - [System.Text.Json.Serialization.JsonPropertyName("token")] - public string Token { get; set; } = default!; - - /// - /// 获取或设置 EncodingAESKey。 - /// - [Newtonsoft.Json.JsonProperty("aes_key")] - [System.Text.Json.Serialization.JsonPropertyName("aes_key")] - public string EncodingAESKey { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/OpenApi/OpenApiGetDetailRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/OpenApi/OpenApiGetDetailRequest.cs deleted file mode 100644 index 5c85582c..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/OpenApi/OpenApiGetDetailRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [GET] /v1/openapi/get_detail 接口的请求。 - /// - public class OpenApiGetDetailRequest : WechatOpenAIThirdPartyRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/OpenApi/OpenApiGetDetailResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/OpenApi/OpenApiGetDetailResponse.cs deleted file mode 100644 index d469532f..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/OpenApi/OpenApiGetDetailResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [GET] /v1/openapi/get_detail 接口的响应。 - /// - public class OpenApiGetDetailResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data : OpenApiCreateResponse.Types.Data - { - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/OpenApi/OpenApiResetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/OpenApi/OpenApiResetRequest.cs deleted file mode 100644 index 7afdd405..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/OpenApi/OpenApiResetRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/openapi/reset 接口的请求。 - /// - public class OpenApiResetRequest : WechatOpenAIThirdPartyRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/OpenApi/OpenApiResetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/OpenApi/OpenApiResetResponse.cs deleted file mode 100644 index 1f34bbed..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/OpenApi/OpenApiResetResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/openapi/reset 接口的响应。 - /// - public class OpenApiResetResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data : OpenApiCreateResponse.Types.Data - { - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillDeleteRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillDeleteRequest.cs deleted file mode 100644 index f0f4144a..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillDeleteRequest.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/skill/delete 接口的请求。 - /// - public class SkillDeleteRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置技能 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public IList SkillIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillDeleteResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillDeleteResponse.cs deleted file mode 100644 index fe24d1cf..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillDeleteResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/skill/delete 接口的响应。 - /// - public class SkillDeleteResponse : WechatOpenAIThirdPartyResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillGetDetailRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillGetDetailRequest.cs deleted file mode 100644 index c877b9e9..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillGetDetailRequest.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/skill/get_detail 接口的请求。 - /// - public class SkillGetDetailRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置关键字。 - /// - [Newtonsoft.Json.JsonProperty("keyword")] - [System.Text.Json.Serialization.JsonPropertyName("keyword")] - public string? Keyword { get; set; } - - /// - /// 获取或设置技能 ID。 - /// - [Newtonsoft.Json.JsonProperty("skill_id")] - [System.Text.Json.Serialization.JsonPropertyName("skill_id")] - public long SkillId { get; set; } - - /// - /// 获取或设置分页页数。 - /// 默认值:1 - /// - [Newtonsoft.Json.JsonProperty("page")] - [System.Text.Json.Serialization.JsonPropertyName("page")] - public int Page { get; set; } = 1; - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonProperty("size")] - [System.Text.Json.Serialization.JsonPropertyName("size")] - public int Limit { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillGetDetailResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillGetDetailResponse.cs deleted file mode 100644 index c7086843..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillGetDetailResponse.cs +++ /dev/null @@ -1,117 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/skill/get_detail 接口的响应。 - /// - public class SkillGetDetailResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Skill : SkillGetListResponse.Types.Data.Types.Skill - { - /// - /// 获取或设置技能开关。 - /// - [Newtonsoft.Json.JsonProperty("switch")] - [System.Text.Json.Serialization.JsonPropertyName("switch")] - public bool Switch { get; set; } - } - - public class IntentItem - { - /// - /// 获取或设置意图 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public long IntentId { get; set; } - - /// - /// 获取或设置意图名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = default!; - - /// - /// 获取或设置技能 ID。 - /// - [Newtonsoft.Json.JsonProperty("skill_id")] - [System.Text.Json.Serialization.JsonPropertyName("skill_id")] - public long SkillId { get; set; } - - /// - /// 获取或设置优先级。 - /// - [Newtonsoft.Json.JsonProperty("rank_level")] - [System.Text.Json.Serialization.JsonPropertyName("rank_level")] - public double RankLevel { get; set; } - - /// - /// 获取或设置相似度。 - /// - [Newtonsoft.Json.JsonProperty("threshold")] - [System.Text.Json.Serialization.JsonPropertyName("threshold")] - public double Threshold { get; set; } - - /// - /// 获取或设置意图开关。 - /// - [Newtonsoft.Json.JsonProperty("switch")] - [System.Text.Json.Serialization.JsonPropertyName("switch")] - public bool Switch { get; set; } - - /// - /// 获取或设置创建时间戳。 - /// - [Newtonsoft.Json.JsonProperty("created_time")] - [System.Text.Json.Serialization.JsonPropertyName("created_time")] - public long CreateTimestamp { get; set; } - - /// - /// 获取或设置修改时间戳。 - /// - [Newtonsoft.Json.JsonProperty("updated_time")] - [System.Text.Json.Serialization.JsonPropertyName("updated_time")] - public long UpdateTimestamp { get; set; } - } - - public class IntentList - { - /// - /// 获取或设置意图列表。 - /// - [Newtonsoft.Json.JsonProperty("list")] - [System.Text.Json.Serialization.JsonPropertyName("list")] - public IntentItem[] Items { get; set; } = default!; - - /// - /// 获取或设置意图数量。 - /// - [Newtonsoft.Json.JsonProperty("count")] - [System.Text.Json.Serialization.JsonPropertyName("count")] - public int Count { get; set; } - } - } - - /// - /// 获取或设置技能信息。 - /// - [Newtonsoft.Json.JsonProperty("skill")] - [System.Text.Json.Serialization.JsonPropertyName("skill")] - public Types.Skill Skill { get; set; } = default!; - - /// - /// 获取或设置意图列表。 - /// - [Newtonsoft.Json.JsonProperty("intents")] - [System.Text.Json.Serialization.JsonPropertyName("intents")] - public Types.IntentList IntentList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillGetListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillGetListRequest.cs deleted file mode 100644 index 5170e7dc..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillGetListRequest.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/skill/get_list 接口的请求。 - /// - public class SkillGetListRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置关键字。 - /// - [Newtonsoft.Json.JsonProperty("keyword")] - [System.Text.Json.Serialization.JsonPropertyName("keyword")] - public string? Keyword { get; set; } - - /// - /// 获取或设置技能类型。 - /// - [Newtonsoft.Json.JsonProperty("skill_type")] - [System.Text.Json.Serialization.JsonPropertyName("skill_type")] - public int? SkillType { get; set; } - - /// - /// 获取或设置分页页数。 - /// 默认值:1 - /// - [Newtonsoft.Json.JsonProperty("page")] - [System.Text.Json.Serialization.JsonPropertyName("page")] - public int Page { get; set; } = 1; - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonProperty("size")] - [System.Text.Json.Serialization.JsonPropertyName("size")] - public int Limit { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillGetListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillGetListResponse.cs deleted file mode 100644 index feb77b6e..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillGetListResponse.cs +++ /dev/null @@ -1,132 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/skill/get_list 接口的响应。 - /// - public class SkillGetListResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Skill - { - /// - /// 获取或设置技能 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public long SkillId { get; set; } - - /// - /// 获取或设置技能名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = default!; - - /// - /// 获取或设置技能类型。 - /// - [Newtonsoft.Json.JsonProperty("type")] - [System.Text.Json.Serialization.JsonPropertyName("type")] - public int SkillType { get; set; } - - /// - /// 获取或设置意图数量。 - /// - [Newtonsoft.Json.JsonProperty("intent_count")] - [System.Text.Json.Serialization.JsonPropertyName("intent_count")] - public int IntentCount { get; set; } - - /// - /// 获取或设置未配置回答的意图数量。 - /// - [Newtonsoft.Json.JsonProperty("no_answer_intent_count")] - [System.Text.Json.Serialization.JsonPropertyName("no_answer_intent_count")] - public int NoAnswerIntentCount { get; set; } - - /// - /// 获取或设置场景存活的最大轮数。 - /// - [Newtonsoft.Json.JsonProperty("max_round")] - [System.Text.Json.Serialization.JsonPropertyName("max_round")] - public int MaxRound { get; set; } - - /// - /// 获取或设置唤醒开关。 - /// - [Newtonsoft.Json.JsonProperty("wake_open")] - [System.Text.Json.Serialization.JsonPropertyName("wake_open")] - public bool WakeSwitch { get; set; } - - /// - /// 获取或设置唤醒热词。 - /// - [Newtonsoft.Json.JsonProperty("awaken_word")] - [System.Text.Json.Serialization.JsonPropertyName("awaken_word")] - public string? AwakeWord { get; set; } - - /// - /// 获取或设置唤醒的回复语句列表。 - /// - [Newtonsoft.Json.JsonProperty("awaken_answer")] - [System.Text.Json.Serialization.JsonPropertyName("awaken_answer")] - public string[]? AwakeAnswerList { get; set; } - - /// - /// 获取或设置退出热词。 - /// - [Newtonsoft.Json.JsonProperty("exist_word")] - [System.Text.Json.Serialization.JsonPropertyName("exist_word")] - public string? ExistWord { get; set; } - - /// - /// 获取或设置退出的回复语句列表。 - /// - [Newtonsoft.Json.JsonProperty("exist_answer")] - [System.Text.Json.Serialization.JsonPropertyName("exist_answer")] - public string[]? ExitAnswerList { get; set; } - - /// - /// 获取或设置取消意图操作。 - /// - [Newtonsoft.Json.JsonProperty("cancel_intent_operation")] - [System.Text.Json.Serialization.JsonPropertyName("cancel_intent_operation")] - public bool CancelIntentOperation { get; set; } - - /// - /// 获取或设置取消操作的回复列表。 - /// - [Newtonsoft.Json.JsonProperty("cancel_answer")] - [System.Text.Json.Serialization.JsonPropertyName("cancel_answer")] - public string[]? CancelAnswerList { get; set; } - - /// - /// 获取或设置没有可取消意图时的回复列表。 - /// - [Newtonsoft.Json.JsonProperty("no_cancel_answer")] - [System.Text.Json.Serialization.JsonPropertyName("no_cancel_answer")] - public string[]? NoCancelAnswerList { get; set; } - } - } - - /// - /// 获取或设置技能列表。 - /// - [Newtonsoft.Json.JsonProperty("list")] - [System.Text.Json.Serialization.JsonPropertyName("list")] - public Types.Skill[] SkillList { get; set; } = default!; - - /// - /// 获取或设置技能总数量。 - /// - [Newtonsoft.Json.JsonProperty("count")] - [System.Text.Json.Serialization.JsonPropertyName("count")] - public int TotalCount { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillSaveRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillSaveRequest.cs deleted file mode 100644 index d093f2dc..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillSaveRequest.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/skill/save 接口的请求。 - /// - public class SkillSaveRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置技能 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public long? SkillId { get; set; } - - /// - /// 获取或设置技能名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = string.Empty; - - /// - /// 获取或设置技能类型。 - /// - [Newtonsoft.Json.JsonProperty("type")] - [System.Text.Json.Serialization.JsonPropertyName("type")] - public int? SkillType { get; set; } - - /// - /// 获取或设置场景存活的最大轮数。 - /// - [Newtonsoft.Json.JsonProperty("max_round")] - [System.Text.Json.Serialization.JsonPropertyName("max_round")] - public int? MaxRound { get; set; } - - /// - /// 获取或设置唤醒开关。 - /// - [Newtonsoft.Json.JsonProperty("wake_open")] - [System.Text.Json.Serialization.JsonPropertyName("wake_open")] - public bool? WakeSwitch { get; set; } - - /// - /// 获取或设置唤醒热词。 - /// - [Newtonsoft.Json.JsonProperty("awaken_word")] - [System.Text.Json.Serialization.JsonPropertyName("awaken_word")] - public string? AwakeWord { get; set; } - - /// - /// 获取或设置唤醒的回复语句列表。 - /// - [Newtonsoft.Json.JsonProperty("awaken_answer")] - [System.Text.Json.Serialization.JsonPropertyName("awaken_answer")] - public IList? AwakeAnswerList { get; set; } - - /// - /// 获取或设置退出热词。 - /// - [Newtonsoft.Json.JsonProperty("exist_word")] - [System.Text.Json.Serialization.JsonPropertyName("exist_word")] - public string? ExistWord { get; set; } - - /// - /// 获取或设置退出的回复语句列表。 - /// - [Newtonsoft.Json.JsonProperty("exist_answer")] - [System.Text.Json.Serialization.JsonPropertyName("exist_answer")] - public IList? ExitAnswerList { get; set; } - - /// - /// 获取或设置取消意图操作。 - /// - [Newtonsoft.Json.JsonProperty("cancel_intent_operation")] - [System.Text.Json.Serialization.JsonPropertyName("cancel_intent_operation")] - public bool? CancelIntentOperation { get; set; } - - /// - /// 获取或设置取消操作的回复列表。 - /// - [Newtonsoft.Json.JsonProperty("cancel_answer")] - [System.Text.Json.Serialization.JsonPropertyName("cancel_answer")] - public IList? CancelAnswerList { get; set; } - - /// - /// 获取或设置没有可取消意图时的回复列表。 - /// - [Newtonsoft.Json.JsonProperty("no_cancel_answer")] - [System.Text.Json.Serialization.JsonPropertyName("no_cancel_answer")] - public IList? NoCancelAnswerList { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillSaveResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillSaveResponse.cs deleted file mode 100644 index f545aa1e..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Skill/SkillSaveResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/skill/save 接口的响应。 - /// - public class SkillSaveResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置技能 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public long SkillId { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreBotAcquireStateUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreBotAcquireStateUpdateRequest.cs deleted file mode 100644 index 6c9d0f10..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreBotAcquireStateUpdateRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/skill_store/bot_acquire_state/update 接口的请求。 - /// - public class SkillStoreBotAcquireStateUpdateRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置技能 ID。 - /// - [Newtonsoft.Json.JsonProperty("skill_id")] - [System.Text.Json.Serialization.JsonPropertyName("skill_id")] - public string SkillId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreBotAcquireStateUpdateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreBotAcquireStateUpdateResponse.cs deleted file mode 100644 index 65b81e88..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreBotAcquireStateUpdateResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/skill_store/bot_acquire_state/update 接口的响应。 - /// - public class SkillStoreBotAcquireStateUpdateResponse : WechatOpenAIThirdPartyResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreBotSwitchStateUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreBotSwitchStateUpdateRequest.cs deleted file mode 100644 index cfe07b02..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreBotSwitchStateUpdateRequest.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/skill_store/bot_switch_state/update 接口的请求。 - /// - public class SkillStoreBotSwitchStateUpdateRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置技能 ID。 - /// - [Newtonsoft.Json.JsonProperty("skill_id")] - [System.Text.Json.Serialization.JsonPropertyName("skill_id")] - public string SkillId { get; set; } = string.Empty; - - /// - /// 获取或设置要开启技能开关的机器人 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("on_bot_id_list")] - [System.Text.Json.Serialization.JsonPropertyName("on_bot_id_list")] - public IList OnBotIdList { get; set; } = new List(); - - /// - /// 获取或设置要关闭技能开关的机器人 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("off_bot_id_list")] - [System.Text.Json.Serialization.JsonPropertyName("off_bot_id_list")] - public IList OffBotIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreBotSwitchStateUpdateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreBotSwitchStateUpdateResponse.cs deleted file mode 100644 index bab5400c..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreBotSwitchStateUpdateResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/skill_store/bot_switch_state/update 接口的响应。 - /// - public class SkillStoreBotSwitchStateUpdateResponse : WechatOpenAIThirdPartyResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreBuiltinSkillSwitchUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreBuiltinSkillSwitchUpdateRequest.cs deleted file mode 100644 index 1a435723..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreBuiltinSkillSwitchUpdateRequest.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/skill_store/builtin_skill_switch/update 接口的请求。 - /// - public class SkillStoreBuiltinSkillSwitchUpdateRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置技能名称。 - /// - [Newtonsoft.Json.JsonProperty("skill_name")] - [System.Text.Json.Serialization.JsonPropertyName("skill_name")] - public string SkillName { get; set; } = string.Empty; - - /// - /// 获取或设置要开启技能开关的机器人 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("on_bot_id_list")] - [System.Text.Json.Serialization.JsonPropertyName("on_bot_id_list")] - public IList OnBotIdList { get; set; } = new List(); - - /// - /// 获取或设置要关闭技能开关的机器人 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("off_bot_id_list")] - [System.Text.Json.Serialization.JsonPropertyName("off_bot_id_list")] - public IList OffBotIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreBuiltinSkillSwitchUpdateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreBuiltinSkillSwitchUpdateResponse.cs deleted file mode 100644 index 0576fcfb..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreBuiltinSkillSwitchUpdateResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/skill_store/builtin_skill_switch/update 接口的响应。 - /// - public class SkillStoreBuiltinSkillSwitchUpdateResponse : WechatOpenAIThirdPartyResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreGetListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreGetListRequest.cs deleted file mode 100644 index 6e57c341..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreGetListRequest.cs +++ /dev/null @@ -1,45 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/skill_store/get_list 接口的请求。 - /// - public class SkillStoreGetListRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置关键字。 - /// - [Newtonsoft.Json.JsonProperty("keyword")] - [System.Text.Json.Serialization.JsonPropertyName("keyword")] - public string? Keyword { get; set; } - - /// - /// 获取或设置技能类别。 - /// - [Newtonsoft.Json.JsonProperty("category")] - [System.Text.Json.Serialization.JsonPropertyName("category")] - public string? Category { get; set; } - - /// - /// 获取或设置分类字段。 - /// - [Newtonsoft.Json.JsonProperty("order")] - [System.Text.Json.Serialization.JsonPropertyName("order")] - public int Order { get; set; } - - /// - /// 获取或设置分页页数。 - /// 默认值:1 - /// - [Newtonsoft.Json.JsonProperty("page")] - [System.Text.Json.Serialization.JsonPropertyName("page")] - public int Page { get; set; } = 1; - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonProperty("size")] - [System.Text.Json.Serialization.JsonPropertyName("size")] - public int Limit { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreGetListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreGetListResponse.cs deleted file mode 100644 index 927e6d39..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/SkillStore/SkillStoreGetListResponse.cs +++ /dev/null @@ -1,151 +0,0 @@ -using System; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/skill_store/get_list 接口的响应。 - /// - public class SkillStoreGetListResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Skill - { - public static class Types - { - public class Bot - { - /// - /// 获取或设置机器人总数。 - /// - [Newtonsoft.Json.JsonProperty("count")] - [System.Text.Json.Serialization.JsonPropertyName("count")] - public int TotalCount { get; set; } - - /// - /// 获取或设置开启的机器人数。 - /// - [Newtonsoft.Json.JsonProperty("on_num")] - [System.Text.Json.Serialization.JsonPropertyName("on_num")] - public int OnCount { get; set; } - } - } - - /// - /// 获取或设置技能 ID。 - /// - [Newtonsoft.Json.JsonProperty("skill_id")] - [System.Text.Json.Serialization.JsonPropertyName("skill_id")] - public string SkillId { get; set; } = default!; - - /// - /// 获取或设置技能名称。 - /// - [Newtonsoft.Json.JsonProperty("skill_name")] - [System.Text.Json.Serialization.JsonPropertyName("skill_name")] - public string SkillName { get; set; } = default!; - - /// - /// 获取或设置机器人名称。 - /// - [Newtonsoft.Json.JsonProperty("bot_name")] - [System.Text.Json.Serialization.JsonPropertyName("bot_name")] - public string BotName { get; set; } = default!; - - /// - /// 获取或设置是否已获取。 - /// - [Newtonsoft.Json.JsonProperty("acquired")] - [System.Text.Json.Serialization.JsonPropertyName("acquired")] - public bool IsAcquired { get; set; } - - /// - /// 获取或设置获取时间。 - /// - [Newtonsoft.Json.JsonProperty("acquired_time")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RegularNullableDateTimeOffsetConverter))] - [System.Text.Json.Serialization.JsonPropertyName("acquired_time")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RegularNullableDateTimeOffsetConverter))] - public DateTimeOffset? AcquireTime { get; set; } - - /// - /// 获取或设置机器人信息。 - /// - [Newtonsoft.Json.JsonProperty("bot_info")] - [System.Text.Json.Serialization.JsonPropertyName("bot_info")] - public Types.Bot Bot { get; set; } = default!; - - /// - /// 获取或设置分类。 - /// - [Newtonsoft.Json.JsonProperty("category")] - [System.Text.Json.Serialization.JsonPropertyName("category")] - public string Category { get; set; } = default!; - - /// - /// 获取或设置描述。 - /// - [Newtonsoft.Json.JsonProperty("desc")] - [System.Text.Json.Serialization.JsonPropertyName("desc")] - public string Description { get; set; } = default!; - - /// - /// 获取或设置热度。 - /// - [Newtonsoft.Json.JsonProperty("hot")] - [System.Text.Json.Serialization.JsonPropertyName("hot")] - public int Hot { get; set; } - - /// - /// 获取或设置话术举例列表。 - /// - [Newtonsoft.Json.JsonProperty("statement_case_list")] - [System.Text.Json.Serialization.JsonPropertyName("statement_case_list")] - public string[] StatementCaseList { get; set; } = default!; - - /// - /// 获取或设置状态。 - /// - [Newtonsoft.Json.JsonProperty("state")] - [System.Text.Json.Serialization.JsonPropertyName("state")] - public int State { get; set; } - - /// - /// 获取或设置技能开关。 - /// - [Newtonsoft.Json.JsonProperty("switch")] - [System.Text.Json.Serialization.JsonPropertyName("switch")] - public bool Switch { get; set; } - - /// - /// 获取或设置修改时间。 - /// - [Newtonsoft.Json.JsonProperty("update_time")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RegularDateTimeOffsetConverter))] - [System.Text.Json.Serialization.JsonPropertyName("update_time")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RegularDateTimeOffsetConverter))] - public DateTimeOffset UpdateTime { get; set; } - } - } - - /// - /// 获取或设置技能列表。 - /// - [Newtonsoft.Json.JsonProperty("list")] - [System.Text.Json.Serialization.JsonPropertyName("list")] - public Types.Skill[] SkillList { get; set; } = default!; - - /// - /// 获取或设置技能总数量。 - /// - [Newtonsoft.Json.JsonProperty("count")] - [System.Text.Json.Serialization.JsonPropertyName("count")] - public int TotalCount { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Slot/SlotDeleteRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Slot/SlotDeleteRequest.cs deleted file mode 100644 index cf84b9d7..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Slot/SlotDeleteRequest.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/slot/delete 接口的请求。 - /// - public class SlotDeleteRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置语义槽 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("id_list")] - [System.Text.Json.Serialization.JsonPropertyName("id_list")] - public IList SlotIdList { get; set; } = new List(); - - /// - /// 获取或设置意图 ID。 - /// - [Newtonsoft.Json.JsonProperty("intent_id")] - [System.Text.Json.Serialization.JsonPropertyName("intent_id")] - public long? IntentId { get; set; } - - /// - /// 获取或设置是否删除语义槽。 - /// - [Newtonsoft.Json.JsonProperty("auto_delete_slot")] - [System.Text.Json.Serialization.JsonPropertyName("auto_delete_slot")] - public bool? AutoDeleteSlot { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Slot/SlotDeleteResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Slot/SlotDeleteResponse.cs deleted file mode 100644 index f44d7dbe..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Slot/SlotDeleteResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/slot/delete 接口的响应。 - /// - public class SlotDeleteResponse : WechatOpenAIThirdPartyResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Slot/SlotGetListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Slot/SlotGetListRequest.cs deleted file mode 100644 index d393a820..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Slot/SlotGetListRequest.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/slot/get_list 接口的请求。 - /// - public class SlotGetListRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置意图 ID。 - /// - [Newtonsoft.Json.JsonProperty("intent_id")] - [System.Text.Json.Serialization.JsonPropertyName("intent_id")] - public long? IntentId { get; set; } - - /// - /// 获取或设置语义槽类型。 - /// - [Newtonsoft.Json.JsonProperty("type")] - [System.Text.Json.Serialization.JsonPropertyName("type")] - public int? SlotType { get; set; } - - /// - /// 获取或设置分页页数。 - /// 默认值:1 - /// - [Newtonsoft.Json.JsonProperty("page")] - [System.Text.Json.Serialization.JsonPropertyName("page")] - public int Page { get; set; } = 1; - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonProperty("size")] - [System.Text.Json.Serialization.JsonPropertyName("size")] - public int Limit { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Slot/SlotGetListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Slot/SlotGetListResponse.cs deleted file mode 100644 index 3d326f9b..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Slot/SlotGetListResponse.cs +++ /dev/null @@ -1,69 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/slot/get_list 接口的响应。 - /// - public class SlotGetListResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Slot - { - /// - /// 获取或设置语义槽 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public long SlotId { get; set; } - - /// - /// 获取或设置语义槽名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = default!; - - /// - /// 获取或设置语义槽类型。 - /// - [Newtonsoft.Json.JsonProperty("type")] - [System.Text.Json.Serialization.JsonPropertyName("type")] - public int SlotType { get; set; } - - /// - /// 获取或设置词典名称列表。 - /// - [Newtonsoft.Json.JsonProperty("dicts")] - [System.Text.Json.Serialization.JsonPropertyName("dicts")] - public string[] DictionaryNameList { get; set; } = default!; - - /// - /// 获取或设置追问话术列表。 - /// - [Newtonsoft.Json.JsonProperty("ask_content")] - [System.Text.Json.Serialization.JsonPropertyName("ask_content")] - public string[] AskContentList { get; set; } = default!; - } - } - - /// - /// 获取或设置语义槽列表。 - /// - [Newtonsoft.Json.JsonProperty("list")] - [System.Text.Json.Serialization.JsonPropertyName("list")] - public Types.Slot[] SlotList { get; set; } = default!; - - /// - /// 获取或设置语义槽总数量。 - /// - [Newtonsoft.Json.JsonProperty("count")] - [System.Text.Json.Serialization.JsonPropertyName("count")] - public int TotalCount { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Slot/SlotSaveRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Slot/SlotSaveRequest.cs deleted file mode 100644 index 58b2b4ba..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Slot/SlotSaveRequest.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/slot/save 接口的请求。 - /// - public class SlotSaveRequest : WechatOpenAIThirdPartyRequest - { - public static class Types - { - public class Slot - { - /// - /// 获取或设置语义槽 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public long? SlotId { get; set; } - - /// - /// 获取或设置语义槽名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = string.Empty; - - /// - /// 获取或设置词典名称列表。 - /// - [Newtonsoft.Json.JsonProperty("dicts")] - [System.Text.Json.Serialization.JsonPropertyName("dicts")] - public IList DictionaryNameList { get; set; } = new List(); - - /// - /// 获取或设置追问话术列表。 - /// - [Newtonsoft.Json.JsonProperty("ask_content")] - [System.Text.Json.Serialization.JsonPropertyName("ask_content")] - public IList AskContentList { get; set; } = new List(); - - /// - /// 获取或设置关联的意图 ID。 - /// - [Newtonsoft.Json.JsonProperty("intent_id")] - [System.Text.Json.Serialization.JsonPropertyName("intent_id")] - public long? IntentId { get; set; } - } - } - - /// - /// 获取或设置语义槽列表。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public IList SlotList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Slot/SlotSaveResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Slot/SlotSaveResponse.cs deleted file mode 100644 index a762a6e4..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Slot/SlotSaveResponse.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/slot/save 接口的响应。 - /// - public class SlotSaveResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Slot - { - /// - /// 获取或设置语义槽 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public long SlotId { get; set; } - - /// - /// 获取或设置语义槽名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Statistics/DialogUserSpecifiedDateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Statistics/DialogUserSpecifiedDateRequest.cs deleted file mode 100644 index 4ef8f495..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Statistics/DialogUserSpecifiedDateRequest.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/dialog_user_specified_date 接口的请求。 - /// - public class DialogUserSpecifiedDateRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置起始日期字符串(格式:yyyy-MM-dd)。 - /// - [Newtonsoft.Json.JsonProperty("start_date")] - [System.Text.Json.Serialization.JsonPropertyName("start_date")] - public string StartDateString { get; set; } = string.Empty; - - /// - /// 获取或设置结束日期字符串(格式:yyyy-MM-dd)。 - /// - [Newtonsoft.Json.JsonProperty("end_date")] - [System.Text.Json.Serialization.JsonPropertyName("end_date")] - public string EndDateString { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Statistics/DialogUserSpecifiedDateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Statistics/DialogUserSpecifiedDateResponse.cs deleted file mode 100644 index 13492c26..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Statistics/DialogUserSpecifiedDateResponse.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/dialog_user_specified_date 接口的响应。 - /// - public class DialogUserSpecifiedDateResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置日期字符串(格式:yyyy-MM-dd)。 - /// - [Newtonsoft.Json.JsonProperty("date")] - [System.Text.Json.Serialization.JsonPropertyName("date")] - public string DateString { get; set; } = default!; - - /// - /// 获取或设置数量。 - /// - [Newtonsoft.Json.JsonProperty("count")] - [System.Text.Json.Serialization.JsonPropertyName("count")] - public int Count { get; set; } - } - } - - /// - /// 获取或设置对话数据列表。 - /// - [Newtonsoft.Json.JsonProperty("q_a_count")] - [System.Text.Json.Serialization.JsonPropertyName("q_a_count")] - public Types.Data[] DialogDataList { get; set; } = default!; - - /// - /// 获取或设置用户数据列表。 - /// - [Newtonsoft.Json.JsonProperty("user_count")] - [System.Text.Json.Serialization.JsonPropertyName("user_count")] - public Types.Data[] UserDataList { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Statistics/UserQueryYesterdayDataRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Statistics/UserQueryYesterdayDataRequest.cs deleted file mode 100644 index a44d933c..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Statistics/UserQueryYesterdayDataRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/user_query_yesterday_data 接口的请求。 - /// - public class UserQueryYesterdayDataRequest : WechatOpenAIThirdPartyRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Statistics/UserQueryYesterdayDataResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Statistics/UserQueryYesterdayDataResponse.cs deleted file mode 100644 index 6f54fde9..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Statistics/UserQueryYesterdayDataResponse.cs +++ /dev/null @@ -1,71 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/user_query_yesterday_data 接口的响应。 - /// - public class UserQueryYesterdayDataResponse : WechatOpenAIThirdPartyResponse - { - /// - /// 获取或设置对话数量。 - /// - [Newtonsoft.Json.JsonProperty("q_a_count")] - [System.Text.Json.Serialization.JsonPropertyName("q_a_count")] - public int DialogCount { get; set; } - - /// - /// 获取或设置用户数量。 - /// - [Newtonsoft.Json.JsonProperty("user_count")] - [System.Text.Json.Serialization.JsonPropertyName("user_count")] - public int UserCount { get; set; } - - /// - /// 获取或设置新消息总数。 - /// - [Newtonsoft.Json.JsonProperty("new_news_count")] - [System.Text.Json.Serialization.JsonPropertyName("new_news_count")] - public int NewMessageCount { get; set; } - - /// - /// 获取或设置新消息人数。 - /// - [Newtonsoft.Json.JsonProperty("new_news_user_count")] - [System.Text.Json.Serialization.JsonPropertyName("new_news_user_count")] - public int NewMessageUserCount { get; set; } - - /// - /// 获取或设置热问列表。 - /// - [Newtonsoft.Json.JsonProperty("hot_query_list")] - [System.Text.Json.Serialization.JsonPropertyName("hot_query_list")] - public string[] HotQueryList { get; set; } = default!; - - /// - /// 获取或设置命中率(范围:0~1)。 - /// - [Newtonsoft.Json.JsonProperty("hit_rate")] - [System.Text.Json.Serialization.JsonPropertyName("hit_rate")] - public double HitRate { get; set; } - - /// - /// 获取或设置错误率(范围:0~1)。 - /// - [Newtonsoft.Json.JsonProperty("miss_rate")] - [System.Text.Json.Serialization.JsonPropertyName("miss_rate")] - public double MissRate { get; set; } - - /// - /// 获取或设置用户增长率(范围:0~1)。 - /// - [Newtonsoft.Json.JsonProperty("user_growth_rate")] - [System.Text.Json.Serialization.JsonPropertyName("user_growth_rate")] - public double UserGrowthRate { get; set; } - - /// - /// 获取或设置命中增长率(范围:0~1)。 - /// - [Newtonsoft.Json.JsonProperty("hit_growth_rate")] - [System.Text.Json.Serialization.JsonPropertyName("hit_growth_rate")] - public double HitGrowthRate { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Token/TokenRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Token/TokenRequest.cs deleted file mode 100644 index 5416ce2a..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Token/TokenRequest.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/token 接口的请求。 - /// - public class TokenRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置用户唯一标识。 - /// - [Newtonsoft.Json.JsonProperty("openid")] - [System.Text.Json.Serialization.JsonPropertyName("openid")] - public string OpenId { get; set; } = string.Empty; - - /// - /// 获取或设置申请的资源权限列表。 - /// - [Newtonsoft.Json.JsonProperty("resources")] - [System.Text.Json.Serialization.JsonPropertyName("resources")] - public IList ResourceList { get; set; } = new List(); - - /// - /// (使用默认值即可,无需修改) - /// - [Newtonsoft.Json.JsonProperty("authorization_type")] - [System.Text.Json.Serialization.JsonPropertyName("authorization_type")] - public string AuthorizationType { get; set; } = "client_credentials"; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Token/TokenResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Token/TokenResponse.cs deleted file mode 100644 index 6b9dbd5c..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Token/TokenResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/token 接口的响应。 - /// - public class TokenResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置接口访问令牌。 - /// - [Newtonsoft.Json.JsonProperty("access_token")] - [System.Text.Json.Serialization.JsonPropertyName("access_token")] - public string AccessToken { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/UnmatchedClass/UnmatchedClassDetailRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/UnmatchedClass/UnmatchedClassDetailRequest.cs deleted file mode 100644 index fc7a07ec..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/UnmatchedClass/UnmatchedClassDetailRequest.cs +++ /dev/null @@ -1,46 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/unmatched/class/detail 接口的请求。 - /// - public class UnmatchedClassDetailRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置查询日期(格式:yyyy-MM-dd)。 - /// - [Newtonsoft.Json.JsonProperty("date")] - [System.Text.Json.Serialization.JsonPropertyName("date")] - public string DateString { get; set; } = string.Empty; - - /// - /// 获取或设置话术 ID。 - /// - [Newtonsoft.Json.JsonProperty("class_id")] - [System.Text.Json.Serialization.JsonPropertyName("class_id")] - public long ClassId { get; set; } - - /// - /// 获取或设置排序方式。 - /// 默认值:desc - /// - [Newtonsoft.Json.JsonProperty("sort")] - [System.Text.Json.Serialization.JsonPropertyName("sort")] - public string SortType { get; set; } = "desc"; - - /// - /// 获取或设置分页页数。 - /// 默认值:1 - /// - [Newtonsoft.Json.JsonProperty("page_no")] - [System.Text.Json.Serialization.JsonPropertyName("page_no")] - public int Page { get; set; } = 1; - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonProperty("page_size")] - [System.Text.Json.Serialization.JsonPropertyName("page_size")] - public int Limit { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/UnmatchedClass/UnmatchedClassDetailResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/UnmatchedClass/UnmatchedClassDetailResponse.cs deleted file mode 100644 index 3bc08458..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/UnmatchedClass/UnmatchedClassDetailResponse.cs +++ /dev/null @@ -1,69 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/unmatched/class/detail 接口的响应。 - /// - public class UnmatchedClassDetailResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Class - { - /// - /// 获取或设置询问话术。 - /// - [Newtonsoft.Json.JsonProperty("query")] - [System.Text.Json.Serialization.JsonPropertyName("query")] - public string Query { get; set; } = default!; - - /// - /// 获取或设置回答话术。 - /// - [Newtonsoft.Json.JsonProperty("answer")] - [System.Text.Json.Serialization.JsonPropertyName("answer")] - public string Answer { get; set; } = default!; - - /// - /// 获取或设置未命中数量。 - /// - [Newtonsoft.Json.JsonProperty("count")] - [System.Text.Json.Serialization.JsonPropertyName("count")] - public int Count { get; set; } - } - } - - /// - /// 获取或设置话术列表。 - /// - [Newtonsoft.Json.JsonProperty("list")] - [System.Text.Json.Serialization.JsonPropertyName("list")] - public Types.Class[] ClassList { get; set; } = default!; - - /// - /// 获取或设置总数量。 - /// - [Newtonsoft.Json.JsonProperty("total")] - [System.Text.Json.Serialization.JsonPropertyName("total")] - public int TotalCount { get; set; } - - /// - /// 获取或设置分页页数。 - /// - [Newtonsoft.Json.JsonProperty("page_no")] - [System.Text.Json.Serialization.JsonPropertyName("page_no")] - public int Page { get; set; } - - /// - /// 获取或设置分页每页数量。 - /// - [Newtonsoft.Json.JsonProperty("page_size")] - [System.Text.Json.Serialization.JsonPropertyName("page_size")] - public int Limit { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/UnmatchedClass/UnmatchedClassListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/UnmatchedClass/UnmatchedClassListRequest.cs deleted file mode 100644 index aa95f445..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/UnmatchedClass/UnmatchedClassListRequest.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/unmatched/class/list 接口的请求。 - /// - public class UnmatchedClassListRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置查询日期(格式:yyyy-MM-dd)。 - /// - [Newtonsoft.Json.JsonProperty("date")] - [System.Text.Json.Serialization.JsonPropertyName("date")] - public string DateString { get; set; } = string.Empty; - - /// - /// 获取或设置排序方式。 - /// 默认值:desc - /// - [Newtonsoft.Json.JsonProperty("sort")] - [System.Text.Json.Serialization.JsonPropertyName("sort")] - public string SortType { get; set; } = "desc"; - - /// - /// 获取或设置分页页数。 - /// 默认值:1 - /// - [Newtonsoft.Json.JsonProperty("page_no")] - [System.Text.Json.Serialization.JsonPropertyName("page_no")] - public int Page { get; set; } = 1; - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonProperty("page_size")] - [System.Text.Json.Serialization.JsonPropertyName("page_size")] - public int Limit { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/UnmatchedClass/UnmatchedClassListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/UnmatchedClass/UnmatchedClassListResponse.cs deleted file mode 100644 index e0ec002c..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/UnmatchedClass/UnmatchedClassListResponse.cs +++ /dev/null @@ -1,69 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/unmatched/class/list 接口的响应。 - /// - public class UnmatchedClassListResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Class - { - /// - /// 获取或设置话术 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public long ClassId { get; set; } - - /// - /// 获取或设置话术名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = default!; - - /// - /// 获取或设置未命中数量。 - /// - [Newtonsoft.Json.JsonProperty("count")] - [System.Text.Json.Serialization.JsonPropertyName("count")] - public int Count { get; set; } - } - } - - /// - /// 获取或设置话术列表。 - /// - [Newtonsoft.Json.JsonProperty("list")] - [System.Text.Json.Serialization.JsonPropertyName("list")] - public Types.Class[] ClassList { get; set; } = default!; - - /// - /// 获取或设置总数量。 - /// - [Newtonsoft.Json.JsonProperty("total")] - [System.Text.Json.Serialization.JsonPropertyName("total")] - public int TotalCount { get; set; } - - /// - /// 获取或设置分页页数。 - /// - [Newtonsoft.Json.JsonProperty("page_no")] - [System.Text.Json.Serialization.JsonPropertyName("page_no")] - public int Page { get; set; } - - /// - /// 获取或设置分页每页数量。 - /// - [Newtonsoft.Json.JsonProperty("page_size")] - [System.Text.Json.Serialization.JsonPropertyName("page_size")] - public int Limit { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/User/UserRegisterRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/User/UserRegisterRequest.cs deleted file mode 100644 index d50ffd1f..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/User/UserRegisterRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/user/register 接口的请求。 - /// - public class UserRegisterRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置用户 ID。 - /// - [Newtonsoft.Json.JsonProperty("uid")] - [System.Text.Json.Serialization.JsonPropertyName("uid")] - public string UserId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/User/UserRegisterResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/User/UserRegisterResponse.cs deleted file mode 100644 index 40732907..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/User/UserRegisterResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v1/user/register 接口的响应。 - /// - public class UserRegisterResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置用户唯一标识。 - /// - [Newtonsoft.Json.JsonProperty("openid")] - [System.Text.Json.Serialization.JsonPropertyName("openid")] - public string OpenId { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordDeleteBatchRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordDeleteBatchRequest.cs deleted file mode 100644 index 5b6f65c4..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordDeleteBatchRequest.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/word/delete/batch 接口的请求。 - /// - public class WordDeleteBatchRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置词条 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("id_list")] - [System.Text.Json.Serialization.JsonPropertyName("id_list")] - public IList WordIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordDeleteBatchResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordDeleteBatchResponse.cs deleted file mode 100644 index ac266377..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordDeleteBatchResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/word/delete/batch 接口的响应。 - /// - public class WordDeleteBatchResponse : WechatOpenAIThirdPartyResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordExportRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordExportRequest.cs deleted file mode 100644 index 5c5b7c7f..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordExportRequest.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/word/export 接口的请求。 - /// - public class WordExportRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置词典 ID。与字段 二选一。 - /// - [Newtonsoft.Json.JsonProperty("dict_id")] - [System.Text.Json.Serialization.JsonPropertyName("dict_id")] - public long? DictionaryId { get; set; } - - /// - /// 获取或设置词典名称。与字段 二选一。 - /// - [Newtonsoft.Json.JsonProperty("dict_name")] - [System.Text.Json.Serialization.JsonPropertyName("dict_name")] - public string? DictionaryName { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordExportResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordExportResponse.cs deleted file mode 100644 index 68c5bb5b..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordExportResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/word/export 接口的响应。 - /// - public class WordExportResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置异步任务 ID。 - /// - [Newtonsoft.Json.JsonProperty("task_id")] - [System.Text.Json.Serialization.JsonPropertyName("task_id")] - public string TaskId { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordImportJsonRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordImportJsonRequest.cs deleted file mode 100644 index 62db3bd8..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordImportJsonRequest.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/word/import/json 接口的请求。 - /// - public class WordImportJsonRequest : WechatOpenAIThirdPartyRequest - { - public static class Types - { - public class Word - { - /// - /// 获取或设置词条名称。 - /// - [Newtonsoft.Json.JsonProperty("word")] - [System.Text.Json.Serialization.JsonPropertyName("word")] - public string Name { get; set; } = string.Empty; - - /// - /// 获取或设置权重(范围:0~1)。 - /// - [Newtonsoft.Json.JsonProperty("weight")] - [System.Text.Json.Serialization.JsonPropertyName("weight")] - public double? Weight { get; set; } - - /// - /// 获取或设置同义词列表。 - /// - [Newtonsoft.Json.JsonProperty("synonyms")] - [System.Text.Json.Serialization.JsonPropertyName("synonyms")] - public IList? SynonymsList { get; set; } - } - } - - /// - /// 获取或设置词条列表。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public IList WordList { get; set; } = new List(); - - /// - /// 获取或设置导入模式。 - /// - [Newtonsoft.Json.JsonProperty("mode")] - [System.Text.Json.Serialization.JsonPropertyName("mode")] - public int Mode { get; set; } - - /// - /// 获取或设置词典 ID。与字段 二选一。 - /// - [Newtonsoft.Json.JsonProperty("dict_id")] - [System.Text.Json.Serialization.JsonPropertyName("dict_id")] - public long? DictionaryId { get; set; } - - /// - /// 获取或设置词典名称。与字段 二选一。 - /// - [Newtonsoft.Json.JsonProperty("dict_name")] - [System.Text.Json.Serialization.JsonPropertyName("dict_name")] - public string? DictionaryName { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordImportJsonResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordImportJsonResponse.cs deleted file mode 100644 index 43d7e58c..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordImportJsonResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/word/import/json 接口的响应。 - /// - public class WordImportJsonResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置异步任务 ID。 - /// - [Newtonsoft.Json.JsonProperty("task_id")] - [System.Text.Json.Serialization.JsonPropertyName("task_id")] - public string TaskId { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordImportRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordImportRequest.cs deleted file mode 100644 index 3634d6a7..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordImportRequest.cs +++ /dev/null @@ -1,43 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/word/import 接口的请求。 - /// - public class WordImportRequest : WechatOpenAIThirdPartyRequest - { - /// - /// 获取或设置上传的文件标识。与字段 二选一。 - /// - [Newtonsoft.Json.JsonProperty("file_key")] - [System.Text.Json.Serialization.JsonPropertyName("file_key")] - public string? FileKey { get; set; } - - /// - /// 获取或设置待上传文件 URL。与字段 二选一。 - /// - [Newtonsoft.Json.JsonProperty("file_uri")] - [System.Text.Json.Serialization.JsonPropertyName("file_uri")] - public string? FileUrl { get; set; } - - /// - /// 获取或设置是否覆盖。 - /// - [Newtonsoft.Json.JsonProperty("cover")] - [System.Text.Json.Serialization.JsonPropertyName("cover")] - public bool IsCover { get; set; } - - /// - /// 获取或设置词典 ID。与字段 二选一。 - /// - [Newtonsoft.Json.JsonProperty("dict_id")] - [System.Text.Json.Serialization.JsonPropertyName("dict_id")] - public long? DictionaryId { get; set; } - - /// - /// 获取或设置词典名称。与字段 二选一。 - /// - [Newtonsoft.Json.JsonProperty("dict_name")] - [System.Text.Json.Serialization.JsonPropertyName("dict_name")] - public string? DictionaryName { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordImportResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordImportResponse.cs deleted file mode 100644 index 9bc4281c..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordImportResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/word/import 接口的响应。 - /// - public class WordImportResponse : WechatOpenAIThirdPartyResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置异步任务 ID。 - /// - [Newtonsoft.Json.JsonProperty("task_id")] - [System.Text.Json.Serialization.JsonPropertyName("task_id")] - public string TaskId { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordUpdateBatchRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordUpdateBatchRequest.cs deleted file mode 100644 index 7340acc9..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordUpdateBatchRequest.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/word/update/batch 接口的请求。 - /// - public class WordUpdateBatchRequest : WechatOpenAIThirdPartyRequest - { - public static class Types - { - public class Word - { - /// - /// 获取或设置词条 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public long? WordId { get; set; } - - /// - /// 获取或设置词条名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = string.Empty; - - /// - /// 获取或设置权重(范围:0~1)。 - /// - [Newtonsoft.Json.JsonProperty("weight")] - [System.Text.Json.Serialization.JsonPropertyName("weight")] - public double? Weight { get; set; } - - /// - /// 获取或设置词条开关。 - /// - [Newtonsoft.Json.JsonProperty("switch")] - [System.Text.Json.Serialization.JsonPropertyName("switch")] - public bool Switch { get; set; } - - /// - /// 获取或设置同义词列表。 - /// - [Newtonsoft.Json.JsonProperty("synonyms")] - [System.Text.Json.Serialization.JsonPropertyName("synonyms")] - public IList? SynonymsList { get; set; } - } - } - - /// - /// 获取或设置词条列表。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public IList WordList { get; set; } = new List(); - - /// - /// 获取或设置词典 ID。 - /// - [Newtonsoft.Json.JsonProperty("dict_id")] - [System.Text.Json.Serialization.JsonPropertyName("dict_id")] - public long DictionaryId { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordUpdateBatchResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordUpdateBatchResponse.cs deleted file mode 100644 index a3ac5334..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Models/ThirdParty/Word/WordUpdateBatchResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models.ThirdParty -{ - /// - /// 表示 [POST] /v2/word/update/batch 接口的响应。 - /// - public class WordUpdateBatchResponse : WechatOpenAIThirdPartyResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/README.md b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/README.md index 3d3e7600..6a91f1b1 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/README.md +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/README.md @@ -9,9 +9,6 @@ ### 【功能特性】 - 基于微信对话开放平台 API 封装。 -- 支持平台接入、第三方接入两种模式。 -- 对于第三方接入,请求时自动生成加密参数,无需开发者手动干预。 -- 对于平台接入,请求时自动生成请求唯一标识,无需开发者手动干预。 - 提供了解析回调通知事件等扩展方法。 --- diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/SKIT.FlurlHttpClient.Wechat.OpenAI.csproj b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/SKIT.FlurlHttpClient.Wechat.OpenAI.csproj index 7f0dc67e..f2871f29 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/SKIT.FlurlHttpClient.Wechat.OpenAI.csproj +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/SKIT.FlurlHttpClient.Wechat.OpenAI.csproj @@ -15,7 +15,7 @@ https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat Flurl.Http Wechat Weixin MicroMessage WechatAI WechatOpenAI WexinAI WeixinOpenAI 微信 微信智能对话 微信对话开放平台 微信智能对话开放平台 智能对话平台 2.0.0-rc.7 - 基于 Flurl.Http 的微信对话开放平台(微信智能对话) API 客户端,支持平台接入、第三方接入模式,支持智能对话、NLP、通用接口、机器人、技能、意图、语义槽、词典、词条、对话开放接口、技能商店、数据统计等功能。 + 基于 Flurl.Http 的微信对话开放平台(微信智能对话) API 客户端,支持智能对话接口、第三方客服接入、机器人配置、公众号/小程序/H5 绑定等功能。 Fu Diwei git https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git @@ -40,7 +40,7 @@ - + diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Settings/PlatformCredentials.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Settings/Credentials.cs similarity index 57% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Settings/PlatformCredentials.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Settings/Credentials.cs index 3886e00a..a9578e4a 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Settings/PlatformCredentials.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Settings/Credentials.cs @@ -2,24 +2,24 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Settings { - public class PlatformCredentials + public class Credentials { /// - /// 初始化客户端时 的副本。 + /// 初始化客户端时 的副本。 /// public string AppId { get; } /// - /// 初始化客户端时 的副本。 + /// 初始化客户端时 的副本。 /// public string Token { get; } /// - /// 初始化客户端时 的副本。 + /// 初始化客户端时 的副本。 /// public string EncodingAESKey { get; } - internal PlatformCredentials(WechatOpenAIPlatformClientOptions options) + internal Credentials(WechatOpenAIClientOptions options) { if (options == null) throw new ArgumentNullException(nameof(options)); diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Settings/ThirdPartyCredentials.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Settings/ThirdPartyCredentials.cs deleted file mode 100644 index 6afa4868..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Settings/ThirdPartyCredentials.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Settings -{ - public class ThirdPartyCredentials - { - /// - /// 初始化客户端时 的副本。 - /// - public string ClientId { get; } = default!; - - /// - /// 初始化客户端时 的副本。 - /// - public string ClientKey { get; } = default!; - - internal ThirdPartyCredentials(WechatOpenAIThirdPartyClientOptions options) - { - if (options == null) throw new ArgumentNullException(nameof(options)); - - ClientId = options.ClientId; - ClientKey = options.ClientKey; - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Utilities/Internal/WechatEventDataCryptor.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Utilities/Internal/WxMsgCryptor.cs similarity index 99% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/Utilities/Internal/WechatEventDataCryptor.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/Utilities/Internal/WxMsgCryptor.cs index 4308ad71..432202f4 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Utilities/Internal/WechatEventDataCryptor.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/Utilities/Internal/WxMsgCryptor.cs @@ -10,7 +10,7 @@ using System.Xml; namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Utilities { - internal static class WechatEventDataCryptor + internal static class WxMsgCryptor { private const int AES_KEY_SIZE = 256; private const int AES_BLOCK_SIZE = 128; diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIPlatformClient.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIClient.cs similarity index 81% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIPlatformClient.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIClient.cs index 6f751603..6b064fe5 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIPlatformClient.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIClient.cs @@ -7,27 +7,27 @@ using Flurl.Http; namespace SKIT.FlurlHttpClient.Wechat.OpenAI { /// - /// 一个微信智能对话平台接入 API HTTP 客户端。 + /// 一个微信智能对话 API HTTP 客户端。 /// - public class WechatOpenAIPlatformClient : CommonClientBase, ICommonClient + public class WechatOpenAIClient : CommonClientBase, ICommonClient { /// /// 获取当前客户端使用的微信智能对话平台凭证。 /// - public Settings.PlatformCredentials Credentials { get; } + public Settings.Credentials Credentials { get; } /// - /// 用指定的配置项初始化 类的新实例。 + /// 用指定的配置项初始化 类的新实例。 /// /// 配置项。 - public WechatOpenAIPlatformClient(WechatOpenAIPlatformClientOptions options) + public WechatOpenAIClient(WechatOpenAIClientOptions options) : base() { if (options == null) throw new ArgumentNullException(nameof(options)); - Credentials = new Settings.PlatformCredentials(options); + Credentials = new Settings.Credentials(options); - FlurlClient.BaseUrl = options.Endpoints ?? WechatOpenAIPlatformEndpoints.DEFAULT; + FlurlClient.BaseUrl = options.Endpoints ?? WechatOpenAIEndpoints.DEFAULT; FlurlClient.WithTimeout(TimeSpan.FromMilliseconds(options.Timeout)); } @@ -37,8 +37,8 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// 微信智能对话 AppId。 /// 微信智能对话 Token。 /// 微信智能对话 EncodingAESKey。 - public WechatOpenAIPlatformClient(string appId, string token, string encodingAESKey) - : this(new WechatOpenAIPlatformClientOptions() { AppId = appId, Token = token, EncodingAESKey = encodingAESKey }) + public WechatOpenAIClient(string appId, string token, string encodingAESKey) + : this(new WechatOpenAIClientOptions() { AppId = appId, Token = token, EncodingAESKey = encodingAESKey }) { } @@ -49,7 +49,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// /// - public IFlurlRequest CreateRequest(WechatOpenAIPlatformRequest request, HttpMethod method, params object[] urlSegments) + public IFlurlRequest CreateRequest(WechatOpenAIRequest request, HttpMethod method, params object[] urlSegments) { IFlurlRequest flurlRequest = FlurlClient.Request(urlSegments).WithVerb(method); @@ -70,7 +70,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// public async Task SendRequestAsync(IFlurlRequest flurlRequest, HttpContent? httpContent = null, CancellationToken cancellationToken = default) - where T : WechatOpenAIPlatformResponse, new() + where T : WechatOpenAIResponse, new() { if (flurlRequest == null) throw new ArgumentNullException(nameof(flurlRequest)); @@ -94,16 +94,16 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// public async Task SendRequestWithJsonAsync(IFlurlRequest flurlRequest, object? data = null, CancellationToken cancellationToken = default) - where T : WechatOpenAIPlatformResponse, new() + where T : WechatOpenAIResponse, new() { if (flurlRequest == null) throw new ArgumentNullException(nameof(flurlRequest)); try { - if (data is WechatOpenAIPlatformRequest.Serialization.IEncryptedXmlable) + if (data is WechatOpenAIRequest.Serialization.IEncryptedXmlable) { string plainXml = Utilities.XmlUtility.Serialize(data); - string encryptedXml = Utilities.WechatEventDataCryptor.AESEncrypt(plainText: plainXml, encodingAESKey: Credentials.EncodingAESKey!, appId: Credentials.AppId!); + string encryptedXml = Utilities.WxMsgCryptor.AESEncrypt(plainText: plainXml, encodingAESKey: Credentials.EncodingAESKey!, appId: Credentials.AppId!); data = new { encrypt = encryptedXml }; } @@ -135,13 +135,13 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI /// /// public async Task SendRequestWithUrlEncodedAsync(IFlurlRequest flurlRequest, object? data = null, CancellationToken cancellationToken = default) - where T : WechatOpenAIPlatformResponse, new() + where T : WechatOpenAIResponse, new() { if (flurlRequest == null) throw new ArgumentNullException(nameof(flurlRequest)); try { - if (data is WechatOpenAIPlatformRequest.Serialization.IEncryptedUrlEncoded) + if (data is WechatOpenAIRequest.Serialization.IEncryptedUrlEncoded) { string jwt = Utilities.JwtUtility.EncodeWithHS256(payload: data, secret: Credentials.EncodingAESKey!); data = new { query = jwt }; diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIPlatformClientOptions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIClientOptions.cs similarity index 74% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIPlatformClientOptions.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIClientOptions.cs index 5153393d..6bbde543 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIPlatformClientOptions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIClientOptions.cs @@ -1,9 +1,9 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI { /// - /// 一个用于构造 时使用的配置项。 + /// 一个用于构造 时使用的配置项。 /// - public class WechatOpenAIPlatformClientOptions + public class WechatOpenAIClientOptions { /// /// 获取或设置请求超时时间(单位:毫秒)。 @@ -13,9 +13,9 @@ /// /// 获取或设置微信智能对话 API 域名。 - /// 默认值: + /// 默认值: /// - public string Endpoints { get; set; } = WechatOpenAIPlatformEndpoints.DEFAULT; + public string Endpoints { get; set; } = WechatOpenAIEndpoints.DEFAULT; /// /// 获取或设置微信智能对话 AppId。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIPlatformEndpoints.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIEndpoints.cs similarity index 67% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIPlatformEndpoints.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIEndpoints.cs index f0c0d9d7..285bfa48 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIPlatformEndpoints.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIEndpoints.cs @@ -1,9 +1,9 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI { /// - /// 微信智能对话平台接入 API 接口域名。 + /// 微信智能对话 API 接口域名。 /// - public static class WechatOpenAIPlatformEndpoints + public static class WechatOpenAIEndpoints { /// /// 主域名(默认)。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIPlatformEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIEvent.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIPlatformEvent.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIEvent.cs index 9d307594..37fee6f0 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIPlatformEvent.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIEvent.cs @@ -4,10 +4,10 @@ using System.Xml.Serialization; namespace SKIT.FlurlHttpClient.Wechat.OpenAI { /// - /// 表示微信智能对话平台接入 API 回调通知事件的基类。 + /// 表示微信智能对话 API 回调通知事件的基类。 /// [Serializable] - public class WechatOpenAIPlatformEvent + public class WechatOpenAIEvent { public static class Serialization { diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIPlatformRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIRequest.cs similarity index 58% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIPlatformRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIRequest.cs index 93a26731..d8db83b2 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIPlatformRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI +namespace SKIT.FlurlHttpClient.Wechat.OpenAI { /// - /// 表示微信智能对话平台接入 API 请求的基类。 + /// 表示微信智能对话 API 请求的基类。 /// - public abstract class WechatOpenAIPlatformRequest : ICommonRequest + public abstract class WechatOpenAIRequest : ICommonRequest { public static class Serialization { @@ -17,7 +17,7 @@ } /// - /// 获取或设置请求超时时间(单位:毫秒)。如果不指定将使用构造 时的 参数,这在需要指定特定耗时请求(比如上传或下载文件)的超时时间时很有用。 + /// 获取或设置请求超时时间(单位:毫秒)。如果不指定将使用构造 时的 参数,这在需要指定特定耗时请求(比如上传或下载文件)的超时时间时很有用。 /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIPlatformResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIResponse.cs similarity index 91% rename from src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIPlatformResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIResponse.cs index c27a7606..80441585 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIPlatformResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIResponse.cs @@ -1,11 +1,11 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace SKIT.FlurlHttpClient.Wechat.OpenAI { /// - /// 表示微信智能对话平台接入 API 响应的基类。 + /// 表示微信智能对话 API 响应的基类。 /// - public abstract class WechatOpenAIPlatformResponse : ICommonResponse + public abstract class WechatOpenAIResponse : ICommonResponse { /// /// @@ -94,9 +94,9 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI } /// - /// 表示微信智能对话平台接入 API 响应的泛型基类。 + /// 表示微信智能对话 API 响应的泛型基类。 /// - public abstract class WechatOpenAIPlatformResponse : WechatOpenAIPlatformResponse + public abstract class WechatOpenAIResponse : WechatOpenAIResponse where TData : class { /// diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIThirdPartyClient.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIThirdPartyClient.cs deleted file mode 100644 index 777400fe..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIThirdPartyClient.cs +++ /dev/null @@ -1,142 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - /// - /// 一个微信智能对话第三方接入 API HTTP 客户端。 - /// - public class WechatOpenAIThirdPartyClient : CommonClientBase, ICommonClient - { - /// - /// 获取当前客户端使用的微信智能对话平台凭证。 - /// - public Settings.ThirdPartyCredentials Credentials { get; } - - /// - /// 用指定的配置项初始化 类的新实例。 - /// - /// 配置项。 - public WechatOpenAIThirdPartyClient(WechatOpenAIThirdPartyClientOptions options) - : base() - { - if (options == null) throw new ArgumentNullException(nameof(options)); - - Credentials = new Settings.ThirdPartyCredentials(options); - - FlurlClient.BaseUrl = options.Endpoints ?? WechatOpenAIThirdPartyEndpoints.DEFAULT; - FlurlClient.WithTimeout(TimeSpan.FromMilliseconds(options.Timeout)); - } - - /// - /// 用指定的微信智能对话 ClientId、ClientKey 初始化 类的新实例。 - /// - /// 微信智能对话 ClientId。 - /// 微信智能对话 ClientKey。 - public WechatOpenAIThirdPartyClient(string clientId, string clientKey) - : this(new WechatOpenAIThirdPartyClientOptions() { ClientId = clientId, ClientKey = clientKey }) - { - } - - /// - /// 使用当前客户端生成一个新的 对象。 - /// - /// - /// - /// - /// - public IFlurlRequest CreateRequest(WechatOpenAIThirdPartyRequest request, HttpMethod method, params object[] urlSegments) - { - IFlurlRequest flurlRequest = FlurlClient.Request(urlSegments).WithVerb(method); - - if (request.Timeout != null) - { - flurlRequest.WithTimeout(TimeSpan.FromMilliseconds(request.Timeout.Value)); - } - - if (request.RequestId == null) - { - request.RequestId = Guid.NewGuid().ToString("N"); - } - - flurlRequest.WithHeader("request_id", request.RequestId); - - if (request.BotId != null) - { - flurlRequest.WithHeader("wxbot_bid", request.BotId); - } - - if (request.AccessToken != null) - { - flurlRequest.WithHeader("X-OPENAI-TOKEN", request.AccessToken); - } - - return flurlRequest; - } - - /// - /// 异步发起请求。 - /// - /// - /// - /// - /// - /// - public async Task SendRequestAsync(IFlurlRequest flurlRequest, HttpContent? httpContent = null, CancellationToken cancellationToken = default) - where T : WechatOpenAIThirdPartyResponse, new() - { - if (flurlRequest == null) throw new ArgumentNullException(nameof(flurlRequest)); - - try - { - using IFlurlResponse flurlResponse = await base.SendRequestAsync(flurlRequest, httpContent, cancellationToken); - return await WrapResponseWithJsonAsync(flurlResponse, cancellationToken); - } - catch (FlurlHttpTimeoutException ex) - { - throw new Exceptions.WechatOpenAIRequestTimeoutException(ex.Message, ex); - } - catch (FlurlHttpException ex) - { - throw new WechatOpenAIException(ex.Message, ex); - } - } - - /// - /// 异步发起请求。 - /// - /// - /// - /// - /// - /// - public async Task SendRequestWithJsonAsync(IFlurlRequest flurlRequest, object? data = null, CancellationToken cancellationToken = default) - where T : WechatOpenAIThirdPartyResponse, new() - { - if (flurlRequest == null) throw new ArgumentNullException(nameof(flurlRequest)); - - try - { - bool isSimpleRequest = data == null || - flurlRequest.Verb == HttpMethod.Get || - flurlRequest.Verb == HttpMethod.Head || - flurlRequest.Verb == HttpMethod.Options; - using IFlurlResponse flurlResponse = isSimpleRequest ? - await base.SendRequestAsync(flurlRequest, null, cancellationToken) : - await base.SendRequestWithJsonAsync(flurlRequest, data, cancellationToken); - return await WrapResponseWithJsonAsync(flurlResponse, cancellationToken); - } - catch (FlurlHttpTimeoutException ex) - { - throw new Exceptions.WechatOpenAIRequestTimeoutException(ex.Message, ex); - } - catch (FlurlHttpException ex) - { - throw new WechatOpenAIException(ex.Message, ex); - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIThirdPartyClientOptions.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIThirdPartyClientOptions.cs deleted file mode 100644 index a663e6bf..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIThirdPartyClientOptions.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - /// - /// 一个用于构造 时使用的配置项。 - /// - public class WechatOpenAIThirdPartyClientOptions - { - /// - /// 获取或设置请求超时时间(单位:毫秒)。 - /// 默认值:30000 - /// - public int Timeout { get; set; } = 30 * 1000; - - /// - /// 获取或设置微信智能对话 API 域名。 - /// 默认值: - /// - public string Endpoints { get; set; } = WechatOpenAIPlatformEndpoints.DEFAULT; - - /// - /// 获取或设置微信智能对话 ClientId。 - /// - public string ClientId { get; set; } = string.Empty; - - /// - /// 获取或设置微信智能对话 ClientKey。 - /// - public string ClientKey { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIThirdPartyEndpoints.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIThirdPartyEndpoints.cs deleted file mode 100644 index 55c5242a..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIThirdPartyEndpoints.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - /// - /// 微信智能对话第三方接入 API 接口域名。 - /// - public static class WechatOpenAIThirdPartyEndpoints - { - /// - /// 主域名(默认)。 - /// - public const string DEFAULT = "https://openaiapi.weixin.qq.com"; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIThirdPartyRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIThirdPartyRequest.cs deleted file mode 100644 index f386cac4..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIThirdPartyRequest.cs +++ /dev/null @@ -1,44 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - /// - /// 表示微信智能对话第三方接入 API 请求的基类。 - /// - public abstract class WechatOpenAIThirdPartyRequest : ICommonRequest - { - /// - /// 获取或设置请求超时时间(单位:毫秒)。如果不指定将使用构造 时的 参数,这在需要指定特定耗时请求(比如上传或下载文件)的超时时间时很有用。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - [System.Xml.Serialization.XmlIgnore] - [System.Xml.Serialization.SoapIgnore] - public virtual int? Timeout { get; set; } - - /// - /// 获取或设置请求唯一标识。如果不指定将有系统自动生成。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - [System.Xml.Serialization.XmlIgnore] - [System.Xml.Serialization.SoapIgnore] - public virtual string? RequestId { get; set; } - - /// - /// 获取或设置 Bot ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - [System.Xml.Serialization.XmlIgnore] - [System.Xml.Serialization.SoapIgnore] - public virtual string? BotId { get; set; } - - /// - /// 获取或设置接口访问令牌。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - [System.Xml.Serialization.XmlIgnore] - [System.Xml.Serialization.SoapIgnore] - public virtual string? AccessToken { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIThirdPartyResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIThirdPartyResponse.cs deleted file mode 100644 index e0f8895d..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIThirdPartyResponse.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.Wechat.OpenAI -{ - /// - /// 表示微信智能对话第三方接入 API 响应的基类。 - /// - public abstract class WechatOpenAIThirdPartyResponse : ICommonResponse - { - /// - /// - /// - int ICommonResponse.RawStatus { get; set; } - - /// - /// - /// - IDictionary ICommonResponse.RawHeaders { get; set; } = default!; - - /// - /// - /// - byte[] ICommonResponse.RawBytes { get; set; } = default!; - - /// - /// 获取原始的 HTTP 响应状态码。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public int RawStatus - { - get { return ((ICommonResponse)this).RawStatus; } - internal set { ((ICommonResponse)this).RawStatus = value; } - } - - /// - /// 获取原始的 HTTP 响应表头集合。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public IDictionary RawHeaders - { - get { return ((ICommonResponse)this).RawHeaders; } - internal set { ((ICommonResponse)this).RawHeaders = value; } - } - - /// - /// 获取原始的 HTTP 响应正文。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public byte[] RawBytes - { - get { return ((ICommonResponse)this).RawBytes; } - internal set { ((ICommonResponse)this).RawBytes = value; } - } - - /// - /// 获取微信智能对话 API 返回的请求唯一标识。 - /// - [Newtonsoft.Json.JsonProperty("request_id")] - [System.Text.Json.Serialization.JsonPropertyName("request_id")] - public virtual string? RequestId { get; set; } - - /// - /// 获取微信智能对话 API 返回的状态码。 - /// - [Newtonsoft.Json.JsonProperty("code")] - [System.Text.Json.Serialization.JsonPropertyName("code")] - public virtual int? ErrorCode { get; set; } - - /// - /// 获取微信智能对话 API 返回的调用信息。 - /// - [Newtonsoft.Json.JsonProperty("msg")] - [System.Text.Json.Serialization.JsonPropertyName("msg")] - public virtual string? ErrorMessage { get; set; } - - /// - /// 获取一个值,该值指示调用微信 API 是否成功(即 HTTP 状态码为 200、且 code 值为 0)。 - /// - /// - public virtual bool IsSuccessful() - { - return RawStatus == 200 && ErrorCode.GetValueOrDefault() == 0; - } - } - - /// - /// 表示微信智能对话第三方接入 API 响应的泛型基类。 - /// - public abstract class WechatOpenAIThirdPartyResponse : WechatOpenAIThirdPartyResponse - where TData : class - { - /// - /// 获取微信智能对话 API 返回的数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public virtual TData? Data { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Extensions/WechatWorkClientEventExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Extensions/WechatWorkClientEventExtensions.cs index 393df5e0..4d91b560 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Work/Extensions/WechatWorkClientEventExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Extensions/WechatWorkClientEventExtensions.cs @@ -40,7 +40,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work throw new Exceptions.WechatWorkEventSerializationException("Decrypt event failed, because there is no encoding AES key."); InnerEncryptedEvent encryptedEvent = client.JsonSerializer.Deserialize(callbackJson); - callbackJson = Utilities.WechatEventDataCryptor.AESDecrypt(cipherText: encryptedEvent.EncryptedData, encodingAESKey: client.Credentials.PushEncodingAESKey!, out _); + callbackJson = Utilities.WxMsgCryptor.AESDecrypt(cipherText: encryptedEvent.EncryptedData, encodingAESKey: client.Credentials.PushEncodingAESKey!, out _); return client.JsonSerializer.Deserialize(callbackJson); } @@ -62,10 +62,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Work try { - if (!Utilities.WechatEventDataCryptor.TryParseXml(callbackXml, out string? encryptedXml)) + if (!Utilities.WxMsgCryptor.TryParseXml(callbackXml, out string? encryptedXml)) throw new Exceptions.WechatWorkEventSerializationException("Decrypt event failed, because of empty encrypted data."); - callbackXml = Utilities.WechatEventDataCryptor.AESDecrypt(cipherText: encryptedXml!, encodingAESKey: client.Credentials.PushEncodingAESKey!, out _); + callbackXml = Utilities.WxMsgCryptor.AESDecrypt(cipherText: encryptedXml!, encodingAESKey: client.Credentials.PushEncodingAESKey!, out _); return Utilities.XmlUtility.Deserialize(callbackXml); } catch (WechatWorkException) @@ -156,12 +156,12 @@ namespace SKIT.FlurlHttpClient.Wechat.Work { string timestamp = DateTimeOffset.Now.ToLocalTime().ToUnixTimeSeconds().ToString(); string nonce = DateTimeOffset.Now.Ticks.ToString("x"); - string cipher = Utilities.WechatEventDataCryptor.AESEncrypt( + string cipher = Utilities.WxMsgCryptor.AESEncrypt( plainText: json, encodingAESKey: client.Credentials.PushEncodingAESKey!, corpOrSuiteId: string.IsNullOrEmpty(client.Credentials.SuiteId) ? client.Credentials.CorpId : client.Credentials.SuiteId! ); - string sign = Utilities.WechatEventDataCryptor.GenerateSignature( + string sign = Utilities.WxMsgCryptor.GenerateSignature( sToken: client.Credentials.PushToken!, sTimestamp: timestamp, sNonce: nonce, @@ -212,13 +212,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Work try { - string cipher = Utilities.WechatEventDataCryptor.AESEncrypt( + string cipher = Utilities.WxMsgCryptor.AESEncrypt( plainText: xml, encodingAESKey: client.Credentials.PushEncodingAESKey!, corpOrSuiteId: string.IsNullOrEmpty(client.Credentials.SuiteId) ? client.Credentials.CorpId : client.Credentials.SuiteId! ); - xml = Utilities.WechatEventDataCryptor.WrapXml(sToken: client.Credentials.PushToken!, sMsgEncrypt: cipher); + xml = Utilities.WxMsgCryptor.WrapXml(sToken: client.Credentials.PushToken!, sMsgEncrypt: cipher); } catch (Exception ex) { @@ -251,7 +251,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work try { - bool ret = Utilities.WechatEventDataCryptor.VerifySignature( + bool ret = Utilities.WxMsgCryptor.VerifySignature( sToken: client.Credentials.PushToken!, sTimestamp: callbackTimestamp, sNonce: callbackNonce, @@ -261,7 +261,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work if (ret) { - replyEcho = Utilities.WechatEventDataCryptor.AESDecrypt(cipherText: callbackEcho, encodingAESKey: client.Credentials.PushEncodingAESKey!, out _); + replyEcho = Utilities.WxMsgCryptor.AESDecrypt(cipherText: callbackEcho, encodingAESKey: client.Credentials.PushEncodingAESKey!, out _); return true; } } @@ -291,7 +291,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work try { var encryptedEvent = client.JsonSerializer.Deserialize(callbackJson); - return Utilities.WechatEventDataCryptor.VerifySignature( + return Utilities.WxMsgCryptor.VerifySignature( sToken: client.Credentials.PushToken!, sTimestamp: callbackTimestamp, sNonce: callbackNonce, @@ -327,7 +327,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work XDocument xDoc = XDocument.Parse(callbackXml); string? msgEncrypt = xDoc.Root?.Element("Encrypt")?.Value; - return Utilities.WechatEventDataCryptor.VerifySignature( + return Utilities.WxMsgCryptor.VerifySignature( sToken: client.Credentials.PushToken!, sTimestamp: callbackTimestamp, sNonce: callbackNonce, diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Utilities/Internal/WechatEventDataCryptor.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Utilities/Internal/WxMsgCryptor.cs similarity index 99% rename from src/SKIT.FlurlHttpClient.Wechat.Work/Utilities/Internal/WechatEventDataCryptor.cs rename to src/SKIT.FlurlHttpClient.Wechat.Work/Utilities/Internal/WxMsgCryptor.cs index 5666c4af..f53b5344 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Work/Utilities/Internal/WechatEventDataCryptor.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Utilities/Internal/WxMsgCryptor.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -10,7 +10,7 @@ using System.Xml; namespace SKIT.FlurlHttpClient.Wechat.Work.Utilities { - internal static class WechatEventDataCryptor + internal static class WxMsgCryptor { private const int AES_KEY_SIZE = 256; private const int AES_BLOCK_SIZE = 128; diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/TestCase_WechatEventDataCryptorTests.cs b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/TestCase_WechatEventDataCryptorTests.cs index f023d253..bd77f8a4 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/TestCase_WechatEventDataCryptorTests.cs +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/TestCase_WechatEventDataCryptorTests.cs @@ -1,8 +1,8 @@ -using Xunit; +using Xunit; namespace SKIT.FlurlHttpClient.Wechat.Api.UnitTests { - public class TestCase_WechatEventDataCryptorTests + public class TestCase_WxMsgCryptorTests { [Fact(DisplayName = "测试用例:验签并解密回调数据")] public void TestVerifyAndDecryptEvent() @@ -15,12 +15,12 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.UnitTests string reqNonce = "1372623149"; string reqCipherText = "RypEvHKD8QQKFhvQ6QleEB4J58tiPdvo+rtK1I9qca6aM/wvqnLSV5zEPeusUiX5L5X/0lWfrf0QADHHhGd3QczcdCUpj911L3vg3W/sYYvuJTs3TUUkSUXxaccAS0qhxchrRYt66wiSpGLYL42aM6A8dTT+6k4aSknmPj48kzJs8qLjvd4Xgpue06DOdnLxAUHzM6+kDZ+HMZfJYuR+LtwGc2hgf5gsijff0ekUNXZiqATP7PF5mZxZ3Izoun1s4zG4LUMnvw2r+KqCKIw+3IQH03v+BCA9nMELNqbSf6tiWSrXJB3LAVGUcallcrw8V2t9EL4EhzJWrQUax5wLVMNS0+rUPA3k22Ncx4XXZS9o0MBH27Bo6BpNelZpS+/uh9KsNlY6bHCmJU9p8g7m3fVKn28H3KDYA5Pl/T8Z1ptDAVe0lXdQ2YoyyH2uyPIGHBZZIs2pDBS8R07+qN+E7Q=="; - string actualPlain = Utilities.WechatEventDataCryptor.AESDecrypt(reqCipherText, aesKey, out string actualAppId); + string actualPlain = Utilities.WxMsgCryptor.AESDecrypt(reqCipherText, aesKey, out string actualAppId); string expectedPlain = "\n\n1409659813\n\n\n4561255354251345929\n218\n"; Assert.Equal(expectedPlain, actualPlain); Assert.Equal(appId, actualAppId); - Assert.True(Utilities.WechatEventDataCryptor.VerifySignature(token, reqTimeStamp, reqNonce, reqCipherText, reqMsgSig)); + Assert.True(Utilities.WxMsgCryptor.VerifySignature(token, reqTimeStamp, reqNonce, reqCipherText, reqMsgSig)); } [Fact(DisplayName = "测试用例:验签回调数据")] @@ -32,7 +32,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.UnitTests string reqNonce = "1811081856"; string reqCipherText = "Q/jUxIL3/jRaFeTKesIr1QSq2SOEApDqlzcRrRM6Jlk4EbMBns3plPOR/W3gThOEq+zYI42fNSoIUb3cQwt9zyD1aLU/7D3WNLute7LQ9LSHjZEfVmx5zcIR9zvrUWGjhe1whTPH4e1WR6vbOYs8o/bDRF0vX/NcE4XK7P83Y6CzQiJoKbjVCne84s0zcw5eh+ZUDB55eaDHPSoS7kAC8kB00pfBoDF0jyfc8CUKLW97e72vJGyUWjZ0BvYN+R+tFjMgEzg/EN1imuuFnf40DMAcvB6y+C97TuaWjpgfRdowGWzn10JAFNukRfQqjdA0e2bfczJ7+t9w/t8/XSMADJOt1xbnP+I5cRX/r7ueBGmG/6ejP3myO9yTXHdujGvwrXHuWw+J7qD4VoUVjbm2vQ1qQKbrweKssr6O+3XSbanZ5R3n26EpN/gfgX+r6rcGViqsFop9Ai9xMnfJUubB6Q=="; - Assert.True(Utilities.WechatEventDataCryptor.VerifySignature(token, reqTimeStamp, reqNonce, reqCipherText, reqMsgSig)); + Assert.True(Utilities.WxMsgCryptor.VerifySignature(token, reqTimeStamp, reqNonce, reqCipherText, reqMsgSig)); } } } diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/EventSamples/Platform/ThirdKf/UserEnterEvent.xml b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/EventSamples/ThirdKf/UserEnterEvent.xml similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/EventSamples/Platform/ThirdKf/UserEnterEvent.xml rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/EventSamples/ThirdKf/UserEnterEvent.xml diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/EventSamples/Platform/ThirdKf/UserQuitEvent.xml b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/EventSamples/ThirdKf/UserQuitEvent.xml similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/EventSamples/Platform/ThirdKf/UserQuitEvent.xml rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/EventSamples/ThirdKf/UserQuitEvent.xml diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/Dialog/AIBotRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Dialog/AIBotRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/Dialog/AIBotRequest.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Dialog/AIBotRequest.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/Dialog/AIBotResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Dialog/AIBotResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/Dialog/AIBotResponse.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Dialog/AIBotResponse.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/Dialog/GetHotQueryDetailResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Dialog/GetHotQueryDetailResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/Dialog/GetHotQueryDetailResponse.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Dialog/GetHotQueryDetailResponse.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/Dialog/GetHotQueryListResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Dialog/GetHotQueryListResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/Dialog/GetHotQueryListResponse.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Dialog/GetHotQueryListResponse.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/Dialog/SignRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Dialog/SignRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/Dialog/SignRequest.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Dialog/SignRequest.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/Dialog/SignResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Dialog/SignResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/Dialog/SignResponse.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Dialog/SignResponse.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPDocumentClassifyRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPDocumentClassifyRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPDocumentClassifyRequest.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPDocumentClassifyRequest.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPDocumentClassifyResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPDocumentClassifyResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPDocumentClassifyResponse.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPDocumentClassifyResponse.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPGetSimilarQueryRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPGetSimilarQueryRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPGetSimilarQueryRequest.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPGetSimilarQueryRequest.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPGetSimilarQueryResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPGetSimilarQueryResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPGetSimilarQueryResponse.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPGetSimilarQueryResponse.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPNERRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPNERRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPNERRequest.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPNERRequest.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPNERResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPNERResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPNERResponse.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPNERResponse.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPNewsAbstractionRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPNewsAbstractionRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPNewsAbstractionRequest.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPNewsAbstractionRequest.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPNewsAbstractionResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPNewsAbstractionResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPNewsAbstractionResponse.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPNewsAbstractionResponse.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPRankRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPRankRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPRankRequest.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPRankRequest.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPRankResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPRankResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPRankResponse.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPRankResponse.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPRecommendQuestionsRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPRecommendQuestionsRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPRecommendQuestionsRequest.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPRecommendQuestionsRequest.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPRecommendQuestionsResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPRecommendQuestionsResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPRecommendQuestionsResponse.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPRecommendQuestionsResponse.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPSensitiveRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPSensitiveRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPSensitiveRequest.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPSensitiveRequest.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPSensitiveResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPSensitiveResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPSensitiveResponse.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPSensitiveResponse.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPSentimentRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPSentimentRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPSentimentRequest.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPSentimentRequest.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPSentimentResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPSentimentResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPSentimentResponse.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPSentimentResponse.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPTokenizeRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPTokenizeRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPTokenizeRequest.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPTokenizeRequest.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPTokenizeResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPTokenizeResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPTokenizeResponse.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPTokenizeResponse.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPTranslateEnglish2ChineseRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPTranslateEnglish2ChineseRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPTranslateEnglish2ChineseRequest.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPTranslateEnglish2ChineseRequest.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPTranslateEnglish2ChineseResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPTranslateEnglish2ChineseResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/Platform/NLP/NLPTranslateEnglish2ChineseResponse.json rename to test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/NLP/NLPTranslateEnglish2ChineseResponse.json diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Api/ApiGetWelcomeMessageRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Api/ApiGetWelcomeMessageRequest.json deleted file mode 100644 index bb992f19..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Api/ApiGetWelcomeMessageRequest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "channelId": "sXRdXepMU58WyAV3xgT2F14PzXi4ya" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Api/ApiGetWelcomeMessageResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Api/ApiGetWelcomeMessageResponse.json deleted file mode 100644 index 22c147f0..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Api/ApiGetWelcomeMessageResponse.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "code": 0, - "data": { - "list": [ - { - "source": 1, - "msgType": "text", - "welcomeMsg": "你好", - "msgId": "5248", - "label": "全部", - "newSendInterval": 0 - } - ], - "total": 1 - }, - "request_id": "18024ec0-837e-4873-825a-922247d4e57f" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Api/ApiSetWelcomeMessageRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Api/ApiSetWelcomeMessageRequest.json deleted file mode 100644 index 1cab2ed7..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Api/ApiSetWelcomeMessageRequest.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "channelId": "sXRdXepMU58WyAV3xgT2F14PzXi4ya", - "msgType": "text", - "newSendInterval": 0, - "source": 1, - "welcomeMsg": "你好", - "lableId": "", - "msgId": "5500" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Api/ApiSetWelcomeMessageResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Api/ApiSetWelcomeMessageResponse.json deleted file mode 100644 index 48e111f3..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Api/ApiSetWelcomeMessageResponse.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "code": 0, - "request_id": "f9da2eba-98f9-4b51-a68c-5bc7c537e539" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Async/AsyncFetchResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Async/AsyncFetchResponse.json deleted file mode 100644 index 7140efce..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Async/AsyncFetchResponse.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "code": 0, - "msg": "", - "data": { - "cost": "22496769ms", - "progress": "100/100", - "state": 2, - "url": "http://openai-75050.gzc.vod.tencent-cloud.com/40238_knowledge1588562918359.csv" - } -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotDeleteResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotDeleteResponse.json deleted file mode 100644 index 8645f484..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotDeleteResponse.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "code": 0, - "data": { - "task_id": "172ead02b7a14bfd8aac43939c0e2cb3" - }, - "msg": "success", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotEffectiveProgressRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotEffectiveProgressRequest.json deleted file mode 100644 index ec5af8b6..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotEffectiveProgressRequest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "env": "debug" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotEffectiveProgressResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotEffectiveProgressResponse.json deleted file mode 100644 index 2a1b2c4c..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotEffectiveProgressResponse.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "code": 0, - "msg": "success", - "data": { - "progress": 100, - "status": 1 - }, - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotExportResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotExportResponse.json deleted file mode 100644 index 10297023..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotExportResponse.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "data": { - "task_id": "337cd9d9-210c-4a59-972e-1c8df8c18adb" - }, - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotGetDetailResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotGetDetailResponse.json deleted file mode 100644 index 68230919..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotGetDetailResponse.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "code": 0, - "data": { - "default_answer": null, - "default_answer_switch": true, - "id": "3yrw9n5uknsox1pwzyz9ohb2eu4ta4wo", - "name_ch": "测试bot000121", - "name_en": "testBot000121", - "nickname": null, - "similar_question_recommend_num": 5, - "similarity": 0.9, - "similarity_low": 0.7, - "user_feedback": false, - "industry": 2, - "bot_type": 0 - }, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotGetListRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotGetListRequest.json deleted file mode 100644 index 35259198..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotGetListRequest.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "keyword": "测试", - "page": 1, - "size": 10, - "bot_type": -1 -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotGetListResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotGetListResponse.json deleted file mode 100644 index 9c8cf7ed..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotGetListResponse.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "code": 0, - "data": { - "count": 4, - "default_bot_count": 3, - "live_bot_count": 1, - "list": [ - { - "id": "3yrw9n5uknsox1pwzyz9ohb2eu4ta4wo", - "name_ch": "测试bot000121", - "name_en": "testBot000121", - "auth": 200, - "bot_type": 0 - }, - { - "id": "sbcvmbvxrdkjg0axix5c9driwfwqbkum", - "name_ch": "测试bot0001211", - "name_en": "testBot0001211", - "auth": 200, - "bot_type": 1 - }, - { - "id": "td6kko408oo5afll4b7dh3l3ybmtsrgi", - "name_ch": "测试bot000111", - "name_en": "testBot00211", - "auth": 200, - "bot_type": 0 - }, - { - "id": "81wfgwcjmenfs3kkapwa97hwqfnrbu1z", - "name_ch": "测试bot00013", - "name_en": "testBot00013", - "auth": 200, - "bot_type": 0 - } - ] - }, - "msg": "success", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotImportJsonRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotImportJsonRequest.json deleted file mode 100644 index e446f1fc..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotImportJsonRequest.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "mode": 0, - "data": [ - { - "skill": "吃啥", - "intent": "中午吃什么", - "threshold": "0.9", - "disable": false, - "questions": ["中午吃什么?", "中午吃啥?"], - "answers": ["面条", "包子"] - } - ] -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotImportJsonResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotImportJsonResponse.json deleted file mode 100644 index 265d9c2c..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotImportJsonResponse.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "code": 0, - "data": { - "task_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" - }, - "msg": "", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotImportRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotImportRequest.json deleted file mode 100644 index 55585a9f..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotImportRequest.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "file_key": "fe48940d7310e79d6bf0a4aced56d522", - "cover": false -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotImportResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotImportResponse.json deleted file mode 100644 index 10297023..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotImportResponse.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "data": { - "task_id": "337cd9d9-210c-4a59-972e-1c8df8c18adb" - }, - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotPublishGetRecordRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotPublishGetRecordRequest.json deleted file mode 100644 index 242805a9..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotPublishGetRecordRequest.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "page": 0, - "size": 8 -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotPublishGetRecordResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotPublishGetRecordResponse.json deleted file mode 100644 index 544d9007..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotPublishGetRecordResponse.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "code": 0, - "data": { - "count": 3, - "list": [ - { - "created_time": "2020-08-21 18:00:51", - "description": "", - "id": "65", - "open_id": "123456", - "status": 8, - "sync_status": 0 - }, - { - "created_time": "2020-08-21 19:00:52", - "description": "", - "id": "79", - "open_id": "123456", - "status": 8, - "sync_status": 1 - }, - { - "created_time": "2020-08-21 20:00:53", - "description": "", - "id": "555", - "open_id": "123456", - "status": 9, - "sync_status": 2 - } - ] - }, - "msg": "success", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotPublishResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotPublishResponse.json deleted file mode 100644 index cb48d138..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotPublishResponse.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "code": 0, - "data": { - "task_id": "b86a904600eb4a2e940beb8af8d5c0d3" - }, - "msg": "success", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotSaveRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotSaveRequest.json deleted file mode 100644 index f067668d..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotSaveRequest.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name_ch": "中文234", - "name_en": "en134", - "nickname": "测试", - "default_answer": "你好", - "default_answer_switch": true, - "similarity": 0.9, - "similarity_low": 0.7, - "similar_question_recommend_num": 5, - "user_feedback": true, - "industry": 2, - "bot_type": 0 -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotSaveResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotSaveResponse.json deleted file mode 100644 index 81cbd071..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotSaveResponse.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "code": 0, - "data": { - "id": "dzcmrij0zyvexs4llblxepwclfvnq3fv" - }, - "msg": "success", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotTestResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotTestResponse.json deleted file mode 100644 index f4fa4f5b..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Bot/BotTestResponse.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "code": 0, - "data": { - "ans_node_id": 9620273, - "ans_node_name": "吃啥", - "answer": "包子", - "answer_type": "text", - "bot_state": { - "err_msg": "", - "last_effective_time": "20210827113707" - }, - "create_time": "1630035702", - "status": "GENERAL_FAQ", - "title": "中午吃什么" - }, - "msg": "", - "request_id": "32482" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionaryDeleteRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionaryDeleteRequest.json deleted file mode 100644 index 6181b32f..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionaryDeleteRequest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "id_list": [1, 2, 3] -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionaryDeleteResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionaryDeleteResponse.json deleted file mode 100644 index 298a09c0..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionaryDeleteResponse.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionaryGetAllListResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionaryGetAllListResponse.json deleted file mode 100644 index 4274c647..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionaryGetAllListResponse.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "code": 0, - "data": { - "sys": { - "count": 243, - "list": [ - { - "id": 1, - "name_ch": "时间范围类", - "name_en": "$vd_time_range" - } - ] - }, - "user": { - "count": 19, - "list": [ - { - "id": 100765, - "name_ch": "美美美", - "name_en": "mmm" - }, - { - "id": 100783, - "name_ch": "测试重复词条", - "name_en": "testduplacte" - } - ] - } - }, - "msg": "", - "request_id": "" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionaryGetBuiltinListResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionaryGetBuiltinListResponse.json deleted file mode 100644 index 4c6d87d1..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionaryGetBuiltinListResponse.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "code": 0, - "data": { - "count": 2, - "list": [ - { - "name_ch": "测试词典000411", - "name_en": "testDict000411" - }, - { - "name_ch": "中文版但是", - "name_en": "fdfewf" - } - ] - }, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionaryGetListRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionaryGetListRequest.json deleted file mode 100644 index c43e8d94..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionaryGetListRequest.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "keyword": "", - "page": 1, - "size": 2 -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionaryGetListResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionaryGetListResponse.json deleted file mode 100644 index b3bcd0d3..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionaryGetListResponse.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "code": 0, - "data": { - "count": 19, - "list": [ - { - "id": 100765, - "name_ch": "美美美", - "name_en": "mmm" - }, - { - "id": 100783, - "name_ch": "测试重复词条", - "name_en": "testduplacte" - } - ] - }, - "msg": "", - "request_id": "" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionarySaveRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionarySaveRequest.json deleted file mode 100644 index 7a75dc5a..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionarySaveRequest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "data": [ - { - "id": 1, - "name_en": "test1", - "name_ch": "测试1" - }, - { - "id": 2, - "name_en": "test2", - "name_ch": "测试2" - } - ] -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionarySaveResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionarySaveResponse.json deleted file mode 100644 index 298a09c0..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Dictionary/DictionarySaveResponse.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/File/FileUploadResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/File/FileUploadResponse.json deleted file mode 100644 index 41d6fe78..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/File/FileUploadResponse.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142", - "data": { - "file_key": "fe48940d7310e79d6bf0a4aced56d522" - } -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Config/IntentConfigGetRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Config/IntentConfigGetRequest.json deleted file mode 100644 index 9e36b20e..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Config/IntentConfigGetRequest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "intent_id": 1205882 -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Config/IntentConfigGetResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Config/IntentConfigGetResponse.json deleted file mode 100644 index 6c738a35..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Config/IntentConfigGetResponse.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142", - "data": { - "slots": [ - { - "name": "城市", - "dicts": ["建筑", "公路"], - "keep_ask": true, - "ask_content": ["建筑1", "公路1"] - } - ], - "pre": [ - { - "skill": "音乐", - "intent": "点播" - } - ], - "next": [ - { - "skill": "天气", - "intent": "询问" - } - ], - "keep_ask": true, - "keep_ask_num": 10, - "answer_config_type": 4, - "dynamic_ask_answer_config": { - "api": "_dynamic_list_selection_{}", - "question": "AskAnswerConfigQuestion", - "result": [ - { - "code": "0", - "desc": "", - "answer_config_type": 3, - "answer": "", - "ask_answer_config": { - "api": "_bot_ask_{}", - "question": "AskAnswerConfigQuestion", - "result": [ - { - "code": "0", - "desc": "", - "answer_config_type": 2, - "answer": "", - "ask_slot_answer_config": { - "api": "_bot_getinfo_{}", - "arguments": [ - { - "name": "", - "slot": "Slot", - "ask_content": ["111", "222"] - } - ], - "result": [ - { - "code": "0", - "desc": "", - "answer_config_type": 1, - "answer": "", - "api_answer_config": { - "api": "_http_service_{}", - "need_confirm": true, - "need_confirm_response": "城市好啊", - "http_method": "get", - "http_url": "HttpUrl111", - "arguments": { - "input": [ - { - "name": "InputName", - "input": true, - "desc": "Inputdesc", - "slot": "InputSlot", - "default_value": "defa", - "ask_content": [ - "ask" - ] - } - ], - "output": [ - { - "name": "OutputName", - "input": false, - "desc": "desc", - "slot": "OutputSlot", - "default_value": "" - } - ] - }, - "result": [ - { - "code": "0", - "desc": "", - "answer_config_type": 0, - "answer": "", - "normal_answer_config": { - "merge_answer": true, - "answer": [ - { - "type": 0, - "content": "我在哪" - }, - { - "type": 1, - "content": { - "title": "我是h5", - "description": "我是Description", - "url": "我是Url", - "pic_url": "我是PicUrl", - "type": "h5" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Config/IntentConfigSaveRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Config/IntentConfigSaveRequest.json deleted file mode 100644 index 94c34c1c..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Config/IntentConfigSaveRequest.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "intent_id": 9617433, - "skill_id": 1549251, - "slots": [ - { - "name": "城市", - "dicts": ["建筑", "公路"], - "keep_ask": true, - "ask_content": ["建筑1", "公路1"] - } - ], - "pre": [ - { - "skill": "音乐", - "intent": "点播" - } - ], - "next": [ - { - "skill": "天气", - "intent": "询问" - } - ], - "keep_ask": true, - "keep_ask_num": 10, - "answer_config_type": 4, - "dynamic_ask_answer_config": { - "api": "_dynamic_list_selection_{}", - "question": "AskAnswerConfig Question", - "result": [ - { - "code": "0", - "desc": "", - "answer_config_type": 3, - "answer": "", - "ask_answer_config": { - "api": "_bot_ask_{}", - "question": "AskAnswerConfig Question", - "result": [ - { - "code": "0", - "desc": "", - "answer_config_type": 2, - "answer": "", - "ask_slot_answer_config": { - "api": "_bot_getinfo_{}", - "arguments": [ - { - "name": "", - "slot": "Slot", - "ask_content": ["111", "222"] - } - ], - "result": [ - { - "code": "0", - "desc": "", - "answer_config_type": 1, - "answer": "", - "api_answer_config": { - "api": "_http_service_{}", - "need_confirm": true, - "need_confirm_response": "城市好啊", - "http_method": "get", - "http_url": "HttpUrl111", - "arguments": { - "input": [ - { - "name": "Input Name", - "input": true, - "desc": "Input desc", - "slot": "Input Slot", - "default_value": "defa", - "ask_content": ["ask"] - } - ], - "output": [ - { - "name": "Output Name", - "input": false, - "desc": "desc", - "slot": "Output Slot", - "default_value": "" - } - ] - }, - "result": [ - { - "code": "0", - "desc": "", - "answer_config_type": 0, - "answer": "", - "normal_answer_config": { - "merge_answer": true, - "answer": [ - { - "content": "我在哪" - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Config/IntentConfigSaveResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Config/IntentConfigSaveResponse.json deleted file mode 100644 index 298a09c0..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Config/IntentConfigSaveResponse.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentDeleteRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentDeleteRequest.json deleted file mode 100644 index 1d581665..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentDeleteRequest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "id_list": [1205882, 1205883, 1205884] -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentDeleteResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentDeleteResponse.json deleted file mode 100644 index 3466e6ce..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentDeleteResponse.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "code": 0, - "msg": "success", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentGetDetailRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentGetDetailRequest.json deleted file mode 100644 index 85cd7858..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentGetDetailRequest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "id": 6326248 -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentGetDetailResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentGetDetailResponse.json deleted file mode 100644 index ed0d912f..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentGetDetailResponse.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "code": 0, - "data": { - "id": 6326248, - "name": "温度bab1", - "questions": [ - { - "counter_example": true, - "id": 92, - "question": "今天温度怎么样e", - "rank_level": 1, - "threshold": 0.9 - } - ], - "rank_level": 1, - "skill_id": 1205882, - "switch": false, - "threshold": 0.9, - "frequency": 0, - "updated_time": 1588931008 - }, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentNameExistRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentNameExistRequest.json deleted file mode 100644 index c6079ea4..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentNameExistRequest.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "skill_id": 1548171, - "intent_name": "温度" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentNameExistResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentNameExistResponse.json deleted file mode 100644 index bcb0b901..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentNameExistResponse.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "code": 0, - "msg": "success", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142", - "data": { - "exist": true - } -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentSaveRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentSaveRequest.json deleted file mode 100644 index 05595df0..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentSaveRequest.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "intent_list": [ - { - "intent_id": 0, - "skill_id": 1, - "name": "测试创建意图1", - "rank_level": 0.65, - "threshold": 0.7, - "switch": false - }, - { - "intent_id": 0, - "skill_id": 1, - "name": "测试创建意图2", - "rank_level": 0.75, - "threshold": 0.7, - "switch": true - } - ] -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentSaveResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentSaveResponse.json deleted file mode 100644 index 108aef96..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentSaveResponse.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "code": 0, - "msg": "success", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142", - "data": { - "count": 2, - "list": [ - { - "intent_id": 45, - "intent_name": "测试创建意图1" - }, - { - "intent_id": 20, - "intent_name": "测试创建意图2" - } - ] - } -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentSearchRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentSearchRequest.json deleted file mode 100644 index 4501185f..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentSearchRequest.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "keyword": "测试", - "page": 1, - "size": 10 -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentSearchResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentSearchResponse.json deleted file mode 100644 index c45cfc8f..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentSearchResponse.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "code": 0, - "data": { - "count": 3, - "list": [ - { - "intent_id": 1516, - "intent_name": "笑什么?", - "skill_id": 7895, - "skill_name": "测试技能4" - }, - { - "intent_id": 1517, - "intent_name": "测试意图333", - "skill_id": 7899, - "skill_name": "技能5" - }, - { - "intent_id": 2, - "intent_name": "测试意图666", - "skill_id": 7899, - "skill_name": "技能5" - } - ] - }, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentSwitchBatchRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentSwitchBatchRequest.json deleted file mode 100644 index 39eebe54..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentSwitchBatchRequest.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "switch_list": [ - { - "id": 1205882, - "switch": true - }, - { - "id": 1205883, - "switch": false - } - ] -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentSwitchBatchResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentSwitchBatchResponse.json deleted file mode 100644 index 298a09c0..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/IntentSwitchBatchResponse.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Question/IntentQuestionDeleteRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Question/IntentQuestionDeleteRequest.json deleted file mode 100644 index 6181b32f..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Question/IntentQuestionDeleteRequest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "id_list": [1, 2, 3] -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Question/IntentQuestionDeleteResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Question/IntentQuestionDeleteResponse.json deleted file mode 100644 index 3466e6ce..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Question/IntentQuestionDeleteResponse.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "code": 0, - "msg": "success", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Question/IntentQuestionSaveRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Question/IntentQuestionSaveRequest.json deleted file mode 100644 index 0b02343b..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Question/IntentQuestionSaveRequest.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "mode": 0, - "skill_id": 16579, - "skill_name": "", - "intent_id": 1205882, - "intent_name": "", - "data": [ - { - "id": 0, - "question": "天气", - "rank_level": 0.9, - "threshold": 0.8, - "counter_example": false - }, - { - "id": 0, - "question": "温度", - "rank_level": 0.8, - "threshold": 0.8, - "counter_example": false - } - ] -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Question/IntentQuestionSaveResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Question/IntentQuestionSaveResponse.json deleted file mode 100644 index 3466e6ce..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Intent/Question/IntentQuestionSaveResponse.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "code": 0, - "msg": "success", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/OpenApi/OpenApiCreateRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/OpenApi/OpenApiCreateRequest.json deleted file mode 100644 index c1acd0f6..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/OpenApi/OpenApiCreateRequest.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "张三", - "phone": "18833008888", - "wechat": "aaaa", - "email": "123@qq.com", - "address": "北京市海淀区中国技术交易大厦F7" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/OpenApi/OpenApiCreateResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/OpenApi/OpenApiCreateResponse.json deleted file mode 100644 index 75cfc9eb..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/OpenApi/OpenApiCreateResponse.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142", - "data": { - "appid": "5i2YaWnq56844yh", - "token": "d9tvK4Z3jHp0SW3758x89550oj789k", - "aes_key": "lKq5xB3W675330C6ftaLm3n3gb450Iz4ee880K2Hz16" - } -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/OpenApi/OpenApiGetDetailResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/OpenApi/OpenApiGetDetailResponse.json deleted file mode 100644 index 75cfc9eb..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/OpenApi/OpenApiGetDetailResponse.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142", - "data": { - "appid": "5i2YaWnq56844yh", - "token": "d9tvK4Z3jHp0SW3758x89550oj789k", - "aes_key": "lKq5xB3W675330C6ftaLm3n3gb450Iz4ee880K2Hz16" - } -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/OpenApi/OpenApiResetResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/OpenApi/OpenApiResetResponse.json deleted file mode 100644 index 75cfc9eb..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/OpenApi/OpenApiResetResponse.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142", - "data": { - "appid": "5i2YaWnq56844yh", - "token": "d9tvK4Z3jHp0SW3758x89550oj789k", - "aes_key": "lKq5xB3W675330C6ftaLm3n3gb450Iz4ee880K2Hz16" - } -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillDeleteRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillDeleteRequest.json deleted file mode 100644 index cb2ec9d2..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillDeleteRequest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "id": [1205880] -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillDeleteResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillDeleteResponse.json deleted file mode 100644 index 298a09c0..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillDeleteResponse.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillGetDetailRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillGetDetailRequest.json deleted file mode 100644 index 722d1b0d..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillGetDetailRequest.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "skill_id": 1243671, - "keyword": "", - "page": 1, - "size": 1 -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillGetDetailResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillGetDetailResponse.json deleted file mode 100644 index 9d16c0ed..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillGetDetailResponse.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "code": 0, - "data": { - "intents": { - "count": 4559, - "list": [ - { - "created_time": 1604308818, - "id": 7541523, - "name": "什么是正教?", - "rank_level": 0.8, - "skill_id": 1243671, - "switch": true, - "threshold": 0.8, - "updated_time": 1604309309 - } - ] - }, - "skill": { - "awaken_answer": [], - "awaken_word": "", - "cancel_answer": [], - "cancel_intent_operation": false, - "exist_answer": [], - "exist_word": "", - "id": 1243671, - "intent_count": 0, - "max_round": 10, - "name": "知识图谱", - "no_cancel_answer": [], - "switch": true, - "type": 0, - "wake_open": false - } - }, - "msg": "success", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillGetListRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillGetListRequest.json deleted file mode 100644 index e16175ba..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillGetListRequest.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "skill_type": 0, - "keyword": "天气" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillGetListResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillGetListResponse.json deleted file mode 100644 index 3c827cf0..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillGetListResponse.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": 0, - "data": { - "count": 2, - "list": [ - { - "id": 1205880, - "intent_count": 0, - "no_answer_intent_count": 0, - "type": 1, - "name": "天气询问", - "max_round": 10, - "wake_open": true, - "awaken_word": "你好", - "awaken_answer": ["有什么可以帮忙的吗"], - "exist_word": "再见", - "exist_answer": ["祝您好运"], - "cancel_intent_operation": true, - "cancel_answer": ["已取消"], - "no_cancel_answer": ["没有可以取消的内容"] - } - ] - }, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillSaveRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillSaveRequest.json deleted file mode 100644 index 7add15c3..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillSaveRequest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "id": 1205880, - "type": 1, - "name": "天气询问", - "max_round": 10, - "wake_open": true, - "awaken_word": "你好", - "awaken_answer": ["有什么可以帮忙的吗"], - "exist_word": "再见", - "exist_answer": ["祝您好运"], - "cancel_intent_operation": true, - "cancel_answer": ["已取消"], - "no_cancel_answer": ["没有可以取消的内容"] -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillSaveResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillSaveResponse.json deleted file mode 100644 index d7b77646..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Skill/SkillSaveResponse.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142", - "data": { - "id": 1205882 - } -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreBotAcquireStateUpdateRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreBotAcquireStateUpdateRequest.json deleted file mode 100644 index 3607bee0..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreBotAcquireStateUpdateRequest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "skill_id": "23e21b8d4e226d046b4e" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreBotAcquireStateUpdateResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreBotAcquireStateUpdateResponse.json deleted file mode 100644 index 3466e6ce..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreBotAcquireStateUpdateResponse.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "code": 0, - "msg": "success", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreBotSwitchStateUpdateRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreBotSwitchStateUpdateRequest.json deleted file mode 100644 index ccbb0105..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreBotSwitchStateUpdateRequest.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "skill_id": "21c705957fc5af9fc32e", - "on_bot_id_list": [ - "1dzcmrij0zyvexs4llblxepwclfvnq3fv", - "2dzcmrij0zyvexs4llblxepwclfvnq3fv" - ], - "off_bot_id_list": [ - "dzcmrij0zyvexs4llblxepwclfvnq3fv", - "3dzcmrij0zyvexs4llblxepwclfvnq3fv" - ] -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreBotSwitchStateUpdateResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreBotSwitchStateUpdateResponse.json deleted file mode 100644 index 3466e6ce..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreBotSwitchStateUpdateResponse.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "code": 0, - "msg": "success", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreBuiltinSkillSwitchUpdateRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreBuiltinSkillSwitchUpdateRequest.json deleted file mode 100644 index a082f293..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreBuiltinSkillSwitchUpdateRequest.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "skill_name": "天气", - "on_bot_id_list": [ - "1dzcmrij0zyvexs4llblxepwclfvnq3fv", - "2dzcmrij0zyvexs4llblxepwclfvnq3fv" - ], - "off_bot_id_list": [ - "dzcmrij0zyvexs4llblxepwclfvnq3fv", - "3dzcmrij0zyvexs4llblxepwclfvnq3fv" - ] -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreBuiltinSkillSwitchUpdateResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreBuiltinSkillSwitchUpdateResponse.json deleted file mode 100644 index 3466e6ce..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreBuiltinSkillSwitchUpdateResponse.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "code": 0, - "msg": "success", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreGetListRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreGetListRequest.json deleted file mode 100644 index 7337ad13..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreGetListRequest.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "category": "", - "keyword": "", - "order": 1, - "page": 1, - "size": 10 -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreGetListResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreGetListResponse.json deleted file mode 100644 index 4e1249dc..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/SkillStore/SkillStoreGetListResponse.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "code": 0, - "data": { - "count": 6, - "list": [ - { - "acquired": false, - "bot_info": { - "count": 2, - "on_num": 1 - }, - "bot_name": "讲笑话机器人", - "category": "游戏", - "desc": "提供多种娱乐技能,具体包括:讲情话、夸夸我、讲笑话、玩成语接龙等互动娱乐技能。其中擅长讲笑话,尤其是冷笑话;擅长讲情话,尤其是土味情话;还能提供花式夸人,玩成语接龙游戏等技能。", - "hot": 0, - "skill_id": "buarvgld1evpg4faxacg", - "skill_name": "小微欢乐多", - "state": 0, - "statement_case_list": ["讲笑话", "讲情话"], - "switch": true, - "update_time": "2020-07-29 11:38:39" - } - ] - }, - "msg": "success", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Slot/SlotDeleteRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Slot/SlotDeleteRequest.json deleted file mode 100644 index 6e53e7ba..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Slot/SlotDeleteRequest.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "id_list": [1], - "auto_delete_slot": true -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Slot/SlotDeleteResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Slot/SlotDeleteResponse.json deleted file mode 100644 index 298a09c0..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Slot/SlotDeleteResponse.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Slot/SlotGetListRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Slot/SlotGetListRequest.json deleted file mode 100644 index b8681617..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Slot/SlotGetListRequest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": 1 -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Slot/SlotGetListResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Slot/SlotGetListResponse.json deleted file mode 100644 index 81c99a53..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Slot/SlotGetListResponse.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "code": 0, - "data": { - "count": 1, - "list": [ - { - "ask_content": ["你好", "又是愉快第一天"], - "dicts": ["test1", "test2"], - "name": "test", - "id": 1, - "type": 1 - } - ] - }, - "msg": "Request succeeded", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Slot/SlotSaveRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Slot/SlotSaveRequest.json deleted file mode 100644 index f0182ffc..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Slot/SlotSaveRequest.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "data": [ - { - "id": 1, - "name": "test", - "dicts": ["test1", "test2"], - "ask_content": ["你好", "又是愉快第一天"], - "intent_id": 12334 - } - ] -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Slot/SlotSaveResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Slot/SlotSaveResponse.json deleted file mode 100644 index e6aa29e8..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Slot/SlotSaveResponse.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "code": 0, - "data": [ - { - "id": 251390, - "name": "test" - } - ], - "msg": "", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Statistics/DialogUserSpecifiedDateRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Statistics/DialogUserSpecifiedDateRequest.json deleted file mode 100644 index cd136e30..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Statistics/DialogUserSpecifiedDateRequest.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "start_date": "2021-08-11", - "end_date": "2021-08-18" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Statistics/DialogUserSpecifiedDateResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Statistics/DialogUserSpecifiedDateResponse.json deleted file mode 100644 index ec69610e..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Statistics/DialogUserSpecifiedDateResponse.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142", - "q_a_count": [ - { - "date": "2021-08-11", - "count": 911 - }, - { - "date": "2021-08-12", - "count": 1316 - } - ], - "user_count": [ - { - "date": "2021-08-11", - "count": 267 - } - ] -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Statistics/UserQueryYesterdayDataResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Statistics/UserQueryYesterdayDataResponse.json deleted file mode 100644 index ffe4ac7e..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Statistics/UserQueryYesterdayDataResponse.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5140", - "hit_rate": 0.94, - "q_a_count": 985, - "user_count": 280, - "hot_query_list": ["我想看新闻", "好听的歌", "我想知道今天天气"], - "miss_rate": 0.06000000000000005, - "new_news_count": 2021, - "new_news_user_count": 605, - "user_growth_rate": 0.16, - "hit_growth_rate": 0.02 -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Token/TokenRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Token/TokenRequest.json deleted file mode 100644 index 3859dd40..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Token/TokenRequest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "openid": "eafc6f616a3f0667800e0f92dc00ee88167bc010", - "resources": [ - "bot", - "common", - "dict", - "word", - "skill", - "intent", - "openapi", - "skill_store" - ], - "authorization_type": "client_credentials" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Token/TokenResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Token/TokenResponse.json deleted file mode 100644 index dffbcfac..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Token/TokenResponse.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "code": 0, - "data": { - "access_token": "MX6ddM5mN07ucVKy+Y-to7tKRufZ1YF05eb542d5170000001c" - }, - "msg": "success", - "request_id": "54ae04cf-5e95-44fd-ad3f-62e7b163836b" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/UnmatchedClass/UnmatchedClassDetailRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/UnmatchedClass/UnmatchedClassDetailRequest.json deleted file mode 100644 index 887a901d..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/UnmatchedClass/UnmatchedClassDetailRequest.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "sort": "asc", - "page_no": 1, - "page_size": 10, - "class_id": 12, - "date": "2021-08-23" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/UnmatchedClass/UnmatchedClassDetailResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/UnmatchedClass/UnmatchedClassDetailResponse.json deleted file mode 100644 index a493a81c..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/UnmatchedClass/UnmatchedClassDetailResponse.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142", - "data": { - "list": [ - { - "query": "你好啊啊啊", - "answer": "哈哈哈哈", - "count": 1 - } - ], - "page_no": 1, - "page_size": 10, - "total": 1 - } -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/UnmatchedClass/UnmatchedClassListRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/UnmatchedClass/UnmatchedClassListRequest.json deleted file mode 100644 index 8b40551f..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/UnmatchedClass/UnmatchedClassListRequest.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "sort": "asc", - "page_no": 1, - "page_size": 10, - "date": "2021-08-23" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/UnmatchedClass/UnmatchedClassListResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/UnmatchedClass/UnmatchedClassListResponse.json deleted file mode 100644 index ca07aec1..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/UnmatchedClass/UnmatchedClassListResponse.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142", - "data": { - "list": [ - { - "id": 1, - "count": 9, - "name": "哈哈哈哈" - } - ], - "page_no": 1, - "page_size": 10, - "total": 100 - } -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/User/UserRegisterRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/User/UserRegisterRequest.json deleted file mode 100644 index a41a75d9..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/User/UserRegisterRequest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "uid": "robot_2" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/User/UserRegisterResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/User/UserRegisterResponse.json deleted file mode 100644 index 82691b9c..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/User/UserRegisterResponse.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "code": 0, - "data": { - "openid": "e36926e48e9ddfe1cc1f3cb6c8813a38966c4b8d" - }, - "msg": "success", - "request_id": "363a6ce7-2908-4da0-a3a0-35539648eab6" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordDeleteBatchRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordDeleteBatchRequest.json deleted file mode 100644 index 6181b32f..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordDeleteBatchRequest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "id_list": [1, 2, 3] -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordDeleteBatchResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordDeleteBatchResponse.json deleted file mode 100644 index 298a09c0..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordDeleteBatchResponse.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordExportRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordExportRequest.json deleted file mode 100644 index 56b701ca..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordExportRequest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "dict_id": 1 -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordExportResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordExportResponse.json deleted file mode 100644 index 10297023..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordExportResponse.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "data": { - "task_id": "337cd9d9-210c-4a59-972e-1c8df8c18adb" - }, - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordImportJsonRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordImportJsonRequest.json deleted file mode 100644 index 4b6246f9..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordImportJsonRequest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "mode": 0, - "dict_id": 1, - "data": [ - { - "word": "AAA", - "synonyms": ["AA", "A"] - } - ] -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordImportJsonResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordImportJsonResponse.json deleted file mode 100644 index 265d9c2c..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordImportJsonResponse.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "code": 0, - "data": { - "task_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" - }, - "msg": "", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordImportRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordImportRequest.json deleted file mode 100644 index c9bfe4a0..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordImportRequest.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dict_id": 1, - "file_key": "fe48940d7310e79d6bf0a4aced56d522", - "cover": false -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordImportResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordImportResponse.json deleted file mode 100644 index 10297023..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordImportResponse.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "data": { - "task_id": "337cd9d9-210c-4a59-972e-1c8df8c18adb" - }, - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordUpdateBatchRequest.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordUpdateBatchRequest.json deleted file mode 100644 index 5c9f5936..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordUpdateBatchRequest.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "dict_id": 1, - "data": [ - { - "id": 1, - "name": "test", - "weight": 0.8, - "switch": true, - "synonyms": ["你好", "又是愉快第一天"] - } - ] -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordUpdateBatchResponse.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordUpdateBatchResponse.json deleted file mode 100644 index 298a09c0..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/ModelSamples/ThirdParty/Word/WordUpdateBatchResponse.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "code": 0, - "msg": "请求成功", - "request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142" -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/TestCase_CodeReview.cs b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/TestCase_CodeReview.cs index a1fc06b8..dacdbaf6 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/TestCase_CodeReview.cs +++ b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/TestCase_CodeReview.cs @@ -1,4 +1,4 @@ -using SKIT.FlurlHttpClient.Tools.CodeAnalyzer; +using SKIT.FlurlHttpClient.Tools.CodeAnalyzer; using Xunit; namespace SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests @@ -14,38 +14,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests { AssemblyName = "SKIT.FlurlHttpClient.Wechat.OpenAI", WorkDirectoryForSourceCode = TestConfigs.WorkDirectoryForSdk, - WorkSubDirectoryForApiModels = "Models/Platform", - WorkSubDirectoryForApiEvents = "Events/Platform", - WorkSubDirectoryForApiMethods = "Extensions/Platform", WorkDirectoryForTestSample = TestConfigs.WorkDirectoryForTest, - WorkSubDirectoryForApiModelSamples = "ModelSamples/Platform", - WorkSubDirectoryForApiEventSamples = "EventSamples/Platform", - TargetSdkApiModelNamespaceUnderAssemblyIdentifier = "Models.Platform", - TargetSdkApiEventNamespaceUnderAssemblyIdentifier = "Events.Platform", - AllowNotFoundEventTypes = true, - AllowNotFoundEventSamples = true - }; - CodeAnalyzer analyzer = new CodeAnalyzer(options); - analyzer.Start(); - analyzer.Assert(); - analyzer.Flush(); - })); - - - Assert.Null(Record.Exception(() => - { - CodeAnalyzerOptions options = new CodeAnalyzerOptions() - { - AssemblyName = "SKIT.FlurlHttpClient.Wechat.OpenAI", - WorkDirectoryForSourceCode = TestConfigs.WorkDirectoryForSdk, - WorkSubDirectoryForApiModels = "Models/ThirdParty", - WorkSubDirectoryForApiEvents = "Events/ThirdParty", - WorkSubDirectoryForApiMethods = "Extensions/ThirdParty", - WorkDirectoryForTestSample = TestConfigs.WorkDirectoryForTest, - WorkSubDirectoryForApiModelSamples = "ModelSamples/ThirdParty", - WorkSubDirectoryForApiEventSamples = "EventSamples/ThirdParty", - TargetSdkApiModelNamespaceUnderAssemblyIdentifier = "Models.ThirdParty", - TargetSdkApiEventNamespaceUnderAssemblyIdentifier = "Events.ThirdParty", AllowNotFoundEventTypes = true, AllowNotFoundEventSamples = true }; diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/TestClients.cs b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/TestClients.cs index 9fa4e136..b6820f6f 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/TestClients.cs +++ b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/TestClients.cs @@ -1,24 +1,17 @@ -namespace SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests +namespace SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests { internal class TestClients { static TestClients() { - InstanceForPlatform = new WechatOpenAIPlatformClient(new WechatOpenAIPlatformClientOptions() + Instance = new WechatOpenAIClient(new WechatOpenAIClientOptions() { AppId = TestConfigs.WechatAppId, Token = TestConfigs.WechatToken, EncodingAESKey = TestConfigs.WechatEncodingAESKey }); - - InstanceForThirdParty = new WechatOpenAIThirdPartyClient(new WechatOpenAIThirdPartyClientOptions() - { - ClientId = TestConfigs.WechatClientId, - ClientKey = TestConfigs.WechatClientKey - }); } - public static readonly WechatOpenAIPlatformClient InstanceForPlatform; - public static readonly WechatOpenAIThirdPartyClient InstanceForThirdParty; + public static readonly WechatOpenAIClient Instance; } } diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/TestConfigs.cs b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/TestConfigs.cs index d11688a6..d76f743c 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/TestConfigs.cs +++ b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/TestConfigs.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Text.Json; @@ -18,8 +18,6 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests using var jdoc = JsonDocument.Parse(stream); var config = jdoc.RootElement.GetProperty("TestConfig"); - WechatClientId = config.GetProperty("ClientId").GetString()!; - WechatClientKey = config.GetProperty("ClientKey").GetString()!; WechatAppId = config.GetProperty("AppId").GetString()!; WechatToken = config.GetProperty("Token").GetString()!; WechatEncodingAESKey = config.GetProperty("EncodingAESKey").GetString()!; @@ -34,8 +32,6 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests } } - public static readonly string WechatClientId; - public static readonly string WechatClientKey; public static readonly string WechatAppId; public static readonly string WechatToken; public static readonly string WechatEncodingAESKey; diff --git a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/appsettings.json b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/appsettings.json index ef86db76..74552efd 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/appsettings.json +++ b/test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/appsettings.json @@ -1,7 +1,5 @@ -{ +{ "TestConfig": { - "ClientId": "请在此填写用于测试的微信智能对话 ClientId", - "ClientKey": "请在此填写用于测试的微信智能对话 ClientKey", "AppId": "请在此填写用于测试的微信智能对话 AppId", "Token": "请在此填写用于测试的微信智能对话 Token", "EncodingAESKey": "请在此填写用于测试的微信智能对话 EncodingAESKey", diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/TestCase_WechatEventDataCryptorTests.cs b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/TestCase_WxMsgCryptorTests.cs similarity index 84% rename from test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/TestCase_WechatEventDataCryptorTests.cs rename to test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/TestCase_WxMsgCryptorTests.cs index 06ac8881..f6c201b5 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/TestCase_WechatEventDataCryptorTests.cs +++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/TestCase_WxMsgCryptorTests.cs @@ -1,15 +1,15 @@ -using Xunit; +using Xunit; namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests { - public class TestCase_WechatEventDataCryptorTests + public class TestCase_WxMsgCryptorTests { [Fact(DisplayName = "测试用例:回调信息解析")] public void TestWxBizMsgCryptorParsing() { string xml = ""; - bool isValidXml = Utilities.WechatEventDataCryptor.TryParseXml(xml, out string encryptedMsg, out string toUserName, out string agentId); + bool isValidXml = Utilities.WxMsgCryptor.TryParseXml(xml, out string encryptedMsg, out string toUserName, out string agentId); Assert.True(isValidXml); Assert.Equal("wx5823bf96d3bd56c7", toUserName); Assert.Equal("218", agentId); @@ -23,7 +23,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests string encodingAESKey = "jWmYm7qr5nMoAUwZRjGtBxmz3KA1tkAj3ykkR6q2B2C"; string cipherText = "RypEvHKD8QQKFhvQ6QleEB4J58tiPdvo+rtK1I9qca6aM/wvqnLSV5zEPeusUiX5L5X/0lWfrf0QADHHhGd3QczcdCUpj911L3vg3W/sYYvuJTs3TUUkSUXxaccAS0qhxchrRYt66wiSpGLYL42aM6A8dTT+6k4aSknmPj48kzJs8qLjvd4Xgpue06DOdnLxAUHzM6+kDZ+HMZfJYuR+LtwGc2hgf5gsijff0ekUNXZiqATP7PF5mZxZ3Izoun1s4zG4LUMnvw2r+KqCKIw+3IQH03v+BCA9nMELNqbSf6tiWSrXJB3LAVGUcallcrw8V2t9EL4EhzJWrQUax5wLVMNS0+rUPA3k22Ncx4XXZS9o0MBH27Bo6BpNelZpS+/uh9KsNlY6bHCmJU9p8g7m3fVKn28H3KDYA5Pl/T8Z1ptDAVe0lXdQ2YoyyH2uyPIGHBZZIs2pDBS8R07+qN+E7Q=="; - string actualCipherText = Utilities.WechatEventDataCryptor.AESDecrypt(cipherText, encodingAESKey, out string actualCorpId); + string actualCipherText = Utilities.WxMsgCryptor.AESDecrypt(cipherText, encodingAESKey, out string actualCorpId); string expectedCipherText = "\n\n1409659813\n\n\n4561255354251345929\n218\n"; Assert.Equal(corpId, actualCorpId); @@ -38,11 +38,11 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests string nonce = "1372623149"; string cipherText = "RypEvHKD8QQKFhvQ6QleEB4J58tiPdvo+rtK1I9qca6aM/wvqnLSV5zEPeusUiX5L5X/0lWfrf0QADHHhGd3QczcdCUpj911L3vg3W/sYYvuJTs3TUUkSUXxaccAS0qhxchrRYt66wiSpGLYL42aM6A8dTT+6k4aSknmPj48kzJs8qLjvd4Xgpue06DOdnLxAUHzM6+kDZ+HMZfJYuR+LtwGc2hgf5gsijff0ekUNXZiqATP7PF5mZxZ3Izoun1s4zG4LUMnvw2r+KqCKIw+3IQH03v+BCA9nMELNqbSf6tiWSrXJB3LAVGUcallcrw8V2t9EL4EhzJWrQUax5wLVMNS0+rUPA3k22Ncx4XXZS9o0MBH27Bo6BpNelZpS+/uh9KsNlY6bHCmJU9p8g7m3fVKn28H3KDYA5Pl/T8Z1ptDAVe0lXdQ2YoyyH2uyPIGHBZZIs2pDBS8R07+qN+E7Q=="; - string actualSignText = Utilities.WechatEventDataCryptor.GenerateSignature(sToken: token, sTimestamp: timestamp, sNonce: nonce, sMsgEncrypt: cipherText); + string actualSignText = Utilities.WxMsgCryptor.GenerateSignature(sToken: token, sTimestamp: timestamp, sNonce: nonce, sMsgEncrypt: cipherText); string expectedSignText = "477715d11cdb4164915debcba66cb864d751f3e6"; Assert.Equal(expectedSignText, actualSignText, ignoreCase: true); - Assert.True(Utilities.WechatEventDataCryptor.VerifySignature(sToken: token, sTimestamp: timestamp, sNonce: nonce, sMsgEncrypt: cipherText, sMsgSign: expectedSignText)); + Assert.True(Utilities.WxMsgCryptor.VerifySignature(sToken: token, sTimestamp: timestamp, sNonce: nonce, sMsgEncrypt: cipherText, sMsgSign: expectedSignText)); } [Fact(DisplayName = "测试用例:回调信息验证签名")] @@ -54,7 +54,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests string reqNonce = "1811081856"; string reqCipherText = "Q/jUxIL3/jRaFeTKesIr1QSq2SOEApDqlzcRrRM6Jlk4EbMBns3plPOR/W3gThOEq+zYI42fNSoIUb3cQwt9zyD1aLU/7D3WNLute7LQ9LSHjZEfVmx5zcIR9zvrUWGjhe1whTPH4e1WR6vbOYs8o/bDRF0vX/NcE4XK7P83Y6CzQiJoKbjVCne84s0zcw5eh+ZUDB55eaDHPSoS7kAC8kB00pfBoDF0jyfc8CUKLW97e72vJGyUWjZ0BvYN+R+tFjMgEzg/EN1imuuFnf40DMAcvB6y+C97TuaWjpgfRdowGWzn10JAFNukRfQqjdA0e2bfczJ7+t9w/t8/XSMADJOt1xbnP+I5cRX/r7ueBGmG/6ejP3myO9yTXHdujGvwrXHuWw+J7qD4VoUVjbm2vQ1qQKbrweKssr6O+3XSbanZ5R3n26EpN/gfgX+r6rcGViqsFop9Ai9xMnfJUubB6Q=="; - Assert.True(Utilities.WechatEventDataCryptor.VerifySignature(token, reqTimeStamp, reqNonce, reqCipherText, reqMsgSig)); + Assert.True(Utilities.WxMsgCryptor.VerifySignature(token, reqTimeStamp, reqNonce, reqCipherText, reqMsgSig)); } } }