2025-12-11 13:40:08 +00:00
|
|
|
|
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));
|
2026-01-13 15:38:22 +00:00
|
|
|
|
var response = await this.http.GetFromJsonAsync<QdrantInfo>("/system/qdrant/info", this.jsonRustSerializerOptions, cts.Token);
|
2025-12-11 13:40:08 +00:00
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
{
|
|
|
|
|
|
Console.WriteLine(e);
|
|
|
|
|
|
return new QdrantInfo
|
|
|
|
|
|
{
|
|
|
|
|
|
Path = string.Empty,
|
|
|
|
|
|
PortHttp = 0,
|
|
|
|
|
|
PortGrpc = 0,
|
2026-01-13 15:38:22 +00:00
|
|
|
|
Fingerprint = string.Empty,
|
|
|
|
|
|
ApiToken = string.Empty,
|
2025-12-11 13:40:08 +00:00
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|