Skip to content

Commit cb4d35c

Browse files
committed
Don't force inline citations by default
Inline citations assume the client will know how to process/render markdown-style inline links. We shouldn't assume that's the case.
1 parent 66a7243 commit cb4d35c

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/xAI/GrokChatClient.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,6 @@ GetCompletionsRequest MapToRequest(IEnumerable<ChatMessage> messages, ChatOption
134134
{
135135
var request = options?.RawRepresentationFactory?.Invoke(this) as GetCompletionsRequest ?? new GetCompletionsRequest()
136136
{
137-
// By default always include citations in the final output if available
138-
Include = { IncludeOption.InlineCitations },
139137
Model = options?.ModelId ?? defaultModelId,
140138
};
141139

@@ -220,11 +218,9 @@ codeResult.RawRepresentation is ToolCall codeToolCall &&
220218
request.Messages.Add(gmsg);
221219
}
222220

223-
IList<IncludeOption> includes = [IncludeOption.InlineCitations];
221+
IList<IncludeOption> includes = [];
224222
if (options is GrokChatOptions grokOptions)
225223
{
226-
// NOTE: overrides our default include for inline citations, potentially.
227-
request.Include.Clear();
228224
request.Include.AddRange(grokOptions.Include);
229225

230226
if (grokOptions.Search.HasFlag(GrokSearch.X))

src/xAI/GrokChatOptions.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,5 @@ public class GrokChatOptions : ChatOptions
2727
public GrokSearch Search { get; set; } = GrokSearch.None;
2828

2929
/// <summary>Additional outputs to include in responses.</summary>
30-
/// <remarks>Defaults to including <see cref="IncludeOption.InlineCitations"/>.</remarks>
31-
public IList<IncludeOption> Include { get; set; } = [IncludeOption.InlineCitations];
30+
public IList<IncludeOption> Include { get; set; } = [];
3231
}

0 commit comments

Comments
 (0)