mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-23 23:46:35 +00:00
fix(assistant): citedSources stays inside the Responses client
This commit is contained in:
@@ -110,7 +110,7 @@ function toolsOf(request: AiChatRequest, kind: AiConnectionKind): Record<string,
|
||||
}
|
||||
|
||||
/** The pages an output message cites, as its text's URL annotations name them. */
|
||||
export function citedSources(item: Record<string, unknown>): AiSource[] {
|
||||
function citedSources(item: Record<string, unknown>): AiSource[] {
|
||||
if (item.type !== 'message' || !Array.isArray(item.content)) return [];
|
||||
return item.content.flatMap((part: unknown) => {
|
||||
const annotations = asRecord(part).annotations;
|
||||
|
||||
Reference in New Issue
Block a user