You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a citation parameter to your agent function using the `Annotated` type hint
63
+
with `CitationExtensionSpec()`.
64
+
</Step>
65
+
66
+
<Steptitle="Yield citation message">
67
+
Call `yield citation.message()` with `text` and `citations`.
68
+
</Step>
69
+
</Steps>
50
70
51
71
## Multiple Citations
52
72
73
+
Yield multiple citations in a single response:
74
+
53
75
```python
54
76
response_text ="Python leads AI development while JavaScript dominates web development."
55
77
@@ -71,4 +93,6 @@ citations = [
71
93
]
72
94
```
73
95
74
-
Citations appear as highlighted text with hover tooltips and clickable source links in the UI.
96
+
## Example: Advanced Usage
97
+
98
+
For a more advanced example, see [citation_agent.py](https://github.com/i-am-bee/agentstack/blob/main/apps/agentstack-sdk-py/examples/citation_agent.py).
Add a citation parameter to your agent function using the `Annotated` type hint
63
+
with `CitationExtensionSpec()`.
64
+
</Step>
65
+
66
+
<Steptitle="Yield citation message">
67
+
Call `yield citation.message()` with `text` and `citations`.
68
+
</Step>
69
+
</Steps>
50
70
51
71
## Multiple Citations
52
72
73
+
Yield multiple citations in a single response:
74
+
53
75
```python
54
76
response_text ="Python leads AI development while JavaScript dominates web development."
55
77
@@ -71,4 +93,6 @@ citations = [
71
93
]
72
94
```
73
95
74
-
Citations appear as highlighted text with hover tooltips and clickable source links in the UI.
96
+
## Example: Advanced Usage
97
+
98
+
For a more advanced example, see [citation_agent.py](https://github.com/i-am-bee/agentstack/blob/main/apps/agentstack-sdk-py/examples/citation_agent.py).
0 commit comments