34 lines
880 B
Rust
34 lines
880 B
Rust
//! Daisy 角色演示 - 使用图片创建 VEO3 场景
|
|
|
|
use veo3_scene_writer::Veo3SceneWriter;
|
|
use std::path::Path;
|
|
|
|
#[tokio::main]
|
|
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
|
|
// 创建 VEO3 场景写作工具
|
|
let mut writer = Veo3SceneWriter::new().await?;
|
|
|
|
// 检查图片文件是否存在
|
|
let image_path = "examples/01.png";
|
|
if !Path::new(image_path).exists() {
|
|
println!("❌ 错误: 找不到图片文件 {}", image_path);
|
|
return Ok(());
|
|
}
|
|
|
|
let character_analysis = writer.send_message_with_attachment(
|
|
"Daisy",
|
|
image_path
|
|
).await?;
|
|
|
|
println!("🤖 --------------------------------------- :\n{}\n", character_analysis);
|
|
|
|
let scene1 = writer.send_message(
|
|
"first"
|
|
).await?;
|
|
|
|
println!("🤖 --------------------------------------:\n{}\n", scene1);
|
|
|
|
Ok(())
|
|
}
|