Skip to content

Conversation

@kzu
Copy link
Member

@kzu kzu commented Jun 30, 2025

  • Live search support: On/Off/Auto setting
  • Reasoning effort: for grok-3-mini

Example:

var messages = new Chat()
{
    { "system", "You are a highly intelligent AI assistant." },
    { "user", "What is 101*3?" },
};

var grok = new GrokClient(Env.Get("XAI_API_KEY")!);

var options = new GrokChatOptions
{
    ModelId = "grok-3-mini", // or "grok-3-mini-fast"
    Temperature = 0.7f,
    ReasoningEffort = ReasoningEffort.High, // or Low
    Search = GrokSearch.Auto, // or GrokSearch.On or GrokSearch.Off
};

var response = await grok.GetResponseAsync(messages, options);

AnsiConsole.MarkupLine($":robot: {response.Text}");

* Live search support: On/Off/Auto setting
* Reasoning effort: for grok-3-mini

Example:

```csharp
var messages = new Chat()
{
    { "system", "You are a highly intelligent AI assistant." },
    { "user", "What is 101*3?" },
};

var grok = new GrokClient(Env.Get("XAI_API_KEY")!);

var options = new GrokChatOptions
{
    ModelId = "grok-3-mini", // or "grok-3-mini-fast"
    Temperature = 0.7f,
    ReasoningEffort = ReasoningEffort.High, // or Low
    Search = GrokSearch.Auto, // or GrokSearch.On or GrokSearch.Off
};

var response = await grok.GetResponseAsync(messages, options);

AnsiConsole.MarkupLine($":robot: {response.Text}");
```
@kzu kzu added the enhancement New feature or request label Jun 30, 2025
@kzu kzu enabled auto-merge (rebase) June 30, 2025 22:04
@kzu
Copy link
Member Author

kzu commented Jun 30, 2025

4 skipped 4 skipped

🧪 Details on Ubuntu 24.04.2 LTS

from dotnet-retest v0.7.1 on .NET 8.0.17 with 💜 by @devlooped

@kzu kzu merged commit 7e6b1c8 into main Jun 30, 2025
7 checks passed
@kzu kzu deleted the dev/grok branch June 30, 2025 22:05
@devlooped devlooped locked and limited conversation to collaborators Jul 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants