tavus 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +86 -45
- data/Gemfile.lock +1 -1
- data/README.md +47 -5
- data/lib/tavus/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c039f30c7780c7779cf62ebab8ba14a93804219d34b6142107597f72c7b3648e
|
|
4
|
+
data.tar.gz: 06ad9b3b7220bc5d4310ffa39fdab1fb09c867d93736aca4915d3f29736b80ed
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 71ac4bdf23f3f45455038616600b6d82c6bb9c8e3773ab767c7a0d4452050f85161479c98a00e129f2a5722cba0642a3708b29b707c25f41ad804a713905907d
|
|
7
|
+
data.tar.gz: 81f62d1e52cbb1969342046a8c108ae57a91ceb54ed1c4d55c0e3fdaa7f5a8158b9535d1fff1840730f5fb7b1fa24b0a1857d2a61a5ee0993ada72e78df4cbdf
|
data/CHANGELOG.md
CHANGED
|
@@ -10,49 +10,90 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
10
10
|
### Added
|
|
11
11
|
|
|
12
12
|
- Initial release of Tavus Ruby client
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
- Create
|
|
27
|
-
- Get
|
|
28
|
-
- List
|
|
29
|
-
-
|
|
30
|
-
- Delete
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
13
|
+
- Full coverage of Tavus API v2 endpoints
|
|
14
|
+
|
|
15
|
+
- **Conversations Management**:
|
|
16
|
+
- Create conversation with replica and persona
|
|
17
|
+
- Get conversation details by ID
|
|
18
|
+
- List conversations with pagination and filtering
|
|
19
|
+
- End active conversations
|
|
20
|
+
- Delete conversations
|
|
21
|
+
- Support for audio-only mode, custom greetings, conversational context
|
|
22
|
+
- Document integration with IDs, tags, and retrieval strategies
|
|
23
|
+
- Memory stores and callback webhooks
|
|
24
|
+
|
|
25
|
+
- **Personas Management**:
|
|
26
|
+
- Create personas with system prompts and pipeline modes
|
|
27
|
+
- Get persona details by ID
|
|
28
|
+
- List personas with pagination and filtering
|
|
29
|
+
- Update personas using JSON Patch operations (RFC 6902)
|
|
30
|
+
- Delete personas
|
|
31
|
+
- Helper methods for building patch operations and updating single fields
|
|
32
|
+
- Full support for perception, STT, LLM, and TTS layer configuration
|
|
33
|
+
- Custom tool/function integration support
|
|
34
|
+
|
|
35
|
+
- **Replicas Management**:
|
|
36
|
+
- Create replicas from training videos
|
|
37
|
+
- Get replica details with optional verbose mode
|
|
38
|
+
- List replicas with pagination and filtering
|
|
39
|
+
- Rename replicas
|
|
40
|
+
- Delete replicas (soft and hard delete)
|
|
41
|
+
- Support for consent videos and custom model selection
|
|
42
|
+
|
|
43
|
+
- **Objectives Management**:
|
|
44
|
+
- Create conversation objectives
|
|
45
|
+
- Get objective details by ID
|
|
46
|
+
- List objectives with pagination
|
|
47
|
+
- Update objectives using JSON Patch operations
|
|
48
|
+
- Delete objectives
|
|
49
|
+
- Helper methods for patch operations
|
|
50
|
+
|
|
51
|
+
- **Guardrails Management**:
|
|
52
|
+
- Create guardrails for behavioral control
|
|
53
|
+
- Get guardrails details by ID
|
|
54
|
+
- List guardrails with pagination
|
|
55
|
+
- Update guardrails using JSON Patch operations
|
|
42
56
|
- Delete guardrails
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
57
|
+
- Callback webhook support
|
|
58
|
+
|
|
59
|
+
- **Knowledge Base (Documents)**:
|
|
60
|
+
- Upload documents from URLs
|
|
61
|
+
- Get document details by ID
|
|
62
|
+
- List documents with pagination, sorting, and filtering
|
|
63
|
+
- Update document metadata (name and tags)
|
|
64
|
+
- Delete documents
|
|
65
|
+
- Support for multiple file formats (.pdf, .txt, .docx, .doc, .png, .jpg, .pptx, .csv, .xlsx)
|
|
66
|
+
- Website snapshot support
|
|
67
|
+
- Tag-based organization and search
|
|
68
|
+
|
|
69
|
+
- **Video Generation**:
|
|
70
|
+
- Generate videos from text scripts
|
|
71
|
+
- Generate videos from audio files
|
|
72
|
+
- Get video details with optional verbose mode
|
|
73
|
+
- List videos with pagination
|
|
74
|
+
- Rename videos
|
|
75
|
+
- Delete videos (soft and hard delete)
|
|
76
|
+
- Advanced options: fast rendering, transparent backgrounds, custom backgrounds, watermarks
|
|
77
|
+
|
|
78
|
+
- **Configuration**:
|
|
79
|
+
- Global configuration via `Tavus.configure`
|
|
80
|
+
- Per-instance configuration
|
|
81
|
+
- Configurable API key, base URL, and timeout
|
|
82
|
+
|
|
83
|
+
- **Error Handling**:
|
|
84
|
+
- Comprehensive error classes for different HTTP status codes
|
|
85
|
+
- `AuthenticationError` (401)
|
|
86
|
+
- `BadRequestError` (400)
|
|
87
|
+
- `NotFoundError` (404)
|
|
88
|
+
- `ValidationError` (422)
|
|
89
|
+
- `RateLimitError` (429)
|
|
90
|
+
- `ServerError` (5xx)
|
|
91
|
+
- `ApiError` (generic API errors)
|
|
92
|
+
- `ConfigurationError` (configuration issues)
|
|
93
|
+
|
|
94
|
+
- **Documentation**:
|
|
95
|
+
- Complete README with usage examples
|
|
96
|
+
- API reference tables
|
|
97
|
+
- Error handling guide
|
|
98
|
+
- Configuration examples
|
|
99
|
+
- Code examples for all endpoints
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -67,6 +67,11 @@ client = Tavus::Client.new(
|
|
|
67
67
|
|
|
68
68
|
## Usage
|
|
69
69
|
|
|
70
|
+
For more comprehensive examples, check the [examples/](examples/) directory:
|
|
71
|
+
- [basic_usage.rb](examples/basic_usage.rb) - Basic operations with personas and conversations
|
|
72
|
+
- [advanced_persona.rb](examples/advanced_persona.rb) - Advanced persona configuration with custom layers
|
|
73
|
+
- [complete_workflow.rb](examples/complete_workflow.rb) - End-to-end workflow including replicas, documents, objectives, guardrails, and videos
|
|
74
|
+
|
|
70
75
|
### Conversations
|
|
71
76
|
|
|
72
77
|
#### Create a Conversation
|
|
@@ -102,8 +107,8 @@ conversation = client.conversations.create(
|
|
|
102
107
|
# "conversation_name" => "Interview User",
|
|
103
108
|
# "status" => "active",
|
|
104
109
|
# "conversation_url" => "https://tavus.daily.co/c123456",
|
|
105
|
-
# "replica_id" => "
|
|
106
|
-
# "persona_id" => "
|
|
110
|
+
# "replica_id" => "rfe12d8b9597",
|
|
111
|
+
# "persona_id" => "pdced222244b",
|
|
107
112
|
# "created_at" => "2025-10-04T12:00:00Z"
|
|
108
113
|
# }
|
|
109
114
|
```
|
|
@@ -706,6 +711,40 @@ end
|
|
|
706
711
|
| `rename(video_id, video_name)` | Rename a video |
|
|
707
712
|
| `delete(video_id, hard: false)` | Delete a video |
|
|
708
713
|
|
|
714
|
+
## JSON Patch Operations
|
|
715
|
+
|
|
716
|
+
Several resources (Personas, Objectives, and Guardrails) support updates via JSON Patch operations following [RFC 6902](https://tools.ietf.org/html/rfc6902). This allows for precise, atomic updates to specific fields.
|
|
717
|
+
|
|
718
|
+
### Supported Operations
|
|
719
|
+
|
|
720
|
+
- `add`: Add a new field or array element
|
|
721
|
+
- `remove`: Remove a field or array element
|
|
722
|
+
- `replace`: Replace an existing field value
|
|
723
|
+
- `copy`: Copy a value from one location to another
|
|
724
|
+
- `move`: Move a value from one location to another
|
|
725
|
+
- `test`: Test that a value at a location equals a specified value
|
|
726
|
+
|
|
727
|
+
### Examples
|
|
728
|
+
|
|
729
|
+
```ruby
|
|
730
|
+
# Replace a single field
|
|
731
|
+
operations = [
|
|
732
|
+
{ op: 'replace', path: '/persona_name', value: 'New Name' }
|
|
733
|
+
]
|
|
734
|
+
|
|
735
|
+
# Multiple operations in one request
|
|
736
|
+
operations = [
|
|
737
|
+
{ op: 'replace', path: '/persona_name', value: 'Updated Name' },
|
|
738
|
+
{ op: 'add', path: '/layers/tts/tts_emotion_control', value: 'true' },
|
|
739
|
+
{ op: 'remove', path: '/layers/stt/hotwords' }
|
|
740
|
+
]
|
|
741
|
+
|
|
742
|
+
# Update nested fields
|
|
743
|
+
operations = [
|
|
744
|
+
{ op: 'replace', path: '/layers/llm/model', value: 'tavus-gpt-4o' }
|
|
745
|
+
]
|
|
746
|
+
```
|
|
747
|
+
|
|
709
748
|
## Development
|
|
710
749
|
|
|
711
750
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
@@ -720,11 +759,9 @@ This project uses GitHub Actions for continuous integration:
|
|
|
720
759
|
- **Linting**: RuboCop style checking
|
|
721
760
|
- **Security**: Bundle audit for dependency vulnerabilities
|
|
722
761
|
|
|
723
|
-
[](https://github.com/upriser/tavus/actions/workflows/ci.yml)
|
|
724
|
-
|
|
725
762
|
## Contributing
|
|
726
763
|
|
|
727
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
764
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/vbrazo/tavus.
|
|
728
765
|
|
|
729
766
|
## License
|
|
730
767
|
|
|
@@ -734,3 +771,8 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
|
734
771
|
|
|
735
772
|
- [Tavus API Documentation](https://docs.tavus.io)
|
|
736
773
|
- [Tavus Developer Portal](https://platform.tavus.io)
|
|
774
|
+
- [GitHub Repository](https://github.com/vbrazo/tavus)
|
|
775
|
+
|
|
776
|
+
## Changelog
|
|
777
|
+
|
|
778
|
+
See [CHANGELOG.md](CHANGELOG.md) for a detailed list of changes and version history.
|
data/lib/tavus/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tavus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vitor Oliveira
|
|
@@ -108,8 +108,9 @@ dependencies:
|
|
|
108
108
|
- - "~>"
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
110
|
version: '1.21'
|
|
111
|
-
description: A Ruby gem for interacting with the Tavus
|
|
112
|
-
|
|
111
|
+
description: A Ruby gem for interacting with the Tavus API. Provides full support
|
|
112
|
+
for Conversational Video Interfaces (CVI), including conversations, personas, replicas,
|
|
113
|
+
objectives, guardrails, knowledge base documents, and video generation.
|
|
113
114
|
email:
|
|
114
115
|
- vbrazo@gmail.com
|
|
115
116
|
executables: []
|