mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-12 20:01:37 +00:00
26 lines
691 B
C#
26 lines
691 B
C#
using AIStudio.Tools.Rust;
|
|
|
|
namespace AIStudio.Tools.Services;
|
|
|
|
public sealed partial class RustService
|
|
{
|
|
public async Task<QdrantInfo> GetQdrantInfo()
|
|
{
|
|
try
|
|
{
|
|
var cts = new CancellationTokenSource(TimeSpan.FromSeconds(45));
|
|
var response = await this.http.GetFromJsonAsync<QdrantInfo>("/system/qdrant/port", this.jsonRustSerializerOptions, cts.Token);
|
|
return response;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
Console.WriteLine(e);
|
|
return new QdrantInfo
|
|
{
|
|
Path = string.Empty,
|
|
PortHttp = 0,
|
|
PortGrpc = 0,
|
|
};
|
|
}
|
|
}
|
|
} |