Decart plugin for Vision Agents
Project description
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]
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, openai, decart
# Initialize the restyling processor
processor = decart.RestylingProcessor(
initial_prompt="A cute animated movie with vibrant colours",
model="mirage_v2"
)
agent = Agent(
edge=getstream.Edge(),
agent_user=User(name="Styled AI"),
instructions="You are a helpful assistant.",
llm=openai.LLM("gpt-4o-mini"),
# Add the processor to the agent's pipeline
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}"
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vision_agents_plugins_decart-0.2.4.tar.gz.
File metadata
- Download URL: vision_agents_plugins_decart-0.2.4.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9ab505cf5c1ba348fd80ade7a274b40a43be169892e711c844d75f3cc9d8177
|
|
| MD5 |
627372838332c6acca327726e83aadfc
|
|
| BLAKE2b-256 |
7079a8354cfe479508ddbe6ad9ff06dc8ba5e6273eb0c41e923a72ada8ff8c4b
|
File details
Details for the file vision_agents_plugins_decart-0.2.4-py3-none-any.whl.
File metadata
- Download URL: vision_agents_plugins_decart-0.2.4-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc880a9439eac930766454f8fc51e9c8703d9ebd248096a8c375093cd6a57b8a
|
|
| MD5 |
0a1bbab7337e1c7dfa17d594a6d8f6df
|
|
| BLAKE2b-256 |
5b8aa8a9ac610faf95aa19d2282b6ae8653bde105b605752105f588a7696cd36
|