feat: 完成跨域处理
This commit is contained in:
@@ -167,6 +167,36 @@ public class OpenApiService : ApplicationService
|
||||
tokenUsage.OutputTokenCount);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取模型列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("openApi/v1/models")]
|
||||
public async Task<ModelGetOutput> ModelsAsync()
|
||||
{
|
||||
return new ModelGetOutput()
|
||||
{
|
||||
Data = new List<ModelDataOutput>()
|
||||
{
|
||||
new ModelDataOutput
|
||||
{
|
||||
ModelId = "gpt-4.1-mini",
|
||||
Object = "model",
|
||||
Owned_by = "organization-owner",
|
||||
Permission = new List<string>()
|
||||
},
|
||||
new ModelDataOutput
|
||||
{
|
||||
ModelId = "gpt-4.1-nano",
|
||||
Object = "model",
|
||||
Owned_by = "organization-owner",
|
||||
Permission = new List<string>()
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
private SendMessageOutputDto MapToMessage(string modelId, string content)
|
||||
{
|
||||
var output = new SendMessageOutputDto
|
||||
|
||||
Reference in New Issue
Block a user