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
7,522 changes: 7,509 additions & 13 deletions .fern/replay.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "elevenlabs-cli"
version = "1.7.1"
version = "1.8.0"
edition = "2021"
description = "CLI for the ElevenLabs API"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion cli/elevenlabs/openapi0.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cli/elevenlabs/workflow/flows_spec.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ impl BranchesClient {
/// .rebase(
/// &"agent_3701k3ttaq12ewp8b7qv5rfyszkz".to_string(),
/// &"agtbrch_8901k4t9z5defmb8vh3e9361y7nj".to_string(),
/// &RebaseQueryRequest {
/// &BodyRebaseABranchOntoMainV1ConvaiAgentsAgentIDBranchesBranchIDRebasePost {
/// source_branch_id: Some("source_branch_id".to_string()),
/// ..Default::default()
/// },
Expand All @@ -481,7 +481,7 @@ impl BranchesClient {
&self,
agent_id: &str,
branch_id: &str,
request: &RebaseQueryRequest,
request: &BodyRebaseABranchOntoMainV1ConvaiAgentsAgentIdBranchesBranchIdRebasePost,
options: Option<RequestOptions>,
) -> Result<serde_json::Value, ApiError> {
self.http_client
Expand All @@ -491,7 +491,7 @@ impl BranchesClient {
"v1/convai/agents/{}/branches/{}/rebase",
agent_id, branch_id
),
None,
Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
QueryBuilder::new()
.string("source_branch_id", request.source_branch_id.clone())
.build(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ impl CrawlJobsClient {
/// max_depth: None,
/// max_pages: None,
/// pattern: None,
/// exclude_patterns: None,
/// sitemap_urls: None,
/// parent_folder_id: None,
/// enable_auto_sync: None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ impl LlmUsageClient {
/// prompt_length: 1,
/// number_of_pages: 1,
/// rag_enabled: true,
/// service_tier: None,
/// },
/// None,
/// )
Expand Down
3 changes: 2 additions & 1 deletion elevenlabs-sdk/src/api/resources/agents/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ impl AgentsClient {
.await
}

/// Create a new agent by duplicating an existing one. The new agent gets a copy of every unarchived branch of the source agent, each with the same name and description and starting from the latest version on that branch. Version history, drafts, archived branches and traffic deployments are not copied, so the new agent routes all traffic to its main branch.
/// Create a new agent by duplicating an existing one. The new agent gets a copy of every unarchived branch of the source agent, each with the same name and description and starting from the latest version on that branch. The live traffic split is copied onto the new branches, with any share held by a branch that was not copied moved to main. Version history, drafts, archived branches, past traffic splits and experiments are not copied.
///
/// # Arguments
///
Expand Down Expand Up @@ -671,6 +671,7 @@ impl AgentsClient {
/// test_id: "test_id".to_string(),
/// ..Default::default()
/// }],
/// name: None,
/// agent_config_override: None,
/// branch_id: None,
/// repeat_count: None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,59 @@ impl InvocationsClient {
.await
}

/// Updates the user-provided name of a test invocation.
///
/// # Arguments
///
/// * `test_invocation_id` - The id of a test invocation. This is returned when tests are run.
/// * `options` - Additional request options such as headers, timeout, etc.
///
/// # Returns
///
/// JSON response from the API
///
/// # Examples
///
/// ```no_run
/// use elevenlabs_sdk::prelude::*;
///
/// #[tokio::main]
/// async fn main() {
/// let config = ClientConfig {
/// ..Default::default()
/// };
/// let client = ElevenlabsClient::new(config).expect("Failed to build client");
/// client
/// .agents
/// .tests
/// .invocations
/// .update(
/// &"test_invocation_id".to_string(),
/// &UpdateTestSuiteInvocationRequestModel {
/// ..Default::default()
/// },
/// None,
/// )
/// .await;
/// }
/// ```
pub async fn update(
&self,
test_invocation_id: &str,
request: &UpdateTestSuiteInvocationRequestModel,
options: Option<RequestOptions>,
) -> Result<GetTestSuiteInvocationResponseModel, ApiError> {
self.http_client
.execute_request(
Method::PATCH,
&format!("v1/convai/test-invocations/{}", test_invocation_id),
Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
None,
options,
)
.await
}

/// Cancels all pending runs in a test invocation.
///
/// # Arguments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ impl TriageTicketsClient {
.await
}

/// Update a ticket's title, comment, status, priority, and/or assignee. Requires editor access to the ticket's agent.
/// Update a ticket's title, comment, status, priority, and/or assignee. Requires viewer access to the ticket's agent.
///
/// # Arguments
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,49 @@ impl EnvironmentVariablesClient {
.await
}

/// Delete an environment variable and its values in all environments. WARNING: Agents are not checked. A variable that an agent still uses (custom LLM, webhooks or cloud storage export, on any branch or version) is deleted anyway, and that agent's conversations then fail. The delete is only rejected while tools, MCP servers or the workspace conversation initiation webhook use the variable.
///
/// # Arguments
///
/// * `options` - Additional request options such as headers, timeout, etc.
///
/// # Returns
///
/// Empty response
///
/// # Examples
///
/// ```no_run
/// use elevenlabs_sdk::prelude::*;
///
/// #[tokio::main]
/// async fn main() {
/// let config = ClientConfig {
/// ..Default::default()
/// };
/// let client = ElevenlabsClient::new(config).expect("Failed to build client");
/// client
/// .environment_variables
/// .delete(&"env_var_id".to_string(), None)
/// .await;
/// }
/// ```
pub async fn delete(
&self,
env_var_id: &str,
options: Option<RequestOptions>,
) -> Result<(), ApiError> {
self.http_client
.execute_request(
Method::DELETE,
&format!("v1/convai/environment-variables/{}", env_var_id),
None,
None,
options,
)
.await
}

/// Replace an environment variable's values. Use null to remove its value for an environment (except production); delete an environment with DELETE /v1/convai/environments/{environment}.
///
/// # Arguments
Expand Down
4 changes: 2 additions & 2 deletions elevenlabs-sdk/src/api/resources/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
//! - **SpeechToSpeech**
//! - **TextToVoice**
//! - **User**
//! - **Voices**
//! - **Access to voices created either by you or ElevenLabs.**
//! - **Access, create and convert Studio Projects programmatically.**
//! - **Dub audio and video content into other languages while preserving the original speaker's voice.**
//! - **Access the different models of the platform.**
//! - **AudioNative**
//! - **Usage**
//! - **PronunciationDictionaries**
//! - **Workspace**
//! - **workspace**
//! - **ServiceAccounts**
//! - **Webhooks**
//! - **Music**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ impl ApiKeysClient {
/// third_party_disable_allowed: None,
/// tts_concurrency_limit: None,
/// dubbing_concurrency_limit: None,
/// music_concurrency_limit: None
/// music_concurrency_limit: None,
/// expires_at_unix: None
/// }, None).await;
/// }
/// ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl SpeechToSpeechClient {
self.http_client
.execute_multipart_stream_request(
Method::POST,
&format!("v1/speech-to-speech/{}", voice_id),
&format!("v1/voice-changer/{}", voice_id),
request.clone().to_multipart(),
QueryBuilder::new()
.bool("enable_logging", request.enable_logging.clone())
Expand Down Expand Up @@ -150,7 +150,7 @@ impl SpeechToSpeechClient {
self.http_client
.execute_multipart_stream_request(
Method::POST,
&format!("v1/speech-to-speech/{}/stream", voice_id),
&format!("v1/voice-changer/{}/stream", voice_id),
request.clone().to_multipart(),
QueryBuilder::new()
.bool("enable_logging", request.enable_logging.clone())
Expand Down
4 changes: 4 additions & 0 deletions elevenlabs-types/src/types/agent_definition_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pub enum AgentDefinitionSource {
Ui,
Api,
Template,
Architect,
Unknown,
/// This variant is used for forward compatibility.
/// If the server sends a value not recognized by the current SDK version,
Expand All @@ -22,6 +23,7 @@ impl Serialize for AgentDefinitionSource {
Self::Ui => serializer.serialize_str("ui"),
Self::Api => serializer.serialize_str("api"),
Self::Template => serializer.serialize_str("template"),
Self::Architect => serializer.serialize_str("architect"),
Self::Unknown => serializer.serialize_str("unknown"),
Self::__Unknown(val) => serializer.serialize_str(val),
}
Expand All @@ -36,6 +38,7 @@ impl<'de> Deserialize<'de> for AgentDefinitionSource {
"ui" => Ok(Self::Ui),
"api" => Ok(Self::Api),
"template" => Ok(Self::Template),
"architect" => Ok(Self::Architect),
"unknown" => Ok(Self::Unknown),
_ => Ok(Self::__Unknown(value)),
}
Expand All @@ -49,6 +52,7 @@ impl fmt::Display for AgentDefinitionSource {
Self::Ui => write!(f, "ui"),
Self::Api => write!(f, "api"),
Self::Template => write!(f, "template"),
Self::Architect => write!(f, "architect"),
Self::Unknown => write!(f, "unknown"),
Self::__Unknown(val) => write!(f, "{}", val),
}
Expand Down
4 changes: 4 additions & 0 deletions elevenlabs-types/src/types/agent_deployment_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use super::*;
pub enum AgentDeploymentSource {
Manual,
BranchMerge,
Duplicate,
/// This variant is used for forward compatibility.
/// If the server sends a value not recognized by the current SDK version,
/// it will be captured here with the raw string value.
Expand All @@ -17,6 +18,7 @@ impl Serialize for AgentDeploymentSource {
match self {
Self::Manual => serializer.serialize_str("manual"),
Self::BranchMerge => serializer.serialize_str("branch_merge"),
Self::Duplicate => serializer.serialize_str("duplicate"),
Self::__Unknown(val) => serializer.serialize_str(val),
}
}
Expand All @@ -28,6 +30,7 @@ impl<'de> Deserialize<'de> for AgentDeploymentSource {
match value.as_str() {
"manual" => Ok(Self::Manual),
"branch_merge" => Ok(Self::BranchMerge),
"duplicate" => Ok(Self::Duplicate),
_ => Ok(Self::__Unknown(value)),
}
}
Expand All @@ -38,6 +41,7 @@ impl fmt::Display for AgentDeploymentSource {
match self {
Self::Manual => write!(f, "manual"),
Self::BranchMerge => write!(f, "branch_merge"),
Self::Duplicate => write!(f, "duplicate"),
Self::__Unknown(val) => write!(f, "{}", val),
}
}
Expand Down
10 changes: 0 additions & 10 deletions elevenlabs-types/src/types/auto_sync_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ pub struct AutoSyncInfo {
/// Whether to remove the document if the URL becomes unavailable
#[serde(skip_serializing_if = "Option::is_none")]
pub auto_remove: Option<bool>,
/// Deprecated. This field no longer has any effect and will be removed in a future release.
#[serde(skip_serializing_if = "Option::is_none")]
pub auto_discover: Option<bool>,
/// Number of consecutive sync failures
#[serde(skip_serializing_if = "Option::is_none")]
pub consec_failures: Option<i64>,
Expand All @@ -32,7 +29,6 @@ impl AutoSyncInfo {
pub struct AutoSyncInfoBuilder {
minimum_frequency_days: Option<i64>,
auto_remove: Option<bool>,
auto_discover: Option<bool>,
consec_failures: Option<i64>,
next_refresh_by: Option<i64>,
}
Expand All @@ -48,11 +44,6 @@ impl AutoSyncInfoBuilder {
self
}

pub fn auto_discover(mut self, value: bool) -> Self {
self.auto_discover = Some(value);
self
}

pub fn consec_failures(mut self, value: i64) -> Self {
self.consec_failures = Some(value);
self
Expand All @@ -68,7 +59,6 @@ impl AutoSyncInfoBuilder {
Ok(AutoSyncInfo {
minimum_frequency_days: self.minimum_frequency_days,
auto_remove: self.auto_remove,
auto_discover: self.auto_discover,
consec_failures: self.consec_failures,
next_refresh_by: self.next_refresh_by,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ pub struct BodyCreateCrawlJobV1ConvaiKnowledgeBaseCrawlPost {
/// If set, only URLs that match this pattern are included.
#[serde(skip_serializing_if = "Option::is_none")]
pub pattern: Option<String>,
/// If set, URLs that match any of these patterns are skipped, even if they match `pattern`.
#[serde(skip_serializing_if = "Option::is_none")]
pub exclude_patterns: Option<Vec<String>>,
/// List of URLs to crawl from sitemap (optional, overrides automatic URL discovery).
#[serde(skip_serializing_if = "Option::is_none")]
pub sitemap_urls: Option<Vec<String>>,
Expand Down Expand Up @@ -49,6 +52,7 @@ pub struct BodyCreateCrawlJobV1ConvaiKnowledgeBaseCrawlPostBuilder {
max_depth: Option<i64>,
max_pages: Option<i64>,
pattern: Option<String>,
exclude_patterns: Option<Vec<String>>,
sitemap_urls: Option<Vec<String>>,
parent_folder_id: Option<String>,
enable_auto_sync: Option<bool>,
Expand Down Expand Up @@ -78,6 +82,11 @@ impl BodyCreateCrawlJobV1ConvaiKnowledgeBaseCrawlPostBuilder {
self
}

pub fn exclude_patterns(mut self, value: Vec<String>) -> Self {
self.exclude_patterns = Some(value);
self
}

pub fn sitemap_urls(mut self, value: Vec<String>) -> Self {
self.sitemap_urls = Some(value);
self
Expand Down Expand Up @@ -117,6 +126,7 @@ impl BodyCreateCrawlJobV1ConvaiKnowledgeBaseCrawlPostBuilder {
max_depth: self.max_depth,
max_pages: self.max_pages,
pattern: self.pattern,
exclude_patterns: self.exclude_patterns,
sitemap_urls: self.sitemap_urls,
parent_folder_id: self.parent_folder_id,
enable_auto_sync: self.enable_auto_sync,
Expand Down
Loading
Loading