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
Expand Up @@ -89,7 +89,21 @@ public partial interface IToolDefinitionsClient
/// the same decision: key on this header and refuse to act twice. One<br/>
/// connector serving both transports dedups on one identifier. The key<br/>
/// is `&lt;run_id&gt;:&lt;step&gt;`, and `GET /v1/agents/runs/{run_id}` resolves the<br/>
/// run, its agent and the person it acts for from the id alone.
/// run, its agent and the person it acts for from the id alone.<br/>
/// Every request of a tool-call session also carries<br/>
/// `Speechify-Conversation-Id`, naming the unit of work on Speechify's<br/>
/// side the call belongs to, so you can trace one end to end: we hold<br/>
/// the question, your server holds the tool calls, and this is the<br/>
/// join. On a voice, text or Slack conversation it is the<br/>
/// conversation's `conv_…` id, set once when the session opens so its<br/>
/// handshake carries it too, and<br/>
/// `GET /v1/agents/conversations/{conversation_id}` resolves it. A<br/>
/// durable run has no conversation, so each tool call sends the run's<br/>
/// `arun_…` id instead, the same id that prefixes<br/>
/// `Speechify-Idempotency-Key`. The prefix says which you were sent.<br/>
/// The tool discovery a durable run performs before a step<br/>
/// (`initialize` + `tools/list`, no `tools/call`) is the one request<br/>
/// without it: its result is reused across runs, so it names no run.
/// </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>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace Speechify.JsonConverters
{
/// <inheritdoc />
public sealed class AgentLlmConfigReasoningEffortJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Speechify.AgentLlmConfigReasoningEffort>
{
/// <inheritdoc />
public override global::Speechify.AgentLlmConfigReasoningEffort 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::Speechify.AgentLlmConfigReasoningEffortExtensions.ToEnum(stringValue) ?? default;
}

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

return default;
}

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

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

namespace Speechify.JsonConverters
{
/// <inheritdoc />
public sealed class AgentLlmConfigReasoningEffortNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Speechify.AgentLlmConfigReasoningEffort?>
{
/// <inheritdoc />
public override global::Speechify.AgentLlmConfigReasoningEffort? 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::Speechify.AgentLlmConfigReasoningEffortExtensions.ToEnum(stringValue);
}

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

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Speechify.AgentLlmConfigReasoningEffort? 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::Speechify.AgentLlmConfigReasoningEffortExtensions.ToValueString(value.Value));
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace Speechify.JsonConverters
{
/// <inheritdoc />
public sealed class AgentSnapshotReasoningEffortJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Speechify.AgentSnapshotReasoningEffort>
{
/// <inheritdoc />
public override global::Speechify.AgentSnapshotReasoningEffort 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::Speechify.AgentSnapshotReasoningEffortExtensions.ToEnum(stringValue) ?? default;
}

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

return default;
}

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

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

namespace Speechify.JsonConverters
{
/// <inheritdoc />
public sealed class AgentSnapshotReasoningEffortNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Speechify.AgentSnapshotReasoningEffort?>
{
/// <inheritdoc />
public override global::Speechify.AgentSnapshotReasoningEffort? 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::Speechify.AgentSnapshotReasoningEffortExtensions.ToEnum(stringValue);
}

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

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Speechify.AgentSnapshotReasoningEffort? 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::Speechify.AgentSnapshotReasoningEffortExtensions.ToValueString(value.Value));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public class AgentToolConfigJsonConverter : global::System.Text.Json.Serializati
if (__jsonProps.Contains("long_running.filler_message")) __score3++;
if (__jsonProps.Contains("long_running.on_duplicate")) __score3++;
if (__jsonProps.Contains("long_running.wait_audio")) __score3++;
if (__jsonProps.Contains("timeout_ms")) __score3++;
if (__jsonProps.Contains("transport")) __score3++;
var __bestScore = 0;
var __bestIndex = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public class CreateAgentToolRequestConfigJsonConverter : global::System.Text.Jso
if (__jsonProps.Contains("long_running.filler_message")) __score3++;
if (__jsonProps.Contains("long_running.on_duplicate")) __score3++;
if (__jsonProps.Contains("long_running.wait_audio")) __score3++;
if (__jsonProps.Contains("timeout_ms")) __score3++;
if (__jsonProps.Contains("transport")) __score3++;
var __bestScore = 0;
var __bestIndex = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public class CreateToolRequestConfigJsonConverter : global::System.Text.Json.Ser
if (__jsonProps.Contains("long_running.filler_message")) __score2++;
if (__jsonProps.Contains("long_running.on_duplicate")) __score2++;
if (__jsonProps.Contains("long_running.wait_audio")) __score2++;
if (__jsonProps.Contains("timeout_ms")) __score2++;
if (__jsonProps.Contains("transport")) __score2++;
var __bestScore = 0;
var __bestIndex = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public class ToolConfigJsonConverter : global::System.Text.Json.Serialization.Js
if (__jsonProps.Contains("long_running.filler_message")) __score2++;
if (__jsonProps.Contains("long_running.on_duplicate")) __score2++;
if (__jsonProps.Contains("long_running.wait_audio")) __score2++;
if (__jsonProps.Contains("timeout_ms")) __score2++;
if (__jsonProps.Contains("transport")) __score2++;
var __bestScore = 0;
var __bestIndex = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public class UpdateToolRequestConfigJsonConverter : global::System.Text.Json.Ser
if (__jsonProps.Contains("long_running.filler_message")) __score2++;
if (__jsonProps.Contains("long_running.on_duplicate")) __score2++;
if (__jsonProps.Contains("long_running.wait_audio")) __score2++;
if (__jsonProps.Contains("timeout_ms")) __score2++;
if (__jsonProps.Contains("transport")) __score2++;
var __bestScore = 0;
var __bestIndex = -1;
Expand Down
Loading