miniapi / replit.md
eranet111
Add function calling support and remove outdated processes
f438287
# 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`).