Skip to content

Commit

Permalink
fix:set default value to 1.0 for PenaltyScore
Browse files Browse the repository at this point in the history
  • Loading branch information
arthuridea committed Dec 18, 2023
1 parent ca67f39 commit 7748a11
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
6 changes: 3 additions & 3 deletions src/LLMService.Shared/Models/AIFeatureModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ public class AIFeatureModel
/// </para>
/// </summary>
/// <value>
/// 默认 1.5
/// 默认 1.0
/// </value>
/// <example>1.5</example>
/// <example>1.0</example>
[JsonPropertyName("penalty_score")]
public float PenaltyScore { get; set; } = 1.5F;
public float PenaltyScore { get; set; } = 1.0F;
/// <summary>
/// 是否以流式接口的形式返回数据,默认false
/// </summary>
Expand Down
54 changes: 27 additions & 27 deletions src/LLMService.Shared/Models/BaiduWenxinChatResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace LLMService.Shared.Models
{
/// <summary>
///
/// baidu API response model
/// </summary>
public class BaiduWenxinChatResponse /*: IServerSentEventData*/
{
Expand Down Expand Up @@ -91,7 +91,7 @@ public class BaiduWenxinChatResponse /*: IServerSentEventData*/
}

/// <summary>
///
/// baidu API response wrapper
/// </summary>
/// <seealso cref="BaiduWenxinChatResponse" />
public class ChatApiResponse : BaiduWenxinChatResponse
Expand All @@ -114,33 +114,9 @@ public class ChatApiResponse : BaiduWenxinChatResponse

}

/// <summary>
///
/// </summary>
public class ResponseStream<T>
{
/// <summary>
/// Gets or sets the data.
/// </summary>
/// <value>
/// The data.
/// </value>
[JsonPropertyName("data")]
public T Data { get; set; }

/// <summary>
/// Unfolds this instance.
/// </summary>
/// <returns></returns>
public T Unfold()
{
return Data;
}
}


/// <summary>
///
/// baidu API token usage per request.
/// </summary>
public class BaiduWenxinUsage
{
Expand Down Expand Up @@ -169,4 +145,28 @@ public class BaiduWenxinUsage
[JsonPropertyName("total_tokens")]
public int TotalTokens { get; set; }
}

/// <summary>
///
/// </summary>
public class ResponseStream<T>
{
/// <summary>
/// Gets or sets the data.
/// </summary>
/// <value>
/// The data.
/// </value>
[JsonPropertyName("data")]
public T Data { get; set; }

/// <summary>
/// Unfolds this instance.
/// </summary>
/// <returns></returns>
public T Unfold()
{
return Data;
}
}
}
2 changes: 1 addition & 1 deletion src/LLMServiceHub/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, AppSetti
}

option.RoutePrefix = "api-docs";
option.DocumentTitle = "幸福泉百度千帆大模型 API";
option.DocumentTitle = "百度千帆大模型 API";

option.DefaultModelRendering(Swashbuckle.AspNetCore.SwaggerUI.ModelRendering.Model);
option.DefaultModelExpandDepth(4);
Expand Down

0 comments on commit 7748a11

Please sign in to comment.