mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: fix: keep citation get_url metadata (#6037)
* fix: keep citation get_url metadata * fix: satisfy citation metadata mypy check
This commit is contained in:
committed by
GitHub
Unverified
parent
1d301af7d2
commit
4c4e1d9b87
@@ -2880,11 +2880,15 @@ class RawOpenAIChatClient( # type: ignore[misc]
|
||||
if ann_url:
|
||||
ann_start = _get_ann_value("start_index")
|
||||
ann_end = _get_ann_value("end_index")
|
||||
annotation_properties: dict[str, Any] = {"annotation_index": event.annotation_index}
|
||||
ann_get_url = _get_ann_value("get_url")
|
||||
if ann_get_url is not None:
|
||||
annotation_properties["get_url"] = ann_get_url
|
||||
annotation_obj = Annotation(
|
||||
type="citation",
|
||||
title=_get_ann_value("title") or "",
|
||||
url=str(ann_url),
|
||||
additional_properties={"annotation_index": event.annotation_index},
|
||||
additional_properties=annotation_properties,
|
||||
raw_representation=annotation,
|
||||
)
|
||||
if ann_start is not None and ann_end is not None:
|
||||
|
||||
Reference in New Issue
Block a user