Skip to content

Commit

Permalink
Re-add logic to anonymize files but pass the root object rather than …
Browse files Browse the repository at this point in the history
…iterating over each file
  • Loading branch information
mabashian committed Jan 22, 2025
1 parent d7d2df8 commit 2e1e20b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ansible_ai_connect/ai/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,11 +924,14 @@ def post(self, request) -> Response:
anonymized_outline = anonymizer.anonymize_struct(
outline, value_template=Template("{{ _${variable_name}_ }}")
)
anonymized_files = anonymizer.anonymize_struct(
files, value_template=Template("{{ _${variable_name}_ }}")
)

answer = {
"role": anonymized_role,
"outline": anonymized_outline,
"files": files,
"files": anonymized_files,
"format": "plaintext",
"generationId": self.validated_data["generationId"],
}
Expand Down

0 comments on commit 2e1e20b

Please sign in to comment.