Decart Plugin for Vision Agents
Decart integration for Vision Agents framework, enabling real-time video restyling capabilities.
It enables features such as:
- Real-time video transformation using generative AI models
- Dynamic style changing via prompts
- Seamless integration with Vision Agents video pipeline
Installation
uv add "vision-agents[decart]"
# or directly
uv add vision-agents-plugins-decart
Usage
This example shows how to use the RestylingProcessor to transform a user's video feed in real-time.
from vision_agents.core import User, Agent
from vision_agents.plugins import getstream, gemini, decart
processor = decart.RestylingProcessor(
initial_prompt="Studio Ghibli animation style",
model="lucy_2_rt",
)
agent = Agent(
edge=getstream.Edge(),
agent_user=User(name="Styled AI"),
instructions="Be helpful",
llm=gemini.Realtime(),
processors=[processor],
)
Dynamic Prompt Updates
You can register a function to update the style prompt dynamically based on the conversation:
@llm.register_function(
description="Change the video style prompt"
)
async def change_style(prompt: str) -> str:
await processor.update_prompt(prompt)
return f"Style changed to: {prompt}"
Reference Images ("costumes")
For models like Lucy that accept a reference image, pass it at construction
time and/or swap it atomically with a prompt via update_state:
processor = decart.RestylingProcessor(
model="lucy_2_rt",
initial_prompt="A person wearing a superhero costume",
initial_image="./costumes/superhero.png", # your own reference image
)
# Later — atomically change prompt + reference image
await processor.update_state(
prompt="A person wearing a wizard robe",
image="./costumes/wizard.png",
)
# Image-only update
await processor.update_state(image=b"<raw image bytes>")
initial_image and update_state(image=...) accept bytes, a local file
path, an http(s) URL, a data: URI, or a raw base64 string.
Configuration
The plugin requires a Decart API key. You can provide it in two ways:
- Set the environment variable
DECART_API_KEY - Pass it directly to the constructor:
RestylingProcessor(api_key="...")
Links
Metadata
Release files for vision-agents-plugins-decart 0.6.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vision_agents_plugins_decart-0.6.9.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vision_agents_plugins_decart-0.6.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.9 kB
Release files / vision_agents_plugins_decart-0.6.9.tar.gz
| Download URL | vision_agents_plugins_decart-0.6.9.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38812e9595c3f479c13a147937ebc202e2913ef3765a27c359c159fdd09c9c59
|
|
BLAKE2b-256 checksum How to use checksums |
154541abd295d85bf87d54caf80d4b549bb99d0cc918d744eb00063cd6f248ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / vision_agents_plugins_decart-0.6.9-py3-none-any.whl
| Download URL | vision_agents_plugins_decart-0.6.9-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e121313b9b0075dd2a6a07ac7392e6f6bdb515c49884df03869ca44540f41d51
|
|
BLAKE2b-256 checksum How to use checksums |
5b6472c8ccb3e828f3281152ccb62dcf27b1bad6cb5aadfcb4b983c4599ff844
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|