Skip to content

Conversation

louisjoecodes
Copy link
Collaborator

@louisjoecodes louisjoecodes commented Dec 11, 2024

  • Adds the ability for client-tools to be called in Swift

Usage:

var clientTools = ElevenLabsSDK.ClientTools()

// Register a simple tool to greet someone
clientTools.register("say_hello") { parameters in
    let name = parameters["name"] as? String ?? "World"
    return "Hello, \(name)!"
}

let sessionConfig = ElevenLabsSDK.SessionConfig(agentId: "agent-123")

...

// Start the conversation
let conversation = try await ElevenLabsSDK.Conversation.startSession(
    config: sessionConfig,
    callbacks: callbacks,
    clientTools: clientTools // Pass the tools here
)

@louisjoecodes louisjoecodes changed the title feat: add client-tools to swift feat: add client-tools to swift SDK Dec 11, 2024
@louisjoecodes louisjoecodes requested a review from jodik December 11, 2024 17:39
@louisjoecodes louisjoecodes merged commit 4b80ebd into main Dec 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants