From 192268ca1fcb0d0ce52dce0a8ad41edc8a27b66f Mon Sep 17 00:00:00 2001 From: devlooped-bot Date: Tue, 2 Dec 2025 00:32:45 +0000 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Bump=20files=20with=20dotn?= =?UTF-8?q?et-file=20sync=20=EF=BB=BF#=20xai-org/xai-proto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add `end_index` for `InlineCitation` (#20) https://github.com/xai-org/xai-proto/commit/f2ee2fa --- .netconfig | 4 ++-- readme.md | 1 + src/GrokClient/chat.proto | 17 +++++++++++++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.netconfig b/.netconfig index f79eff5..78ad1af 100644 --- a/.netconfig +++ b/.netconfig @@ -127,8 +127,8 @@ weak [file "src/GrokClient/chat.proto"] url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/chat.proto - sha = 230d00180161329075094e72593db408dd12f3bf - etag = 2b6a23b70c4df35423d139b9aa26f50d9ba8f7f334ffb9cb74dc28bdb5078dfe + sha = f2ee2fa88814da30260c0821362dd9cb60555980 + etag = 86aeb20ee0a3bad2b9755541ddbfd11e082e7a9e0f8682b8cb3146a01adc74f9 weak [file "src/GrokClient/deferred.proto"] url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/deferred.proto diff --git a/readme.md b/readme.md index e12e0fe..8b1f4fd 100644 --- a/readme.md +++ b/readme.md @@ -89,6 +89,7 @@ See for example the [introduction of tool output and citations](https://github.c [![torutek](https://avatars.githubusercontent.com/u/33917059?v=4&s=39 "torutek")](https://github.com/torutek) [![mccaffers](https://avatars.githubusercontent.com/u/16667079?u=739e110e62a75870c981640447efa5eb2cb3bc8f&v=4&s=39 "mccaffers")](https://github.com/mccaffers) [![Christoph Hochstätter](https://avatars.githubusercontent.com/u/17645550?u=01bbdcb84d03cac26260f1c951e046d24a324591&v=4&s=39 "Christoph Hochstätter")](https://github.com/christoh) +[![ADS Fund](https://avatars.githubusercontent.com/u/202042116?v=4&s=39 "ADS Fund")](https://github.com/ADS-Fund) diff --git a/src/GrokClient/chat.proto b/src/GrokClient/chat.proto index 044d4d1..4a70dd1 100644 --- a/src/GrokClient/chat.proto +++ b/src/GrokClient/chat.proto @@ -327,12 +327,25 @@ message Delta { } message InlineCitation { - // The globally unique id of the citation per response. + // The display number for this citation (e.g., "1", "2", "3"). + // This ID is reused when the same source is cited multiple times in a + // response, ensuring consistent numbering (e.g., the same URL always shows as + // [1]). string id = 1; - // The index where the inline citation should be inserted in the complete text response. + // The character position in the response text where the citation markdown + // link begins. This is the index of the first '[' character in the citation + // format [[id]](url). Uses inclusive indexing (the character at this index is + // part of the citation). int32 start_index = 2; + // The character position in the response text immediately after the citation + // markdown link ends. This is the index after the final ']' character in the + // citation format [[id]](url). Uses exclusive indexing (the character at this + // index is NOT part of the citation). Together with start_index, + // text[start_index:end_index] extracts the full citation link. + int32 end_index = 6; + // The citation type. oneof citation { // The citation returned from the web search tool.