mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-12 17:21:36 +00:00
Use a const instead
This commit is contained in:
parent
3f7b230e6b
commit
ef3d17de0f
@ -8,7 +8,7 @@ public class QdrantClientImplementation : DatabaseClient
|
|||||||
private int HttpPort { get; }
|
private int HttpPort { get; }
|
||||||
|
|
||||||
private int GrpcPort { get; }
|
private int GrpcPort { get; }
|
||||||
private string IpAddress => "localhost";
|
|
||||||
private QdrantClient GrpcClient { get; }
|
private QdrantClient GrpcClient { get; }
|
||||||
|
|
||||||
private string Fingerprint { get; }
|
private string Fingerprint { get; }
|
||||||
@ -24,9 +24,11 @@ public class QdrantClientImplementation : DatabaseClient
|
|||||||
this.GrpcClient = this.CreateQdrantClient();
|
this.GrpcClient = this.CreateQdrantClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private const string IP_ADDRESS = "localhost";
|
||||||
|
|
||||||
public QdrantClient CreateQdrantClient()
|
public QdrantClient CreateQdrantClient()
|
||||||
{
|
{
|
||||||
var address = "https://" + this.IpAddress + ":" + this.GrpcPort;
|
var address = "https://" + IP_ADDRESS + ":" + this.GrpcPort;
|
||||||
var channel = QdrantChannel.ForAddress(address, new ClientConfiguration
|
var channel = QdrantChannel.ForAddress(address, new ClientConfiguration
|
||||||
{
|
{
|
||||||
ApiKey = this.ApiToken,
|
ApiKey = this.ApiToken,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user