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.2.6.tar.gz (5.6 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.2.6-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for vision_agents_plugins_decart-0.2.6.tar.gz
Algorithm Hash digest
SHA256 a5398961377d3bf1b9693d36a75c2d5c23a22e635bbf6ce6b95f628ac1621d56
MD5 c13cba463a113fd91db811e086d22273
BLAKE2b-256 7fb7fcc28b1f1b269e6ae6f782d5e30fe25bbd069c0728013f786275c9254107

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vision_agents_plugins_decart-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c05c8054585e8e6a06b355ea46f5506a1d7a8b14d1d1d531049ad4d674887f75
MD5 7ac4c47b4aafe5d6e8a641873ac5e2dd
BLAKE2b-256 f41f5f89b87cbaa78af80a6d259cb88ff8f13050838a03258e2bf0356b4d2f0f

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