|
|
@@ -322,7 +322,13 @@ namespace OASystem.API.OAMethodLib.DeepSeekAPI
|
|
|
/// <summary>
|
|
|
/// 使用进行聊天
|
|
|
/// </summary>
|
|
|
- public async Task<ApiResponse> ChatAsync(string question, string model = "deepseek-chat", float temperature = 0.7f, int maxTokens = 4000)
|
|
|
+ /// <param name="question"></param>
|
|
|
+ /// <param name="model"></param>
|
|
|
+ /// <param name="stream"></param>
|
|
|
+ /// <param name="temperature"></param>
|
|
|
+ /// <param name="maxTokens"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public async Task<ApiResponse> ChatAsync(string question, bool stream = false, string model = "deepseek-chat", float temperature = 0.7f, int maxTokens = 4000)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
@@ -343,6 +349,7 @@ namespace OASystem.API.OAMethodLib.DeepSeekAPI
|
|
|
Content = messageContent
|
|
|
}
|
|
|
},
|
|
|
+ Stream = stream,
|
|
|
Temperature = temperature,
|
|
|
MaxTokens = maxTokens
|
|
|
};
|