Skip to main content

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:

  1. Set the environment variable DECART_API_KEY
  2. Pass it directly to the constructor: RestylingProcessor(api_key="...")

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vision_agents_plugins_decart-0.3.2.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vision_agents_plugins_decart-0.3.2-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file vision_agents_plugins_decart-0.3.2.tar.gz.

File metadata

  • Download URL: vision_agents_plugins_decart-0.3.2.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for vision_agents_plugins_decart-0.3.2.tar.gz
Algorithm Hash digest
SHA256 6a21fe8a18dc9414a55ec0c6f8dbcbfd33a407f689eae39bb172c580fabab73b
MD5 9815fcc0ea0c3abaa205f757cc90bbc2
BLAKE2b-256 d0ec1c3e3b1bc722004b2f1a9122deb829bd274f818a1aa478ba69b3fb1da3b1

See more details on using hashes here.

File details

Details for the file vision_agents_plugins_decart-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: vision_agents_plugins_decart-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","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}

File hashes

Hashes for vision_agents_plugins_decart-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fbabbcbededfca90c9a06d8b5aebffb0d60dce092834dbd28ab7a74e4c9681f4
MD5 2d54485fe04570f9aea4c11e9864d1a9
BLAKE2b-256 f73a1d87a1b46e6fd5b11361987bef1bd52a634ba23ab7a6382ccc2c8aeb4cb1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page