Skip to content

Commit 090d5b9

Browse files
devlooped-botkzu
authored andcommitted
⬆️ Bump files with dotnet-file sync
# xai-org/xai-proto - Support including tool output and inline citations (#18) xai-org/xai-proto@230d001
1 parent 7f09816 commit 090d5b9

File tree

2 files changed

+88
-2
lines changed

2 files changed

+88
-2
lines changed

.netconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@
127127
weak
128128
[file "src/GrokClient/chat.proto"]
129129
url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/chat.proto
130-
sha = ffa02e54327b9d5f89c9dc6f7872417f2bd6fd27
131-
etag = ba767d0fb8de524f521b567433d70128a0335449c499ea30f1e72d61581887a7
130+
sha = 230d00180161329075094e72593db408dd12f3bf
131+
etag = 2b6a23b70c4df35423d139b9aa26f50d9ba8f7f334ffb9cb74dc28bdb5078dfe
132132
weak
133133
[file "src/GrokClient/deferred.proto"]
134134
url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/deferred.proto

src/GrokClient/chat.proto

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ message GetCompletionsRequest {
162162
// With parallel tool calls, multiple tool calls can occur within a single turn,
163163
// so max_turns does not necessarily equal the total number of tool calls.
164164
optional int32 max_turns = 25;
165+
166+
// Allow the users to control what optional fields to be returned in the response.
167+
repeated IncludeOption include = 26;
165168
}
166169

167170
message GetChatCompletionResponse {
@@ -280,6 +283,9 @@ message CompletionMessage {
280283

281284
// The encrypted content.
282285
string encrypted_content = 5;
286+
287+
// The citations that the model used to answer the question.
288+
repeated InlineCitation citations = 6;
283289
}
284290

285291
// Holds the differences (deltas) that when concatenated make up the entire
@@ -315,6 +321,57 @@ message Delta {
315321

316322
// The encrypted content.
317323
string encrypted_content = 5;
324+
325+
// The citations that the model used to answer the question.
326+
repeated InlineCitation citations = 6;
327+
}
328+
329+
message InlineCitation {
330+
// The globally unique id of the citation per response.
331+
string id = 1;
332+
333+
// The index where the inline citation should be inserted in the complete text response.
334+
int32 start_index = 2;
335+
336+
// The citation type.
337+
oneof citation {
338+
// The citation returned from the web search tool.
339+
WebCitation web_citation = 3;
340+
341+
// The citation returned from the X search tool.
342+
XCitation x_citation = 4;
343+
344+
// The citation returned from the collections search tool.
345+
CollectionsCitation collections_citation = 5;
346+
}
347+
}
348+
349+
message WebCitation {
350+
// The url of the web page that the citation is from.
351+
string url = 1;
352+
}
353+
354+
message XCitation {
355+
// The url of the X post or profile that the citation is from.
356+
// The url is always a x.com url.
357+
string url = 1;
358+
}
359+
360+
message CollectionsCitation {
361+
// The id of the file that the citation is from.
362+
string file_id = 1;
363+
364+
// The id of the chunk that the citation is from.
365+
string chunk_id = 2;
366+
367+
// The content of the chunk that the citation is from.
368+
string chunk_content = 3;
369+
370+
// The relevance score of the citation.
371+
float score = 4;
372+
373+
// The ids of the collections that the citation is from.
374+
repeated string collection_ids = 5;
318375
}
319376

320377
// Holding the log probabilities of the sampling.
@@ -377,6 +434,32 @@ message FileContent {
377434
string file_id = 1;
378435
}
379436

437+
enum IncludeOption {
438+
// Default value / invalid option.
439+
INCLUDE_OPTION_INVALID = 0;
440+
441+
// Include the encrypted output from the web search tool in the response.
442+
INCLUDE_OPTION_WEB_SEARCH_CALL_OUTPUT = 1;
443+
444+
// Include the encrypted output from the X search tool in the response.
445+
INCLUDE_OPTION_X_SEARCH_CALL_OUTPUT = 2;
446+
447+
// Include the plaintext output from the code execution tool in the response.
448+
INCLUDE_OPTION_CODE_EXECUTION_CALL_OUTPUT = 3;
449+
450+
// Include the plaintext output from the collections search tool in the response.
451+
INCLUDE_OPTION_COLLECTIONS_SEARCH_CALL_OUTPUT = 4;
452+
453+
// Include the plaintext output from the document search tool in the response.
454+
INCLUDE_OPTION_DOCUMENT_SEARCH_CALL_OUTPUT = 5;
455+
456+
// Include the plaintext output from the MCP tool in the response.
457+
INCLUDE_OPTION_MCP_CALL_OUTPUT = 6;
458+
459+
// Include the inline citations in the final response.
460+
INCLUDE_OPTION_INLINE_CITATIONS = 7;
461+
}
462+
380463
// A message in a conversation. This message is part of the model input. Each
381464
// message originates from a "role", which indicates the entity type who sent
382465
// the message. Messages can contain multiple content elements such as text and
@@ -879,6 +962,9 @@ message RequestSettings {
879962

880963
// Whether to use encrypted thinking for thinking trace rehydration.
881964
bool use_encrypted_content = 13;
965+
966+
// Allow the users to control what optional fields to be returned in the response.
967+
repeated IncludeOption include = 14;
882968
}
883969

884970
// Request to retrieve a stored completion response.

0 commit comments

Comments
 (0)