mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-15 23:13:32 +08:00
feat(openai): 新增 NLP 相关接口
This commit is contained in:
parent
592e4e3587
commit
c957e294dd
@ -102,5 +102,138 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI
|
|||||||
|
|
||||||
return await client.SendRequestWithUrlEncodedAsync<Models.OpenApiNLPSensitiveResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
return await client.SendRequestWithUrlEncodedAsync<Models.OpenApiNLPSensitiveResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /openapi/nlp/rank/{TOKEN} 接口。</para>
|
||||||
|
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/platform/nlp/rank.html </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.OpenApiNLPRankResponse> ExecuteOpenApiNLPRankAsync(this WechatOpenAIClient client, Models.OpenApiNLPRankRequest 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, "openapi", "nlp", "rank", client.Credentials.Token!);
|
||||||
|
|
||||||
|
return await client.SendRequestWithUrlEncodedAsync<Models.OpenApiNLPRankResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /openapi/nlp/translate_en2cn/{TOKEN} 接口。</para>
|
||||||
|
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/platform/nlp/translate.html </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.OpenApiNLPTranslateEnglish2ChineseResponse> ExecuteOpenApiNLPTranslateEnglish2ChineseAsync(this WechatOpenAIClient client, Models.OpenApiNLPTranslateEnglish2ChineseRequest 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, "openapi", "nlp", "translate_en2cn", client.Credentials.Token!);
|
||||||
|
|
||||||
|
return await client.SendRequestWithUrlEncodedAsync<Models.OpenApiNLPTranslateEnglish2ChineseResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /openapi/nlp/translate_cn2en/{TOKEN} 接口。</para>
|
||||||
|
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/platform/nlp/translate.html </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.OpenApiNLPTranslateChinese2EnglishResponse> ExecuteOpenApiNLPTranslateChinese2EnglishAsync(this WechatOpenAIClient client, Models.OpenApiNLPTranslateChinese2EnglishRequest 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, "openapi", "nlp", "translate_cn2en", client.Credentials.Token!);
|
||||||
|
|
||||||
|
return await client.SendRequestWithUrlEncodedAsync<Models.OpenApiNLPTranslateChinese2EnglishResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /openapi/nlp/get_similar_query/{TOKEN} 接口。</para>
|
||||||
|
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/platform/nlp/similar_recommend.html </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.OpenApiNLPGetSimilarQueryResponse> ExecuteOpenApiNLPGetSimilarQueryAsync(this WechatOpenAIClient client, Models.OpenApiNLPGetSimilarQueryRequest 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, "openapi", "nlp", "get_similar_query", client.Credentials.Token!);
|
||||||
|
|
||||||
|
return await client.SendRequestWithUrlEncodedAsync<Models.OpenApiNLPGetSimilarQueryResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /openapi/nlp/news-abstraction/{TOKEN} 接口。</para>
|
||||||
|
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/platform/nlp/summarize.html </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.OpenApiNLPNewsAbstractionResponse> ExecuteOpenApiNLPNewsAbstractionAsync(this WechatOpenAIClient client, Models.OpenApiNLPNewsAbstractionRequest 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, "openapi", "nlp", "news-abstraction", client.Credentials.Token!);
|
||||||
|
|
||||||
|
return await client.SendRequestWithUrlEncodedAsync<Models.OpenApiNLPNewsAbstractionResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /openapi/nlp/document_classify/{TOKEN} 接口。</para>
|
||||||
|
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/platform/nlp/summarize.html </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.OpenApiNLPDocumentClassifyResponse> ExecuteOpenApiNLPDocumentClassifyAsync(this WechatOpenAIClient client, Models.OpenApiNLPDocumentClassifyRequest 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, "openapi", "nlp", "document_classify", client.Credentials.Token!);
|
||||||
|
|
||||||
|
return await client.SendRequestWithUrlEncodedAsync<Models.OpenApiNLPDocumentClassifyResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /openapi/nlp/recommend_questions/{TOKEN} 接口。</para>
|
||||||
|
/// <para>REF: https://developers.weixin.qq.com/doc/aispeech/platform/nlp/rec_chat.html </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.OpenApiNLPRecommendQuestionsResponse> ExecuteOpenApiNLPRecommendQuestionsAsync(this WechatOpenAIClient client, Models.OpenApiNLPRecommendQuestionsRequest 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, "openapi", "nlp", "recommend_questions", client.Credentials.Token!);
|
||||||
|
|
||||||
|
return await client.SendRequestWithUrlEncodedAsync<Models.OpenApiNLPRecommendQuestionsResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,45 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /openapi/nlp/document_classify/{TOKEN} 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class OpenApiNLPDocumentClassifyRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedUrlEncodedFormData
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置文章标题。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("title")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||||
|
public string Title { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置文章正文内容。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("content")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("content")]
|
||||||
|
public string Content { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("uid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("uid")]
|
||||||
|
public string UserId { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置请求数据。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("data")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||||
|
public Types.Data Data { get; set; } = new Types.Data();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /openapi/nlp/document_classify/{TOKEN} 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class OpenApiNLPDocumentClassifyResponse : WechatOpenAIResponse<OpenApiNLPDocumentClassifyResponse.Types.Data>
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Result
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置一级分类结果。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("level1_cls")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("level1_cls")]
|
||||||
|
public string Level1Classification { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置二级分类结果。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("level2_cls")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("level2_cls")]
|
||||||
|
public string Level2Classification { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置三级分类结果。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("level3_cls")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("level3_cls")]
|
||||||
|
public string Level3lassification { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置文章分类的结果。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("preds")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("preds")]
|
||||||
|
public Types.Result Result { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /openapi/nlp/get_similar_query/{TOKEN} 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class OpenApiNLPGetSimilarQueryRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedUrlEncodedFormData
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置输入文本。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("query")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("query")]
|
||||||
|
public string QueryString { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("uid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("uid")]
|
||||||
|
public string UserId { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置请求数据。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("data")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||||
|
public Types.Data Data { get; set; } = new Types.Data();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /openapi/nlp/get_similar_query/{TOKEN} 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class OpenApiNLPGetSimilarQueryResponse : WechatOpenAIResponse<OpenApiNLPGetSimilarQueryResponse.Types.Data>
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Result
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置相似问题信息项。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("question")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("question")]
|
||||||
|
public string Sentiment { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置分值(范围:0~1)。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("score")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("score")]
|
||||||
|
public double Score { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置来源。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("source")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("source")]
|
||||||
|
public string Source { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置结果。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("data")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||||
|
public Types.Result[] ResultList { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置耗时(单位:毫秒)。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("costime")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("costime")]
|
||||||
|
public int CostTime { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /openapi/nlp/news-abstraction/{TOKEN} 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class OpenApiNLPNewsAbstractionRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedUrlEncodedFormData
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置新闻标题。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("title")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||||
|
public string Title { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置新闻正文内容。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("content")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("content")]
|
||||||
|
public string Content { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置新闻所属的一级类别标签。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("category")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("category")]
|
||||||
|
public string? Category { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置是否在提取摘要前先进行新闻分类标志。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("do_news_classify")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("do_news_classify")]
|
||||||
|
public bool? RequireDoNewsClassify { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("uid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("uid")]
|
||||||
|
public string UserId { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置请求数据。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("data")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||||
|
public Types.Data Data { get; set; } = new Types.Data();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /openapi/nlp/news-abstraction/{TOKEN} 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class OpenApiNLPNewsAbstractionResponse : WechatOpenAIResponse<OpenApiNLPNewsAbstractionResponse.Types.Data>
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置摘要提取的结果。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("abstraction")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("abstraction")]
|
||||||
|
public string Result { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置是否适合提取摘要的分类标签。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("classification")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("classification")]
|
||||||
|
public bool HasClassification { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置分值(范围:0~1)。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("prob")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("prob")]
|
||||||
|
public double Score { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /openapi/nlp/rank/{TOKEN} 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class OpenApiNLPRankRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedUrlEncodedFormData
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Candidate
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置候选词。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("text")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||||
|
public string Text { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置输入文本。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("query")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("query")]
|
||||||
|
public string QueryString { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置候选词列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("candidates")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("candidates")]
|
||||||
|
public IList<Types.Candidate> CandidateList { get; set; } = new List<Types.Candidate>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("uid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("uid")]
|
||||||
|
public string UserId { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置请求数据。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("data")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||||
|
public Types.Data Data { get; set; } = new Types.Data();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /openapi/nlp/rank/{TOKEN} 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class OpenApiNLPRankResponse : WechatOpenAIResponse<OpenApiNLPRankResponse.Types.Data>
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Result
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置候选词信息项。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("question")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("question")]
|
||||||
|
public string Sentiment { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置分值(范围:0~1)。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("score")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("score")]
|
||||||
|
public double Score { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置结果。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("results")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("results")]
|
||||||
|
public Types.Result[] ResultList { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置是否有 Exact Match 候选。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("exact_match")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("exact_match")]
|
||||||
|
public bool HasExactMatch { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /openapi/nlp/recommend_questions/{TOKEN} 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class OpenApiNLPRecommendQuestionsRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedUrlEncodedFormData
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("uid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("uid")]
|
||||||
|
public string UserId { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置请求数据。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("data")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||||
|
public Types.Data Data { get; set; } = new Types.Data();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /openapi/nlp/recommend_questions/{TOKEN} 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class OpenApiNLPRecommendQuestionsResponse : WechatOpenAIResponse<OpenApiNLPRecommendQuestionsResponse.Types.Data>
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置推荐的结果。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("results")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("results")]
|
||||||
|
public string[] ResultList { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /openapi/nlp/translate_cn2en/{TOKEN} 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class OpenApiNLPTranslateChinese2EnglishRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedUrlEncodedFormData
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置输入文本。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("q")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("q")]
|
||||||
|
public string QueryString { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("uid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("uid")]
|
||||||
|
public string UserId { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置请求数据。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("data")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||||
|
public Types.Data Data { get; set; } = new Types.Data();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /openapi/nlp/translate_cn2en/{TOKEN} 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class OpenApiNLPTranslateChinese2EnglishResponse : WechatOpenAIResponse<OpenApiNLPTranslateChinese2EnglishResponse.Types.Data>
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置结果。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("result")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("result")]
|
||||||
|
public string Result { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /openapi/nlp/translate_en2cn/{TOKEN} 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class OpenApiNLPTranslateEnglish2ChineseRequest : WechatOpenAIRequest, WechatOpenAIRequest.Serialization.IEncryptedUrlEncodedFormData
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置输入文本。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("q")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("q")]
|
||||||
|
public string QueryString { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("uid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("uid")]
|
||||||
|
public string UserId { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置请求数据。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("data")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||||
|
public Types.Data Data { get; set; } = new Types.Data();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /openapi/nlp/translate_en2cn/{TOKEN} 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class OpenApiNLPTranslateEnglish2ChineseResponse : WechatOpenAIResponse<OpenApiNLPTranslateEnglish2ChineseResponse.Types.Data>
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置结果。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("result")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("result")]
|
||||||
|
public string Result { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -30,7 +30,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI
|
|||||||
|
|
||||||
Credentials = new Settings.Credentials(options);
|
Credentials = new Settings.Credentials(options);
|
||||||
|
|
||||||
FlurlClient.BaseUrl = options.Endpoints ?? WechatOpenAIEndpoints.DEFAULT;
|
FlurlClient.BaseUrl = options.Endpoints ?? WechatOpenAIEndpoints.PLATFORM;
|
||||||
FlurlClient.WithTimeout(TimeSpan.FromMilliseconds(options.Timeout));
|
FlurlClient.WithTimeout(TimeSpan.FromMilliseconds(options.Timeout));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,9 +13,9 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置微微信智能对话 API 域名。
|
/// 获取或设置微微信智能对话 API 域名。
|
||||||
/// <para>默认值:<see cref="WechatOpenAIEndpoints.DEFAULT"/></para>
|
/// <para>默认值:<see cref="WechatOpenAIEndpoints.PLATFORM"/></para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Endpoints { get; set; } = WechatOpenAIEndpoints.DEFAULT;
|
public string Endpoints { get; set; } = WechatOpenAIEndpoints.PLATFORM;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置微信智能对话 ClientId。仅限第三方平台接入时使用。
|
/// 获取或设置微信智能对话 ClientId。仅限第三方平台接入时使用。
|
||||||
|
@ -8,8 +8,13 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI
|
|||||||
public static class WechatOpenAIEndpoints
|
public static class WechatOpenAIEndpoints
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 主域名(默认)。
|
/// 平台接入(默认)。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string DEFAULT = "https://openaiapi.weixin.qq.com";
|
public const string PLATFORM = "https://openai.weixin.qq.com";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 第三方接入。
|
||||||
|
/// </summary>
|
||||||
|
public const string THIRDPARTY = "https://openaiapi.weixin.qq.com";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,18 +30,11 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI
|
|||||||
public byte[] RawBytes { get; internal set; } = default!;
|
public byte[] RawBytes { get; internal set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取微信智能对话 API 返回的错误码。
|
/// 获取微信智能对话 API 返回的请求唯一标识。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("errcode")]
|
[Newtonsoft.Json.JsonProperty("request_id")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("errcode")]
|
[System.Text.Json.Serialization.JsonPropertyName("request_id")]
|
||||||
public virtual int? ErrorCode { get; set; }
|
public virtual string? RequestId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取微信智能对话 API 返回的错误信息。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("errmsg")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("errmsg")]
|
|
||||||
public virtual string? ErrorMessage { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取微信智能对话 API 返回的状态码。
|
/// 获取微信智能对话 API 返回的状态码。
|
||||||
@ -58,19 +51,44 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI
|
|||||||
public virtual string? Message { get; set; }
|
public virtual string? Message { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取微信智能对话 API 返回的请求唯一标识。
|
/// 获取微信智能对话 API 返回的错误码。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("request_id")]
|
[Newtonsoft.Json.JsonProperty("errcode")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("request_id")]
|
[System.Text.Json.Serialization.JsonPropertyName("errcode")]
|
||||||
public virtual string? RequestId { get; set; }
|
public virtual int? ErrorCode { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取一个值,该值指示调用微信 API 是否成功(即 HTTP 状态码为 200、且 code 和 errcode 值都为 0)。
|
/// 获取微信智能对话 API 返回的错误信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("errmsg")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("errmsg")]
|
||||||
|
public virtual string? ErrorMessage { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取微信智能对话 API 返回的错误码。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("ret")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("ret")]
|
||||||
|
public virtual int? ReturnCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取微信智能对话 API 返回的错误信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("error")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("error")]
|
||||||
|
public virtual string? ReturnError { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取一个值,该值指示调用微信 API 是否成功(即 HTTP 状态码为 200、且 code/errcode/ret 值都为 0)。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public virtual bool IsSuccessful()
|
public virtual bool IsSuccessful()
|
||||||
{
|
{
|
||||||
return RawStatus == 200 && ErrorCode.GetValueOrDefault() == 0 && Code.GetValueOrDefault() == 0;
|
return RawStatus == 200 &&
|
||||||
|
Code.GetValueOrDefault() == 0 &&
|
||||||
|
ErrorCode.GetValueOrDefault() == 0 &&
|
||||||
|
ReturnCode.GetValueOrDefault() == 0 &&
|
||||||
|
string.IsNullOrEmpty(ReturnError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"uid": "xjlsj33lasfaf",
|
||||||
|
"data": {
|
||||||
|
"title": "东北地区今日开启升温之旅 华南西南气温将创新低",
|
||||||
|
"content": "中国天气网讯 预计今天(6日),东南一带的降水将有所收敛,但是仍有助于缓和当地的气象干旱。气温方面,东北地区今天开始将开启升温之旅,而华南、西南一带最低气温还会创新低。随后而来的周末将会是今年晴天范围最大、降水最少的周末,公众可以提前安排户外活动,迎接温暖的阳光。"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"preds": {
|
||||||
|
"level1_cls": "天气",
|
||||||
|
"level2_cls": "其他",
|
||||||
|
"level3_cls": "其他"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"uid": "xjlsj33lasfaf",
|
||||||
|
"data": {
|
||||||
|
"query": "你好吗"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"data": [
|
||||||
|
{
|
||||||
|
"question": "你还好吗",
|
||||||
|
"score": 0.9911637194339746,
|
||||||
|
"source": "generation"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": "你怎么样",
|
||||||
|
"score": 0.8547977341846155,
|
||||||
|
"source": "generation"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": "你怎么样啊",
|
||||||
|
"score": 0.8517300445116354,
|
||||||
|
"source": "generation"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"costime": 1394
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"uid": "xjlsj33lasfaf",
|
||||||
|
"data": {
|
||||||
|
"title": "大标题: 周杰伦透露孩子性格像自己",
|
||||||
|
"content": "自侃:在家地位不高周杰伦晒与儿子\\r\\n周杰伦与妻子昆凌\\r\\n新浪娱乐讯据台湾媒体报道,周杰伦今受邀出席公益篮球活动,许久没公开亮相的他坦言:“大家看我的社交网站就知道,现在玩乐和陪家人是最重要的。”他预计10月将启动全新巡演,但聊到新专辑,他笑说:“目前已经做好5首,但包括上次做好的2首。”进度严重落后,巡演前能否来得及推出仍是未知数。\r\\n周杰伦曾被“老萧”萧敬腾与五月天阿信调侃:“巴黎铁塔好像是他家一样”,周杰伦也坦言有考虑在法国置产,地点属意:“有巴黎铁塔蛮重要的”,他感叹身处欧洲比较可以自由自在走在街上,就算被粉丝认出,打个招呼就滑着滑板溜走,不用跑得太狼狈。\\r\\n今天他与小朋友共享篮球时光,但聊到自己的一双儿女,他说:“小朋友个性像自己,比较顽固一点,小朋友都是这样、比较讲不听,严格来说我扮黑脸也是没什么用,在家里地位不是很高。”他形容女儿就像自己“另个女朋友”,有时候想和她和好还被拒绝,一直被闹别扭,周杰伦无奈说:“我还不知道怎么对待一个女儿。”倒是儿子比较怕他,只要一出声就会低头认错,“像他会画在桌子上,家里很多画,就会教他看画手要放在后面,不要摸”严父模样只有儿子会买单。\\r\\n阿信曾夸周杰伦是“华人音乐圈精神领袖”,周杰伦赞阿信是“心目中真正的音乐人”,曾邀阿信到家中作客,2人畅谈音乐,阿信还精辟分析他专辑,“发现他是实际有在听我歌曲的人”,但问到每次打球都只邀萧敬腾,周杰伦笑说有透过社交网站约阿信打球,每次却只被回表情符号,忍不住说:“他说他以前打曲棍球,我是不太相信的。”\\r\\n周杰伦将于10月启动全新巡演,谈到近期的困扰,就是还没想到一个很威的名字,“想不到比‘地表最强’更好的,但这次跟(出道)20年有关,会比较欢乐,不是走自己多强势的感觉”。\\r\\n(责编:漠er凡)\\r\\n",
|
||||||
|
"category": "娱乐",
|
||||||
|
"do_news_classify": true
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"abstraction": "新浪娱乐讯据台湾媒体报道,周杰伦今受邀出席公益篮球活动,许久没公开亮相的他坦言:“大家看我的社交网站就知道,现在玩乐和陪家人是最重要的。”他预计10月将启动全新巡演,但聊到新专辑,他笑说:“目前已经做好5首,但包括上次做好的2首。”进度严重落后,巡演前能否来得及推出仍是未知数。",
|
||||||
|
"classification": true,
|
||||||
|
"prob": 0.999969363213
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"uid": "xjlsj33lasfaf",
|
||||||
|
"data": {
|
||||||
|
"query": "北京到上海的火车票",
|
||||||
|
"candidates": [
|
||||||
|
{ "text": "上海到北京的火车票" },
|
||||||
|
{ "text": "北京到上海的飞机票" },
|
||||||
|
{ "text": "北京到上海的高铁票" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"results": [
|
||||||
|
{
|
||||||
|
"question": "北京到上海的高铁票",
|
||||||
|
"score": 0.9875847458814624
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": "北京到上海的飞机票",
|
||||||
|
"score": 0.9707289708500416
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": "上海到北京的火车票",
|
||||||
|
"score": 0.9169014875286918
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"exact_match": false
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"uid": "xjlsj33lasfaf",
|
||||||
|
"data": {}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"results": [
|
||||||
|
"在微信H5支付中,如何在服务端判断支付成功?",
|
||||||
|
"交易资金与结算资金不一致",
|
||||||
|
"修改结算账户",
|
||||||
|
"数据查看",
|
||||||
|
"微信支付商户自查违规指引"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"uid": "xjlsj33lasfaf",
|
||||||
|
"data": {
|
||||||
|
"q": "北京的天气怎么样?"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"result": "What about the weather in Beijing?"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user