Class GenerativeAiAgentRuntimeClient
Service client instance for GenerativeAiAgentRuntime.
Implements
Inherited Members
Namespace: Oci.GenerativeaiagentruntimeService
Assembly: OCI.DotNetSDK.Generativeaiagentruntime.dll
Syntax
public class GenerativeAiAgentRuntimeClient : RegionalClientBase, IDisposable
Constructors
GenerativeAiAgentRuntimeClient(IBasicAuthenticationDetailsProvider, ClientConfiguration, string)
Creates a new service instance using the given authentication provider and/or client configuration and/or endpoint. A client configuration can also be provided optionally to adjust REST client behaviors.
Declaration
public GenerativeAiAgentRuntimeClient(IBasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration clientConfiguration = null, string endpoint = null)
Parameters
Type | Name | Description |
---|---|---|
IBasicAuthenticationDetailsProvider | authenticationDetailsProvider | The authentication details provider. Required. |
ClientConfiguration | clientConfiguration | The client configuration that contains settings to adjust REST client behaviors. Optional. |
string | endpoint | The endpoint of the service. If not provided and the client is a regional client, the endpoint will be constructed based on region information. Optional. |
Methods
Chat(ChatRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Chat on endpoint with provided messages.
Declaration
public Task<ChatResponse> Chat(ChatRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
ChatRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<ChatResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use Chat API.
CreateSession(CreateSessionRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
A session represents an interactive conversation initiated by a user through an API to engage with an agent. It involves a series of exchanges where the user sends queries or prompts, and the agent responds with relevant information, actions, or assistance based on the user's input. The session persists for the duration of the interaction, maintaining context and continuity to provide coherent and meaningful responses throughout the conversation.Creates an agent session. <br/> Use this API to create an agent session.
Declaration
public Task<CreateSessionResponse> CreateSession(CreateSessionRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
CreateSessionRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<CreateSessionResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use CreateSession API.
DeleteSession(DeleteSessionRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Delete a session and all its associated information.
Declaration
public Task<DeleteSessionResponse> DeleteSession(DeleteSessionRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
DeleteSessionRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<DeleteSessionResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use DeleteSession API.
GetSession(GetSessionRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Return the session resource identified by the session ID.
Declaration
public Task<GetSessionResponse> GetSession(GetSessionRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
GetSessionRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<GetSessionResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use GetSession API.
RetrieveMetadata(RetrieveMetadataRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Returns metadata of provided knowledgeBase. Return available metadata with information of field names, their types, supported operations, and possible values.
Declaration
public Task<RetrieveMetadataResponse> RetrieveMetadata(RetrieveMetadataRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
RetrieveMetadataRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<RetrieveMetadataResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use RetrieveMetadata API.
UpdateSession(UpdateSessionRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Update session metadata, including but not limited to description, tags.
Declaration
public Task<UpdateSessionResponse> UpdateSession(UpdateSessionRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
UpdateSessionRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<UpdateSessionResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use UpdateSession API.