| # 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`). | |