forked from diffusionstudio/agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
27 lines (24 loc) · 686 Bytes
/
Copy pathmain.py
File metadata and controls
27 lines (24 loc) · 686 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from smolagents import CodeAgent, LiteLLMModel
from src.settings import settings
from src.prompts import get_system_prompt
from src.client import DiffusionClient
from src.tools import (
DocsSearchTool,
VideoEditorTool,
VisualFeedbackTool,
)
client = DiffusionClient()
agent = CodeAgent(
tools=[
DocsSearchTool(),
VideoEditorTool(client=client),
VisualFeedbackTool(client=client),
],
model=LiteLLMModel(
"anthropic/claude-3-5-sonnet-latest",
temperature=0.0,
api_key=settings.anthropic_api_key,
),
system_prompt=get_system_prompt(),
)
agent.run("Trim assets/big_buck_bunny_1080p_30fps.mp4 to 5 seconds")