mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 17:38:10 +00:00
propagate media input token to inference result
This commit is contained in:
1 parent
75523811e4
commit
15d66a4530
2 files changed
+18
-2
No files matched your search
+16
@@ -24,9 +24,13 @@ pub struct AvailableInferenceJob {
|
||||
|
||||
// Inference class
|
||||
pub inference_category: InferenceCategory,
|
||||
|
||||
pub maybe_model_type: Option<String>, // TODO: Strongly type.
|
||||
pub maybe_model_token: Option<String>,
|
||||
|
||||
pub maybe_input_source_token: Option<String>,
|
||||
pub maybe_input_source_token_type: Option<String>,
|
||||
|
||||
// Inference details
|
||||
pub maybe_inference_args: Option<GenericInferenceArgs>,
|
||||
pub maybe_raw_inference_text: Option<String>,
|
||||
@@ -102,6 +106,8 @@ pub async fn list_available_generic_inference_jobs(
|
||||
.map_err(|e| anyhow!("error: {:?}", e))?, // TODO/FIXME: This is a gross fix.
|
||||
maybe_model_type: record.maybe_model_type,
|
||||
maybe_model_token: record.maybe_model_token,
|
||||
maybe_input_source_token: record.maybe_input_source_token,
|
||||
maybe_input_source_token_type: record.maybe_input_source_token_type,
|
||||
maybe_inference_args: record.maybe_inference_args
|
||||
.as_deref()
|
||||
.map(|args| GenericInferenceArgs::from_json(args))
|
||||
@@ -150,6 +156,9 @@ SELECT
|
||||
maybe_model_type,
|
||||
maybe_model_token,
|
||||
|
||||
maybe_input_source_token,
|
||||
maybe_input_source_token_type,
|
||||
|
||||
maybe_inference_args,
|
||||
maybe_raw_inference_text,
|
||||
|
||||
@@ -229,6 +238,9 @@ SELECT
|
||||
maybe_model_type,
|
||||
maybe_model_token,
|
||||
|
||||
maybe_input_source_token,
|
||||
maybe_input_source_token_type,
|
||||
|
||||
maybe_inference_args,
|
||||
maybe_raw_inference_text,
|
||||
|
||||
@@ -301,9 +313,13 @@ struct AvailableInferenceJobRawInternal {
|
||||
// Inference information
|
||||
//pub inference_category: InferenceCategory,
|
||||
pub inference_category: String,
|
||||
|
||||
pub maybe_model_type: Option<String>,
|
||||
pub maybe_model_token: Option<String>,
|
||||
|
||||
pub maybe_input_source_token: Option<String>,
|
||||
pub maybe_input_source_token_type: Option<String>,
|
||||
|
||||
pub maybe_inference_args: Option<String>,
|
||||
pub maybe_raw_inference_text: Option<String>,
|
||||
|
||||
|
||||
+2
-2
@@ -125,8 +125,8 @@ SET
|
||||
|
||||
args.job.maybe_model_token,
|
||||
|
||||
"", // TODO
|
||||
VoiceConversionMediaTokenType::MediaUpload.to_str(),
|
||||
args.job.maybe_input_source_token,
|
||||
VoiceConversionMediaTokenType::MediaUpload.to_str(), //args.job.maybe_input_source_token_type,
|
||||
|
||||
args.job.maybe_creator_user_token,
|
||||
maybe_creator_synthetic_id,
|
||||
|
||||
Reference in new issue
Block a user