Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ async def submit_request_onedp(
payload = generate_payload(normalized_user_text, metric, annotation_task=annotation_task)
headers = get_common_headers(token, evaluator_name)
if scan_session_id:
headers["client_request_id"] = scan_session_id
headers["x-ms-client-request-id"] = scan_session_id
response = client.evaluations.submit_annotation(payload, headers=headers)
result = json.loads(response)
operation_id = result["location"].split("/")[-1]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async def get_attack_objectives(
risk_category=risk_category,
lang="en",
strategy=strategy,
headers={"client_request_id": scan_session_id},
headers={"x-ms-client-request-id": scan_session_id},
)
return response

Expand All @@ -146,7 +146,7 @@ async def get_jailbreak_prefixes(self, scan_session_id: Optional[str] = None) ->
try:
# Send the request using the autogenerated client
response = self._client.get_jail_break_dataset_with_type(
type="upia", headers={"client_request_id": scan_session_id}
type="upia", headers={"x-ms-client-request-id": scan_session_id}
)
if isinstance(response, list):
return response
Expand Down