File size: 1,254 Bytes
f438287
6f06445
 
 
f438287
6f06445
 
 
f438287
 
6f06445
 
 
 
f438287
 
 
 
 
 
 
 
6f06445
 
f438287
6f06445
f438287
 
6f06445
f438287
6f06445
f438287
 
 
 
 
 
 
6f06445
f438287
6f06445
f438287
 
 
6f06445
f438287
6f06445
f438287
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# ai-go Gateway

## Overview

A Go-based API gateway that proxies requests to NVIDIA's language model API, exposing an OpenAI-compatible interface.

## Stack

- **Language**: Go 1.21+
- **Port**: 8080 (configurable via `PORT` env variable)

## Structure

```text
/
β”œβ”€β”€ main.go          # HTTP server, request handling, streaming proxy logic
β”œβ”€β”€ prompts.go       # Prompt utilities
β”œβ”€β”€ provider.ts      # TypeScript provider file
β”œβ”€β”€ system_prompts/  # System prompt files for various models
β”œβ”€β”€ go.mod           # Go module definition
β”œβ”€β”€ Dockerfile       # Container configuration
└── README.md        # Documentation
```

## Available Endpoints

- `GET  /v1/models` β€” List available model aliases
- `POST /v1/chat/completions` β€” Chat completions (OpenAI-compatible, supports streaming)

## Model Aliases

| Alias | Model |
|---|---|
| Bielik-11b | speakleash/bielik-11b-v2.6-instruct |
| GLM-4.7 | z-ai/glm4.7 |
| Mistral-Small-4 | mistralai/mistral-small-4-119b-2603 |
| DeepSeek-V3.1 | deepseek-ai/deepseek-v3.1 |
| Kimi-K2 | moonshotai/kimi-k2-instruct |

## Running

```bash
go run .
```

## Authentication

Gateway requires the `Authorization: Bearer connect` header (configured via `GatewayAPIKey`).