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 @@ -30,7 +30,7 @@ partial void ProcessCreateAudioNativeByProjectIdContentResponseContent(
/// Updates content for the specific AudioNative Project.
/// </summary>
/// <param name="projectId">
/// The project_id of the project, you can query GET https://api.elevenlabs.io/v1/projects to list all available projects.
/// The ID of the Studio project.
/// </param>
/// <param name="xiApiKey">
/// Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.
Expand Down Expand Up @@ -245,7 +245,7 @@ partial void ProcessCreateAudioNativeByProjectIdContentResponseContent(
/// Updates content for the specific AudioNative Project.
/// </summary>
/// <param name="projectId">
/// The project_id of the project, you can query GET https://api.elevenlabs.io/v1/projects to list all available projects.
/// The ID of the Studio project.
/// </param>
/// <param name="xiApiKey">
/// Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ public partial class ConversationalAIClient
{
partial void PrepareCreateConvaiAgentsCreateArguments(
global::System.Net.Http.HttpClient httpClient,
ref bool? useToolIds,
ref string? xiApiKey,
global::ElevenLabs.BodyCreateAgentV1ConvaiAgentsCreatePost request);
partial void PrepareCreateConvaiAgentsCreateRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
bool? useToolIds,
string? xiApiKey,
global::ElevenLabs.BodyCreateAgentV1ConvaiAgentsCreatePost request);
partial void ProcessCreateConvaiAgentsCreateResponse(
Expand All @@ -27,6 +29,10 @@ partial void ProcessCreateConvaiAgentsCreateResponseContent(
/// Create Agent<br/>
/// Create an agent from a config object
/// </summary>
/// <param name="useToolIds">
/// Use tool ids instead of tools specs from request payload.<br/>
/// Default Value: false
/// </param>
/// <param name="xiApiKey">
/// Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.
/// </param>
Expand All @@ -35,6 +41,7 @@ partial void ProcessCreateConvaiAgentsCreateResponseContent(
/// <exception cref="global::ElevenLabs.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::ElevenLabs.CreateAgentResponseModel> CreateConvaiAgentsCreateAsync(
global::ElevenLabs.BodyCreateAgentV1ConvaiAgentsCreatePost request,
bool? useToolIds = default,
string? xiApiKey = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
Expand All @@ -44,12 +51,16 @@ partial void ProcessCreateConvaiAgentsCreateResponseContent(
client: HttpClient);
PrepareCreateConvaiAgentsCreateArguments(
httpClient: HttpClient,
useToolIds: ref useToolIds,
xiApiKey: ref xiApiKey,
request: request);

var __pathBuilder = new PathBuilder(
path: "/v1/convai/agents/create",
baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("use_tool_ids", useToolIds?.ToString())
;
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
Expand Down Expand Up @@ -93,6 +104,7 @@ partial void ProcessCreateConvaiAgentsCreateResponseContent(
PrepareCreateConvaiAgentsCreateRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
useToolIds: useToolIds,
xiApiKey: xiApiKey,
request: request);

Expand Down Expand Up @@ -212,6 +224,10 @@ partial void ProcessCreateConvaiAgentsCreateResponseContent(
/// Create Agent<br/>
/// Create an agent from a config object
/// </summary>
/// <param name="useToolIds">
/// Use tool ids instead of tools specs from request payload.<br/>
/// Default Value: false
/// </param>
/// <param name="xiApiKey">
/// Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.
/// </param>
Expand All @@ -228,6 +244,7 @@ partial void ProcessCreateConvaiAgentsCreateResponseContent(
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::ElevenLabs.CreateAgentResponseModel> CreateConvaiAgentsCreateAsync(
global::ElevenLabs.ConversationalConfig conversationConfig,
bool? useToolIds = default,
string? xiApiKey = default,
global::ElevenLabs.AgentPlatformSettings? platformSettings = default,
string? name = default,
Expand All @@ -241,6 +258,7 @@ partial void ProcessCreateConvaiAgentsCreateResponseContent(
};

return await CreateConvaiAgentsCreateAsync(
useToolIds: useToolIds,
xiApiKey: xiApiKey,
request: __request,
cancellationToken: cancellationToken).ConfigureAwait(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ namespace ElevenLabs
{
public partial class ConversationalAIClient
{
partial void PrepareCreateConvaiAddToolArguments(
partial void PrepareCreateConvaiToolsArguments(
global::System.Net.Http.HttpClient httpClient,
ref string? xiApiKey,
global::ElevenLabs.AllOf<global::ElevenLabs.ToolRequestModel> request);
partial void PrepareCreateConvaiAddToolRequest(
partial void PrepareCreateConvaiToolsRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string? xiApiKey,
global::ElevenLabs.AllOf<global::ElevenLabs.ToolRequestModel> request);
partial void ProcessCreateConvaiAddToolResponse(
partial void ProcessCreateConvaiToolsResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);

partial void ProcessCreateConvaiAddToolResponseContent(
partial void ProcessCreateConvaiToolsResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);
Expand All @@ -33,20 +33,20 @@ partial void ProcessCreateConvaiAddToolResponseContent(
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ElevenLabs.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::ElevenLabs.ToolResponseModel> CreateConvaiAddToolAsync(
public async global::System.Threading.Tasks.Task<global::ElevenLabs.ToolResponseModel> CreateConvaiToolsAsync(
global::ElevenLabs.AllOf<global::ElevenLabs.ToolRequestModel> request,
string? xiApiKey = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
PrepareCreateConvaiAddToolArguments(
PrepareCreateConvaiToolsArguments(
httpClient: HttpClient,
xiApiKey: ref xiApiKey,
request: request);

var __pathBuilder = new PathBuilder(
path: "/v1/convai/add-tool",
path: "/v1/convai/tools",
baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
Expand Down Expand Up @@ -88,7 +88,7 @@ partial void ProcessCreateConvaiAddToolResponseContent(
PrepareRequest(
client: HttpClient,
request: __httpRequest);
PrepareCreateConvaiAddToolRequest(
PrepareCreateConvaiToolsRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
xiApiKey: xiApiKey,
Expand All @@ -102,7 +102,7 @@ partial void ProcessCreateConvaiAddToolResponseContent(
ProcessResponse(
client: HttpClient,
response: __response);
ProcessCreateConvaiAddToolResponse(
ProcessCreateConvaiToolsResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
// Validation Error
Expand Down Expand Up @@ -146,7 +146,7 @@ partial void ProcessCreateConvaiAddToolResponseContent(
client: HttpClient,
response: __response,
content: ref __content);
ProcessCreateConvaiAddToolResponseContent(
ProcessCreateConvaiToolsResponseContent(
httpClient: HttpClient,
httpResponseMessage: __response,
content: ref __content);
Expand Down Expand Up @@ -215,15 +215,15 @@ partial void ProcessCreateConvaiAddToolResponseContent(
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::ElevenLabs.ToolResponseModel> CreateConvaiAddToolAsync(
public async global::System.Threading.Tasks.Task<global::ElevenLabs.ToolResponseModel> CreateConvaiToolsAsync(
string? xiApiKey = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __request = new global::ElevenLabs.AllOf<global::ElevenLabs.ToolRequestModel>
{
};

return await CreateConvaiAddToolAsync(
return await CreateConvaiToolsAsync(
xiApiKey: xiApiKey,
request: __request,
cancellationToken: cancellationToken).ConfigureAwait(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ partial void ProcessDeleteConvaiAgentsByAgentIdResponseContent(
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ElevenLabs.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::System.Collections.Generic.Dictionary<string, string>> DeleteConvaiAgentsByAgentIdAsync(
public async global::System.Threading.Tasks.Task<string> DeleteConvaiAgentsByAgentIdAsync(
string agentId,
string? xiApiKey = default,
global::System.Threading.CancellationToken cancellationToken = default)
Expand Down Expand Up @@ -166,9 +166,7 @@ partial void ProcessDeleteConvaiAgentsByAgentIdResponseContent(
};
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.Dictionary<string, string>), JsonSerializerContext) as global::System.Collections.Generic.Dictionary<string, string> ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
return __content;
}
else
{
Expand All @@ -190,15 +188,13 @@ partial void ProcessDeleteConvaiAgentsByAgentIdResponseContent(
};
}

using var __content = await __response.Content.ReadAsStreamAsync(
var __content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);

return
await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.Dictionary<string, string>), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.Dictionary<string, string> ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
return __content;
}
}
}
Expand Down
Loading
Loading