HostedAgentDefinition Class
- java.
lang. Object - com.
azure. ai. agents. models. AgentDefinition - com.
azure. ai. agents. models. HostedAgentDefinition
- com.
- com.
public final class HostedAgentDefinition
extends AgentDefinition
The hosted agent definition.
Constructor Summary
| Constructor | Description |
|---|---|
| HostedAgentDefinition(String cpu, String memory) |
Creates an instance of Hosted |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Hosted |
fromJson(JsonReader jsonReader)
Reads an instance of Hosted |
|
Code |
getCodeConfiguration()
Get the code |
|
Container |
getContainerConfiguration()
Get the container |
| String |
getCpu()
Get the cpu property: The CPU configuration for the hosted agent. |
| Map<String,String> |
getEnvironmentVariables()
Get the environment |
|
Agent |
getKind()
Get the kind property: The kind property. |
| String |
getMemory()
Get the memory property: The memory configuration for the hosted agent. |
|
List<Protocol |
getProtocolVersions()
Get the protocol |
|
Session |
getSessionConfiguration()
Get the session |
|
Telemetry |
getTelemetryConfig()
Get the telemetry |
| Boolean |
isMemorySnapshotEnabled()
Get the memory |
|
Hosted |
setCodeConfiguration(CodeConfiguration codeConfiguration)
Set the code |
|
Hosted |
setContainerConfiguration(ContainerConfiguration containerConfiguration)
Set the container |
|
Hosted |
setEnvironmentVariables(Map<String,String> environmentVariables)
Set the environment |
|
Hosted |
setMemorySnapshotEnabled(Boolean memorySnapshotEnabled)
Set the memory |
|
Hosted |
setProtocolVersions(List<ProtocolVersionRecord> protocolVersions)
Set the protocol |
|
Hosted |
setRaiConfig(RaiConfig raiConfig)
Set the rai |
|
Hosted |
setSessionConfiguration(SessionConfiguration sessionConfiguration)
Set the session |
|
Hosted |
setTelemetryConfig(TelemetryConfig telemetryConfig)
Set the telemetry |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from AgentDefinition
Methods inherited from java.lang.Object
Constructor Details
HostedAgentDefinition
public HostedAgentDefinition(String cpu, String memory)
Creates an instance of HostedAgentDefinition class.
Parameters:
Method Details
fromJson
public static HostedAgentDefinition fromJson(JsonReader jsonReader)
Reads an instance of HostedAgentDefinition from the JsonReader.
Parameters:
Returns:
Throws:
getCodeConfiguration
public CodeConfiguration getCodeConfiguration()
Get the codeConfiguration property: Code-based deployment configuration. Provide this for code-based deployments. Mutually exclusive with container_configuration — the service validates that exactly one is set.
Returns:
getContainerConfiguration
public ContainerConfiguration getContainerConfiguration()
Get the containerConfiguration property: Container-based deployment configuration. Provide this for image-based deployments. Mutually exclusive with code_configuration — the service validates that exactly one is set.
Returns:
getCpu
public String getCpu()
Get the cpu property: The CPU configuration for the hosted agent.
Returns:
getEnvironmentVariables
public Map<String,String> getEnvironmentVariables()
Get the environmentVariables property: Environment variables to set in the hosted agent container.
Returns:
getKind
public AgentKind getKind()
Get the kind property: The kind property.
Overrides:
HostedAgentDefinition.getKind()Returns:
getMemory
public String getMemory()
Get the memory property: The memory configuration for the hosted agent.
Returns:
getProtocolVersions
public List<ProtocolVersionRecord> getProtocolVersions()
Get the protocolVersions property: The protocols that the agent supports for ingress communication.
Returns:
getSessionConfiguration
public SessionConfiguration getSessionConfiguration()
Get the sessionConfiguration property: Optional session defaults (for example, the idle timeout) applied to sessions created for this agent version.
Returns:
getTelemetryConfig
public TelemetryConfig getTelemetryConfig()
Get the telemetryConfig property: Optional customer-supplied telemetry configuration for exporting container logs, traces, and metrics.
Returns:
isMemorySnapshotEnabled
public Boolean isMemorySnapshotEnabled()
Get the memorySnapshotEnabled property: Whether this agent version uses memory snapshots. Sessions for a snapshot-enabled version start from a snapshot of the agent's initialized process rather than starting the process from its image. Defaults to false.
Returns:
setCodeConfiguration
public HostedAgentDefinition setCodeConfiguration(CodeConfiguration codeConfiguration)
Set the codeConfiguration property: Code-based deployment configuration. Provide this for code-based deployments. Mutually exclusive with container_configuration — the service validates that exactly one is set.
Parameters:
Returns:
setContainerConfiguration
public HostedAgentDefinition setContainerConfiguration(ContainerConfiguration containerConfiguration)
Set the containerConfiguration property: Container-based deployment configuration. Provide this for image-based deployments. Mutually exclusive with code_configuration — the service validates that exactly one is set.
Parameters:
Returns:
setEnvironmentVariables
public HostedAgentDefinition setEnvironmentVariables(Map<String,String> environmentVariables)
Set the environmentVariables property: Environment variables to set in the hosted agent container.
Parameters:
Returns:
setMemorySnapshotEnabled
public HostedAgentDefinition setMemorySnapshotEnabled(Boolean memorySnapshotEnabled)
Set the memorySnapshotEnabled property: Whether this agent version uses memory snapshots. Sessions for a snapshot-enabled version start from a snapshot of the agent's initialized process rather than starting the process from its image. Defaults to false.
Parameters:
Returns:
setProtocolVersions
public HostedAgentDefinition setProtocolVersions(List<ProtocolVersionRecord> protocolVersions)
Set the protocolVersions property: The protocols that the agent supports for ingress communication.
Parameters:
Returns:
setRaiConfig
public HostedAgentDefinition setRaiConfig(RaiConfig raiConfig)
Set the raiConfig property: Configuration for Responsible AI (RAI) content filtering and safety features.
Overrides:
HostedAgentDefinition.setRaiConfig(RaiConfig raiConfig)Parameters:
setSessionConfiguration
public HostedAgentDefinition setSessionConfiguration(SessionConfiguration sessionConfiguration)
Set the sessionConfiguration property: Optional session defaults (for example, the idle timeout) applied to sessions created for this agent version.
Parameters:
Returns:
setTelemetryConfig
public HostedAgentDefinition setTelemetryConfig(TelemetryConfig telemetryConfig)
Set the telemetryConfig property: Optional customer-supplied telemetry configuration for exporting container logs, traces, and metrics.
Parameters:
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
HostedAgentDefinition.toJson(JsonWriter jsonWriter)Parameters:
Throws: