generate_3d: 3D models with fal.ai (image, text, or image steered by text)
- New tool: image-to-3D (project file or an image attached to the chat, optional back/left/right views) or text-to-3D; image + prompt refines the image with the prompt first (the 3D models take no text with an image). Styles textured / geometry / lowpoly, optional PBR, face count. Runs through fal.ai's queue API with progress, saves GLB + preview, books the cost (published prices, overridable per model). Request bodies for the Hunyuan3D, Tripo and Trellis families; defaults [images] model_3d / model_3d_text. - Chat card: "Open in the 3D view"; media overview: kind "model" (also STL/3MF/OBJ written by agents) with previews. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d7baa77922
commit
48621f21d6
15 files changed
+578
-14
No files matched your search
@@ -177,6 +177,19 @@ pub struct ImagesConfig {
|
||||
/// Optional fal.ai Admin key to query the account balance.
|
||||
#[serde(default, skip_serializing_if = "String::is_empty")]
|
||||
pub admin_key: String,
|
||||
/// fal.ai model for 3D models from images (generate_3d).
|
||||
#[serde(default = "default_model_3d")]
|
||||
pub model_3d: String,
|
||||
/// fal.ai model for 3D models from a text prompt only.
|
||||
#[serde(default = "default_model_3d_text")]
|
||||
pub model_3d_text: String,
|
||||
}
|
||||
|
||||
fn default_model_3d() -> String {
|
||||
"fal-ai/hunyuan3d-v3/image-to-3d".into()
|
||||
}
|
||||
fn default_model_3d_text() -> String {
|
||||
"fal-ai/hunyuan3d-v3/text-to-3d".into()
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
|
||||
@@ -215,6 +228,8 @@ impl Default for ImagesConfig {
|
||||
models: vec![ImageModel { id: "fal-ai/flux/schnell".into(), name: Some("FLUX.1 schnell".into()), price: Some(0.003), ..Default::default() }],
|
||||
monthly_budget: None,
|
||||
admin_key: String::new(),
|
||||
model_3d: default_model_3d(),
|
||||
model_3d_text: default_model_3d_text(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user