Skip to content

Commit 85f7e44

Browse files
committed
Add readme and icons
1 parent 090d5b9 commit 85f7e44

File tree

4 files changed

+53
-0
lines changed

4 files changed

+53
-0
lines changed

assets/icon.png

1.3 KB
Loading

assets/icon.svg

Lines changed: 9 additions & 0 deletions
Loading

readme.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
![Icon](assets/icon.png) Grok Client (gRPC)
2+
============
3+
4+
[![EULA](https://img.shields.io/badge/EULA-OSMF-blue?labelColor=black&color=C9FF30)](osmfeula.txt)
5+
[![OSS](https://img.shields.io/github/license/devlooped/oss.svg?color=blue)](license.txt)
6+
[![Version](https://img.shields.io/nuget/vpre/Devlooped.GrokClient.svg?color=royalblue)](https://www.nuget.org/packages/Devlooped.GrokClient)
7+
[![Downloads](https://img.shields.io/nuget/dt/Devlooped.GrokClient.svg?color=green)](https://www.nuget.org/packages/Devlooped.GrokClient)
8+
9+
A full XAI/Grok client based on the official full gRPC API.
10+
11+
<!-- include https://github.com/devlooped/.github/raw/main/osmf.md -->
12+
13+
<!-- #content -->
14+
## Usage
15+
16+
```csharp
17+
var builder = Host.CreateApplicationBuilder(args); // or WebApplication.CreateBuilder(args);
18+
19+
builder.Services.AddGrokClient(Environment.GetEnvironmentVariable("XAI_API_KEY")!);
20+
21+
var app = builder.Build();
22+
```
23+
24+
This package leverages the [gRPC client factory](https://learn.microsoft.com/en-us/aspnet/core/grpc/clientfactory)
25+
integration for seamless dependency injection:
26+
27+
```csharp
28+
class MyService(Chat.ChatClient chat, Documents.DocumentsClient docs, Embedder.EmbedderClient embed)
29+
{
30+
// use clients
31+
}
32+
```
33+
34+
## Auto-updating
35+
36+
This project contains an automated mechanism to always fetch the latest version
37+
of the official .proto files from XAI, ensuring it remains up-to-date with any changes
38+
or additions made to the API as soon as they are published.
39+
40+
See for example the [introduction of tool output and citations](https://github.com/devlooped/GrokClient/pull/3).
41+
42+
<!-- #content -->
43+
44+
<!-- include https://github.com/devlooped/sponsors/raw/main/footer.md -->

src/icon.png

5.45 KB
Loading

0 commit comments

Comments
 (0)