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);
|
2026-01-14 08:03:20 +00:00
|
|
|
|
return default;
|
2025-12-11 13:40:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|