Skip to content

Commit

Permalink
Fix Citation Format for Prompt Flow Endpoint Responses (#1092)
Browse files Browse the repository at this point in the history
Co-authored-by: Anushree Kaipa Ramanath <[email protected]>
  • Loading branch information
anushree1808 and Anushree Kaipa Ramanath authored Sep 11, 2024
1 parent ba64e7c commit a11773a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,12 @@ def format_pf_non_streaming_response(
"content": chatCompletion[response_field_name]
})
if citations_field_name in chatCompletion:
citation_content= {"citations": chatCompletion[citations_field_name]}
messages.append({
"role": "tool",
"content": chatCompletion[citations_field_name]
"content": json.dumps(citation_content)
})

response_obj = {
"id": chatCompletion["id"],
"model": "",
Expand Down

0 comments on commit a11773a

Please sign in to comment.