GrokClient 1.1.0
Superseded by xAI and xAI.Protocol packages.
dotnet add package GrokClient --version 1.1.0
NuGet\Install-Package GrokClient -Version 1.1.0
<PackageReference Include="GrokClient" Version="1.1.0" />
<PackageVersion Include="GrokClient" Version="1.1.0" />
<PackageReference Include="GrokClient" />
paket add GrokClient --version 1.1.0
#r "nuget: GrokClient, 1.1.0"
#:package GrokClient@1.1.0
#addin nuget:?package=GrokClient&version=1.1.0
#tool nuget:?package=GrokClient&version=1.1.0
Grok client based on the official gRPC API reference from xAI
Open Source Maintenance Fee
To ensure the long-term sustainability of this project, users of this package who generate revenue must pay an Open Source Maintenance Fee. While the source code is freely available under the terms of the License, this package and other aspects of the project require adherence to the Maintenance Fee.
To pay the Maintenance Fee, become a Sponsor at the proper OSMF tier. A single fee covers all of Devlooped packages.
Usage
This project provides a .NET client for the gRPC API of xAI with full support for all services documented in the official API reference and corresponding proto files.
var builder = Host.CreateApplicationBuilder(args); // or WebApplication.CreateBuilder(args);
builder.Services.AddGrokClient(Environment.GetEnvironmentVariable("XAI_API_KEY")!);
var app = builder.Build();
This package leverages the gRPC client factory integration for seamless dependency injection:
class MyService(Chat.ChatClient chat, Documents.DocumentsClient docs, Embedder.EmbedderClient embed)
{
// use clients
}
Auto-updating
This project contains an automated mechanism to always fetch the latest version of the official .proto files from XAI, ensuring it remains up-to-date with any changes or additions made to the API as soon as they are published.
See for example the introduction of tool output and citations.
Sponsors
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Google.Protobuf (>= 3.33.1)
- Grpc.Net.Client (>= 2.71.0)
- Grpc.Net.ClientFactory (>= 2.71.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|