Enrich external API failure audit metadata
This commit is contained in:
@@ -95,8 +95,12 @@ pub async fn generate_character_visual(
|
||||
|
||||
let result = async {
|
||||
let settings = require_openai_image_settings(&state)?
|
||||
.with_external_api_audit_context(Some(owner_user_id.clone()), Some(character_id.clone()))
|
||||
.with_external_api_audit_request_id(Some(request_context.request_id().to_string()));
|
||||
.with_external_api_audit_context(
|
||||
&request_context,
|
||||
Some(owner_user_id.clone()),
|
||||
Some(character_id.clone()),
|
||||
)
|
||||
;
|
||||
let http_client = build_openai_image_http_client(&settings)?;
|
||||
|
||||
state
|
||||
@@ -320,7 +324,7 @@ pub(crate) async fn generate_character_primary_visual_for_profile(
|
||||
&model,
|
||||
&prompt,
|
||||
)?;
|
||||
let settings = require_openai_image_settings(state)?.with_external_api_audit_context(
|
||||
let settings = require_openai_image_settings(state)?.with_external_api_audit_actor(
|
||||
Some(owner_user_id.to_string()),
|
||||
Some(character_id.clone()),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user