Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#nullable enable

namespace RetellAI
{
public partial interface IRetellAiClient
{
/// <summary>
/// Stateless playground completion. Send the full conversation history (same shape as chat completion messages) and receive only the newly generated messages. Nothing is persisted server-side — the caller manages conversation state.
/// </summary>
/// <param name="agentId"></param>
/// <param name="version"></param>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::RetellAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::RetellAI.AgentPlaygroundCompletionResponse> AgentPlaygroundCompletionAsync(
string agentId,

global::RetellAI.AgentPlaygroundCompletionRequest request,
int? version = default,
global::RetellAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Stateless playground completion. Send the full conversation history (same shape as chat completion messages) and receive only the newly generated messages. Nothing is persisted server-side — the caller manages conversation state.
/// </summary>
/// <param name="agentId"></param>
/// <param name="version"></param>
/// <param name="messages">
/// Full conversation history, same shape as chat completion messages. message_id and created_timestamp are optional — server generates them if omitted.
/// </param>
/// <param name="dynamicVariables">
/// Key-value pairs for dynamic variable substitution.
/// </param>
/// <param name="toolMocks">
/// Optional mock responses for tools. When provided, the agent uses these instead of executing real tool calls.
/// </param>
/// <param name="currentState">
/// Current state name for retell-llm agents. Used to resume from a specific state.
/// </param>
/// <param name="currentNodeId">
/// Current node id for conversation-flow agents. Used to resume from a specific node. Must be provided together with component_id when testing components.
/// </param>
/// <param name="componentId">
/// Conversation flow component id. Required when current_node_id refers to a node within a component.
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::RetellAI.AgentPlaygroundCompletionResponse> AgentPlaygroundCompletionAsync(
string agentId,
global::System.Collections.Generic.IList<global::RetellAI.ChatMessageInput> messages,
int? version = default,
global::System.Collections.Generic.Dictionary<string, string>? dynamicVariables = default,
global::System.Collections.Generic.IList<global::RetellAI.ToolMock>? toolMocks = default,
string? currentState = default,
string? currentNodeId = default,
string? componentId = default,
global::RetellAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace RetellAI.JsonConverters
{
/// <inheritdoc />
public sealed class AgentPlaygroundCompletionResponseStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::RetellAI.AgentPlaygroundCompletionResponseStatus>
{
/// <inheritdoc />
public override global::RetellAI.AgentPlaygroundCompletionResponseStatus Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::RetellAI.AgentPlaygroundCompletionResponseStatusExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::RetellAI.AgentPlaygroundCompletionResponseStatus)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::RetellAI.AgentPlaygroundCompletionResponseStatus);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::RetellAI.AgentPlaygroundCompletionResponseStatus value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::RetellAI.AgentPlaygroundCompletionResponseStatusExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace RetellAI.JsonConverters
{
/// <inheritdoc />
public sealed class AgentPlaygroundCompletionResponseStatus2JsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::RetellAI.AgentPlaygroundCompletionResponseStatus2>
{
/// <inheritdoc />
public override global::RetellAI.AgentPlaygroundCompletionResponseStatus2 Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::RetellAI.AgentPlaygroundCompletionResponseStatus2Extensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::RetellAI.AgentPlaygroundCompletionResponseStatus2)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::RetellAI.AgentPlaygroundCompletionResponseStatus2);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::RetellAI.AgentPlaygroundCompletionResponseStatus2 value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::RetellAI.AgentPlaygroundCompletionResponseStatus2Extensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace RetellAI.JsonConverters
{
/// <inheritdoc />
public sealed class AgentPlaygroundCompletionResponseStatus2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::RetellAI.AgentPlaygroundCompletionResponseStatus2?>
{
/// <inheritdoc />
public override global::RetellAI.AgentPlaygroundCompletionResponseStatus2? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::RetellAI.AgentPlaygroundCompletionResponseStatus2Extensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::RetellAI.AgentPlaygroundCompletionResponseStatus2)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::RetellAI.AgentPlaygroundCompletionResponseStatus2?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::RetellAI.AgentPlaygroundCompletionResponseStatus2? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

if (value == null)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(global::RetellAI.AgentPlaygroundCompletionResponseStatus2Extensions.ToValueString(value.Value));
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace RetellAI.JsonConverters
{
/// <inheritdoc />
public sealed class AgentPlaygroundCompletionResponseStatus3JsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::RetellAI.AgentPlaygroundCompletionResponseStatus3>
{
/// <inheritdoc />
public override global::RetellAI.AgentPlaygroundCompletionResponseStatus3 Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::RetellAI.AgentPlaygroundCompletionResponseStatus3Extensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::RetellAI.AgentPlaygroundCompletionResponseStatus3)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::RetellAI.AgentPlaygroundCompletionResponseStatus3);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::RetellAI.AgentPlaygroundCompletionResponseStatus3 value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::RetellAI.AgentPlaygroundCompletionResponseStatus3Extensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace RetellAI.JsonConverters
{
/// <inheritdoc />
public sealed class AgentPlaygroundCompletionResponseStatus3NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::RetellAI.AgentPlaygroundCompletionResponseStatus3?>
{
/// <inheritdoc />
public override global::RetellAI.AgentPlaygroundCompletionResponseStatus3? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::RetellAI.AgentPlaygroundCompletionResponseStatus3Extensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::RetellAI.AgentPlaygroundCompletionResponseStatus3)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::RetellAI.AgentPlaygroundCompletionResponseStatus3?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::RetellAI.AgentPlaygroundCompletionResponseStatus3? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

if (value == null)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(global::RetellAI.AgentPlaygroundCompletionResponseStatus3Extensions.ToValueString(value.Value));
}
}
}
}
Loading
Loading