mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-20 02:29:40 +08:00
feat(openai): 新增机器人相关接口
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI
|
||||
{
|
||||
public static class WechatOpenAIClientExecuteApiExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /v2/api/get_welcome_msg 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/get_welcomemsg.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ApiGetWelcomeMessageResponse> ExecuteApiGetWelcomeMessageAsync(this WechatOpenAIClient client, Models.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<Models.ApiGetWelcomeMessageResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /v2/api/set_welcome_msg 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/set_welcomemsg.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ApiSetWelcomeMessageResponse> ExecuteApiSetWelcomeMessageAsync(this WechatOpenAIClient client, Models.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<Models.ApiSetWelcomeMessageResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,223 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI
|
||||
{
|
||||
public static class WechatOpenAIClientExecuteBotExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /v2/bot/save 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/save.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.BotSaveResponse> ExecuteBotSaveAsync(this WechatOpenAIClient client, Models.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<Models.BotSaveResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /v2/bot/get_detail 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/get_detail.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.BotGetDetailResponse> ExecuteBotGetDetailAsync(this WechatOpenAIClient client, Models.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<Models.BotGetDetailResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /v2/bot/delete 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/save.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.BotDeleteResponse> ExecuteBotDeleteAsync(this WechatOpenAIClient client, Models.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<Models.BotDeleteResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /v2/bot/get_list 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/get_list.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.BotGetListResponse> ExecuteBotGetListAsync(this WechatOpenAIClient client, Models.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<Models.BotGetListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /v1/bot/import 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/import.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.BotImportResponse> ExecuteBotImportAsync(this WechatOpenAIClient client, Models.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<Models.BotImportResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /v1/bot/export 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/export.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.BotExportResponse> ExecuteBotExportAsync(this WechatOpenAIClient client, Models.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<Models.BotExportResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /v2/bot/publish 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/publish.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.BotPublishResponse> ExecuteBotPublishAsync(this WechatOpenAIClient client, Models.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<Models.BotPublishResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /v2/bot/publish/get_record 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/get_publish_record.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.BotPublishGetRecordResponse> ExecuteBotPublishGetRecordAsync(this WechatOpenAIClient client, Models.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<Models.BotPublishGetRecordResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /v1/bot/import/json 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/json_import.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.BotImportJsonResponse> ExecuteBotImportJsonAsync(this WechatOpenAIClient client, Models.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<Models.BotImportJsonResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /v1/bot/test 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/test.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.BotTestResponse> ExecuteBotTestAsync(this WechatOpenAIClient client, Models.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<Models.BotTestResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /v2/bot/effective_progress 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/effective_progress.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.BotEffectiveProgressResponse> ExecuteBotEffectiveProgressAsync(this WechatOpenAIClient client, Models.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<Models.BotEffectiveProgressResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI
|
||||
{
|
||||
public static class WechatOpenAIClientExecuteUnmatchedClassExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /v1/unmatched/class/list 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/unmatched_class_list.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.UnmatchedClassListResponse> ExecuteUnmatchedClassListAsync(this WechatOpenAIClient client, Models.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<Models.UnmatchedClassListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /v1/unmatched/class/detail 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/openapi/api/v2/bot/unmatched_class_detail.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.UnmatchedClassDetailResponse> ExecuteUnmatchedClassDetailAsync(this WechatOpenAIClient client, Models.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<Models.UnmatchedClassDetailResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v2/api/get_welcome_msg 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ApiGetWelcomeMessageRequest : WechatOpenAIRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置渠道 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("channelId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("channelId")]
|
||||
public string ChannelId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置标签 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("lableId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("lableId")]
|
||||
public string? LabelId { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,79 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v2/api/get_welcome_msg 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ApiGetWelcomeMessageResponse : WechatOpenAIResponse<ApiGetWelcomeMessageResponse.Types.Data>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class WelcomeMessage
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置来源类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("source")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("source")]
|
||||
public int Source { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置欢迎语 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("msgId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("msgId")]
|
||||
public string MessageId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置欢迎语类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("msgType")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("msgType")]
|
||||
public string MessageType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置欢迎语内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("welcomeMsg")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("welcomeMsg")]
|
||||
public string MessageContent { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置标签。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("label")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("label")]
|
||||
public string? Label { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置发送间隔(单位:秒)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("newSendInterval")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("newSendInterval")]
|
||||
public int SendInterval { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置欢迎语列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.WelcomeMessage[] WelcomeMessageList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置欢迎语总数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("total")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("total")]
|
||||
public int TotalCount { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v2/api/set_welcome_msg 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ApiSetWelcomeMessageRequest : WechatOpenAIRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置渠道 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("channelId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("channelId")]
|
||||
public string ChannelId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置来源类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("source")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("source")]
|
||||
public int Source { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置欢迎语 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("msgId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("msgId")]
|
||||
public string? MessageId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置欢迎语类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("msgType")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("msgType")]
|
||||
public string MessageType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置欢迎语内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("welcomeMsg")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("welcomeMsg")]
|
||||
public string MessageContent { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置标签 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("lableId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("lableId")]
|
||||
public string? LabelId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置发送间隔(单位:秒)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("newSendInterval")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("newSendInterval")]
|
||||
public int SendInterval { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v2/api/set_welcome_msg 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ApiSetWelcomeMessageResponse : WechatOpenAIResponse
|
||||
{
|
||||
}
|
||||
}
|
@@ -9,7 +9,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
public class AsyncFetchRequest : WechatOpenAIRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置任务 ID。
|
||||
/// 获取或设置异步任务 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
|
@@ -20,18 +20,18 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
public int State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务进度。
|
||||
/// 获取或设置任务进度字符串。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("progress")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("progress")]
|
||||
public string Progress { get; set; } = default!;
|
||||
public string ProgressString { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务耗时。
|
||||
/// 获取或设置任务耗时字符串。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cost")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cost")]
|
||||
public string Cost { get; set; } = default!;
|
||||
public string CostString { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置导出任务的下载链接。
|
||||
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v2/bot/delete 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class BotDeleteRequest : WechatOpenAIRequest
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v2/bot/delete 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class BotDeleteResponse : WechatOpenAIResponse<BotDeleteResponse.Types.Data>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置异步任务 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_id")]
|
||||
public string TaskId { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v2/bot/effective_progress 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class BotEffectiveProgressRequest : WechatOpenAIRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置环境。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("env")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("env")]
|
||||
public string? Environment { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v2/bot/effective_progress 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class BotEffectiveProgressResponse : WechatOpenAIResponse<BotEffectiveProgressResponse.Types.Data>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置进度(范围:0~100)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("progress")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("progress")]
|
||||
public int Progress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /v1/bot/export 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class BotExportRequest : WechatOpenAIRequest
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /v1/bot/export 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class BotExportResponse : WechatOpenAIResponse<BotExportResponse.Types.Data>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置异步任务 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_id")]
|
||||
public string TaskId { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /v2/bot/get_detail 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class BotGetDetailRequest : WechatOpenAIRequest
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,101 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /v2/bot/get_detail 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class BotGetDetailResponse : WechatOpenAIResponse<BotGetDetailResponse.Types.Data>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置机器人 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id")]
|
||||
public string BotId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置机器人中文名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name_ch")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name_ch")]
|
||||
public string ChineseName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置机器人英文名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name_en")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name_en")]
|
||||
public string? EnglishName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置机器人昵称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("nickname")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("nickname")]
|
||||
public string? Nickname { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置机器人类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bot_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bot_type")]
|
||||
public int BotType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置行业 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("industry")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("industry")]
|
||||
public int IndustryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置默认回答开关。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("default_answer_switch")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("default_answer_switch")]
|
||||
public bool DefaultAnswerSwitch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置默认回答。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("default_answer")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("default_answer")]
|
||||
public string? DefaultAnswer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置相似度阈值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("similarity")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("similarity")]
|
||||
public double Similarity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置相似度阈值下限。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("similarity_low")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("similarity_low")]
|
||||
public double SimilarityMinimum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置相似问题推荐数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("similar_question_recommend_num")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("similar_question_recommend_num")]
|
||||
public int SimilarityQuestionRecommendCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置收集用户反馈开关。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_feedback")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_feedback")]
|
||||
public bool UserFeedbackSwitch { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v2/bot/get_list 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class BotGetListRequest : WechatOpenAIRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置关键字。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("keyword")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("keyword")]
|
||||
public string? Keyword { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置机器人类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bot_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bot_type")]
|
||||
public int? BotType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页页数。
|
||||
/// <para>默认值:0</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page")]
|
||||
public int Page { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// <para>默认值:10</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("size")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("size")]
|
||||
public int Limit { get; set; } = 10;
|
||||
}
|
||||
}
|
@@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v2/bot/get_list 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class BotGetListResponse : WechatOpenAIResponse<BotGetListResponse.Types.Data>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Bot
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置机器人 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id")]
|
||||
public string BotId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置机器人中文名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name_ch")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name_ch")]
|
||||
public string ChineseName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置机器人英文名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name_en")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name_en")]
|
||||
public string? EnglishName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置机器人类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bot_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bot_type")]
|
||||
public int BotType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置操作权限类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("auth")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("auth")]
|
||||
public int AuthType { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置机器人列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.Bot[] BotList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置机器人总数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("count")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("count")]
|
||||
public int TotalCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置默认机器人数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("default_bot_count")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("default_bot_count")]
|
||||
public int DefaultBotCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置直播机器人数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("live_bot_count")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("live_bot_count")]
|
||||
public int LiveBotCount { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v1/bot/import/json 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class BotImportJsonRequest : WechatOpenAIRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class SkillIntent
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置技能名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("skill")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("skill")]
|
||||
public string Skill { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置原来意图名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("old_intent")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("old_intent")]
|
||||
public string? OldIntent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置意图名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("intent")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("intent")]
|
||||
public string Intent { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置相似度。
|
||||
/// </summary>
|
||||
[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; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否禁用。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("disable")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("disable")]
|
||||
public bool IsDisabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置问题列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("questions")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("questions")]
|
||||
public IList<string> QuestionList { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置回答列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("answers")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("answers")]
|
||||
public IList<string> AnswerList { get; set; } = new List<string>();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置技能意图列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public IList<Types.SkillIntent> SkillIntentList { get; set; } = new List<Types.SkillIntent>();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置导入模式。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mode")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mode")]
|
||||
public int Mode { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v1/bot/import/json 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class BotImportJsonResponse : WechatOpenAIResponse<BotImportJsonResponse.Types.Data>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置异步任务 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_id")]
|
||||
public string TaskId { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v1/bot/import 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class BotImportRequest : WechatOpenAIRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置上传的文件标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("file_key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("file_key")]
|
||||
public string FileKey { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否覆盖。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cover")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cover")]
|
||||
public bool IsCover { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v1/bot/import 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class BotImportResponse : WechatOpenAIResponse<BotImportResponse.Types.Data>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置异步任务 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_id")]
|
||||
public string TaskId { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v2/bot/publish/get_record 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class BotPublishGetRecordRequest : WechatOpenAIRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分页页数。
|
||||
/// <para>默认值:0</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page")]
|
||||
public int Page { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// <para>默认值:10</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("size")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("size")]
|
||||
public int Limit { get; set; } = 10;
|
||||
}
|
||||
}
|
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v2/bot/publish/get_record 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class BotPublishGetRecordResponse : WechatOpenAIResponse<BotPublishGetRecordResponse.Types.Data>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Record
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id")]
|
||||
public string Id { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置发布者 OpenId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("open_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("open_id")]
|
||||
public string OpenId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置发布状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置同步数据状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sync_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sync_status")]
|
||||
public int SyncStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("description")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("description")]
|
||||
public string Description { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置发布时间戳。
|
||||
/// </summary>
|
||||
[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; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置发布记录列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.Record[] RecordList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置总数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("count")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("count")]
|
||||
public int TotalCount { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v2/bot/publish 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class BotPublishRequest : WechatOpenAIRequest
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v2/bot/publish 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class BotPublishResponse : WechatOpenAIResponse<BotPublishResponse.Types.Data>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置异步任务 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_id")]
|
||||
public string TaskId { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,88 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v2/bot/save 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class BotSaveRequest : WechatOpenAIRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置机器人中文名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name_ch")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name_ch")]
|
||||
public string ChineseName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置机器人英文名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name_en")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name_en")]
|
||||
public string? EnglishName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置机器人昵称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("nickname")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("nickname")]
|
||||
public string? Nickname { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置机器人类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bot_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bot_type")]
|
||||
public int? BotType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置行业 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("industry")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("industry")]
|
||||
public int? IndustryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置默认回答开关。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("default_answer_switch")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("default_answer_switch")]
|
||||
public bool? DefaultAnswerSwitch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置默认回答。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("default_answer")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("default_answer")]
|
||||
public string? DefaultAnswer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置相似度阈值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("similarity")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("similarity")]
|
||||
public double? Similarity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置相似度阈值下限。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("similarity_low")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("similarity_low")]
|
||||
public double? SimilarityMinimum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置相似问题推荐数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("similar_question_recommend_num")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("similar_question_recommend_num")]
|
||||
public int? SimilarityQuestionRecommendCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置收集用户反馈开关。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_feedback")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_feedback")]
|
||||
public bool? UserFeedbackSwitch { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v2/bot/save 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class BotSaveResponse : WechatOpenAIResponse<BotSaveResponse.Types.Data>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置机器人 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id")]
|
||||
public string BotId { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /v1/bot/test 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class BotTestRequest : WechatOpenAIRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置询问语句。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string QueryString { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@@ -0,0 +1,95 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /v1/bot/test 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class BotTestResponse : WechatOpenAIResponse<BotTestResponse.Types.Data>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class BotState
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置机器人配置错误信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("err_msg")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("err_msg")]
|
||||
public string? ErrorMessage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置最后有效时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("last_effective_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("last_effective_time")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public long LastEffectiveTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置技能 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ans_node_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ans_node_id")]
|
||||
public int AnswerNodeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置技能名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ans_node_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ans_node_name")]
|
||||
public string AnswerNodeName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置回复类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("answer_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("answer_type")]
|
||||
public string AnswerType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置回复内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("answer")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("answer")]
|
||||
public string Answer { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置意图标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置回复状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public string Status { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置机器人状态信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bot_state")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bot_state")]
|
||||
public Types.BotState? BotState { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间戳。
|
||||
/// </summary>
|
||||
[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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v1/unmatched/class/detail 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class UnmatchedClassDetailRequest : WechatOpenAIRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置查询日期(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("date")]
|
||||
public string DateString { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置话术 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("class_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("class_id")]
|
||||
public int ClassId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置排序方式。
|
||||
/// <para>默认值:desc</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sort")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sort")]
|
||||
public string SortType { get; set; } = "desc";
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页页数。
|
||||
/// <para>默认值:1</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_no")]
|
||||
public int Page { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// <para>默认值:10</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_size")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
|
||||
public int Limit { get; set; } = 10;
|
||||
}
|
||||
}
|
@@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v1/unmatched/class/detail 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class UnmatchedClassDetailResponse : WechatOpenAIResponse<UnmatchedClassDetailResponse.Types.Data>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Class
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置询问话术。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("query")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("query")]
|
||||
public string Query { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置回答话术。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("answer")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("answer")]
|
||||
public string Answer { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置未命中数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("count")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("count")]
|
||||
public int Count { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置话术列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.Class[] ClassList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置总数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("total")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("total")]
|
||||
public int TotalCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页页数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_no")]
|
||||
public int Page { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_size")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
|
||||
public int Limit { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v1/unmatched/class/list 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class UnmatchedClassListRequest : WechatOpenAIRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置查询日期(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("date")]
|
||||
public string DateString { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置排序方式。
|
||||
/// <para>默认值:desc</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sort")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sort")]
|
||||
public string SortType { get; set; } = "desc";
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页页数。
|
||||
/// <para>默认值:1</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_no")]
|
||||
public int Page { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// <para>默认值:10</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_size")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
|
||||
public int Limit { get; set; } = 10;
|
||||
}
|
||||
}
|
@@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /v1/unmatched/class/list 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class UnmatchedClassListResponse : WechatOpenAIResponse<UnmatchedClassListResponse.Types.Data>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Class
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置话术 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id")]
|
||||
public int ClassId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置话术名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string Name { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置未命中数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("count")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("count")]
|
||||
public int Count { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置话术列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.Class[] ClassList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置总数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("total")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("total")]
|
||||
public int TotalCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页页数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_no")]
|
||||
public int Page { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_size")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
|
||||
public int Limit { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"channelId": "sXRdXepMU58WyAV3xgT2F14PzXi4ya"
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"code": 0,
|
||||
"data": {
|
||||
"list": [
|
||||
{
|
||||
"source": 1,
|
||||
"msgType": "text",
|
||||
"welcomeMsg": "你好",
|
||||
"msgId": "5248",
|
||||
"label": "全部",
|
||||
"newSendInterval": 0
|
||||
}
|
||||
],
|
||||
"total": 1
|
||||
},
|
||||
"request_id": "18024ec0-837e-4873-825a-922247d4e57f"
|
||||
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"channelId": "sXRdXepMU58WyAV3xgT2F14PzXi4ya",
|
||||
"msgType": "text",
|
||||
"newSendInterval": 0,
|
||||
"source": 1,
|
||||
"welcomeMsg": "你好",
|
||||
"lableId": "",
|
||||
"msgId": "5500"
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"code": 0,
|
||||
"request_id": "f9da2eba-98f9-4b51-a68c-5bc7c537e539"
|
||||
}
|
@@ -0,0 +1 @@
|
||||
{}
|
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"code": 0,
|
||||
"data": {
|
||||
"task_id": "172ead02b7a14bfd8aac43939c0e2cb3"
|
||||
},
|
||||
"msg": "success",
|
||||
"request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142"
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"env": "debug"
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 0,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"progress": 100,
|
||||
"status": 1
|
||||
},
|
||||
"request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142"
|
||||
}
|
@@ -0,0 +1 @@
|
||||
{}
|
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"code": 0,
|
||||
"msg": "请求成功",
|
||||
"data": {
|
||||
"task_id": "337cd9d9-210c-4a59-972e-1c8df8c18adb"
|
||||
},
|
||||
"request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142"
|
||||
}
|
@@ -0,0 +1 @@
|
||||
{}
|
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"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"
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"keyword": "测试",
|
||||
"page": 1,
|
||||
"size": 10,
|
||||
"bot_type": -1
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"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"
|
||||
}
|
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"mode": 0,
|
||||
"data": [
|
||||
{
|
||||
"skill": "吃啥",
|
||||
"intent": "中午吃什么",
|
||||
"threshold": "0.9",
|
||||
"disable": false,
|
||||
"questions": [
|
||||
"中午吃什么?",
|
||||
"中午吃啥?"
|
||||
],
|
||||
"answers": [
|
||||
"面条",
|
||||
"包子"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"code": 0,
|
||||
"data": {
|
||||
"task_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142"
|
||||
},
|
||||
"msg": "",
|
||||
"request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142"
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"file_key": "fe48940d7310e79d6bf0a4aced56d522",
|
||||
"cover": false
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"code": 0,
|
||||
"msg": "请求成功",
|
||||
"data": {
|
||||
"task_id": "337cd9d9-210c-4a59-972e-1c8df8c18adb"
|
||||
},
|
||||
"request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142"
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"page": 0,
|
||||
"size": 8
|
||||
}
|
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"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"
|
||||
}
|
@@ -0,0 +1 @@
|
||||
{}
|
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"code": 0,
|
||||
"data": {
|
||||
"task_id": "b86a904600eb4a2e940beb8af8d5c0d3"
|
||||
},
|
||||
"msg": "success",
|
||||
"request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142"
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"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
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"code": 0,
|
||||
"data": {
|
||||
"id": "dzcmrij0zyvexs4llblxepwclfvnq3fv"
|
||||
},
|
||||
"msg": "success",
|
||||
"request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142"
|
||||
}
|
@@ -0,0 +1 @@
|
||||
{}
|
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"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"
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"sort": "asc",
|
||||
"page_no": 1,
|
||||
"page_size": 10,
|
||||
"class_id": 12,
|
||||
"date": "2021-08-23"
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"code": 0,
|
||||
"msg": "请求成功",
|
||||
"request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142",
|
||||
"data": {
|
||||
"list": [
|
||||
{
|
||||
"query": "你好啊啊啊",
|
||||
"answer": "哈哈哈哈",
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
"page_no": 1,
|
||||
"page_size": 10,
|
||||
"total": 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sort": "asc",
|
||||
"page_no": 1,
|
||||
"page_size": 10,
|
||||
"date": "2021-08-23"
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user