Class GatewayHttpClient
HTTP client for JD.AI Gateway REST API. Covers agents, sessions, providers, channels, routing, memory, plugins, and gateway status.
public sealed class GatewayHttpClient
- Inheritance
-
GatewayHttpClient
- Inherited Members
Constructors
GatewayHttpClient(HttpClient)
HTTP client for JD.AI Gateway REST API. Covers agents, sessions, providers, channels, routing, memory, plugins, and gateway status.
public GatewayHttpClient(HttpClient http)
Parameters
httpHttpClient
Methods
CloseSessionAsync(string, CancellationToken)
public Task CloseSessionAsync(string id, CancellationToken ct = default)
Parameters
idstringctCancellationToken
Returns
ConnectChannelAsync(string, CancellationToken)
public Task ConnectChannelAsync(string type, CancellationToken ct = default)
Parameters
typestringctCancellationToken
Returns
DeleteAgentAsync(string, CancellationToken)
public Task DeleteAgentAsync(string agentId, CancellationToken ct = default)
Parameters
agentIdstringctCancellationToken
Returns
DisconnectChannelAsync(string, CancellationToken)
public Task DisconnectChannelAsync(string type, CancellationToken ct = default)
Parameters
typestringctCancellationToken
Returns
ExportSessionAsync(string, CancellationToken)
public Task ExportSessionAsync(string id, CancellationToken ct = default)
Parameters
idstringctCancellationToken
Returns
GetAgentsAsync(CancellationToken)
public Task<AgentInfo[]> GetAgentsAsync(CancellationToken ct = default)
Parameters
Returns
GetChannelsAsync(CancellationToken)
public Task<ChannelInfo[]> GetChannelsAsync(CancellationToken ct = default)
Parameters
Returns
- Task<ChannelInfo[]>
GetProviderModelsAsync(string, CancellationToken)
public Task<ProviderModelInfo[]> GetProviderModelsAsync(string name, CancellationToken ct = default)
Parameters
namestringctCancellationToken
Returns
GetProvidersAsync(CancellationToken)
public Task<ProviderInfo[]> GetProvidersAsync(CancellationToken ct = default)
Parameters
Returns
- Task<ProviderInfo[]>
GetRoutingMappingsAsync(CancellationToken)
public Task<RoutingMapping[]> GetRoutingMappingsAsync(CancellationToken ct = default)
Parameters
Returns
GetSessionAsync(string, CancellationToken)
public Task<SessionInfo?> GetSessionAsync(string id, CancellationToken ct = default)
Parameters
idstringctCancellationToken
Returns
GetSessionsAsync(int, CancellationToken)
public Task<SessionInfo[]> GetSessionsAsync(int limit = 50, CancellationToken ct = default)
Parameters
limitintctCancellationToken
Returns
- Task<SessionInfo[]>
GetStatusAsync(CancellationToken)
public Task<GatewayStatus?> GetStatusAsync(CancellationToken ct = default)
Parameters
Returns
IndexDocumentAsync(string, string?, CancellationToken)
public Task IndexDocumentAsync(string content, string? source = null, CancellationToken ct = default)
Parameters
contentstringsourcestringctCancellationToken
Returns
IsHealthyAsync(CancellationToken)
public Task<bool> IsHealthyAsync(CancellationToken ct = default)
Parameters
Returns
MapRoutingAsync(string, string, CancellationToken)
public Task MapRoutingAsync(string channelId, string agentId, CancellationToken ct = default)
Parameters
channelIdstringagentIdstringctCancellationToken
Returns
SearchMemoryAsync(string, int, CancellationToken)
public Task<string[]> SearchMemoryAsync(string query, int limit = 5, CancellationToken ct = default)
Parameters
querystringlimitintctCancellationToken
Returns
SendMessageAsync(string, string, CancellationToken)
public Task<string?> SendMessageAsync(string agentId, string message, CancellationToken ct = default)
Parameters
agentIdstringmessagestringctCancellationToken
Returns
SpawnAgentAsync(AgentDefinition, CancellationToken)
public Task<string?> SpawnAgentAsync(AgentDefinition definition, CancellationToken ct = default)
Parameters
definitionAgentDefinitionctCancellationToken