docs: apply sentence-case to headings and list items, update public domain notice
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
# groqqer build script
|
||||
# Created by Luxferre in 2026, released into the public domain with no warranties
|
||||
|
||||
all: groqqer
|
||||
|
||||
groqqer:
|
||||
|
||||
@@ -4,18 +4,18 @@
|
||||
|
||||
It connects directly to Streamlit's binary WebSocket engine (`/_stcore/stream`) using a pure Go Protobuf wire-format encoder/decoder. It requires **no browser**, **no Chromium**, and **no Xvfb**, allowing it to run smoothly on minimal headless servers and low-resource containers.
|
||||
|
||||
## Key Features
|
||||
## Key features
|
||||
|
||||
- **Direct WebSocket Protobuf Protocol**: Communicates directly with Streamlit's internal engine over RFC 6455 WebSockets and Protocol Buffers wire format.
|
||||
- **Completely Headless & Zero Dependencies**: Written entirely in pure Go using only the standard library (`net/http`, `crypto/tls`, `encoding/binary`, `encoding/json`, etc.). No Chromium, Chrome, Xvfb, Puppeteer, or external Go modules required.
|
||||
- **Sub-Second Latency**: Bypasses browser rendering and DOM parsing entirely, delivering responses with minimal overhead.
|
||||
- **OpenAI Compatible API**: Exposes standard `/v1/models` and `/v1/chat/completions` endpoints. Drop-in replacement for OpenAI SDKs, LiteLLM, Open-WebUI, LibreChat, and LangChain.
|
||||
- **System Prompt Support**: Formats developer/system instructions cleanly for the target model.
|
||||
- **Streaming & Non-Streaming**: Supports Server-Sent Events (`stream: true`) with real-time token streaming and synchronous JSON responses.
|
||||
- **Tool / Function Calling**: Fully supports OpenAI `tools`, `tool_choice`, and multi-turn execution (`role: "tool"`). Automatically injects schemas and parses `<tool_call>` outputs into standard OpenAI `tool_calls` payloads with `finish_reason: "tool_calls"`.
|
||||
- **Reasoning Content**: Extracts `<think>` and `</think>` tags from reasoning models (e.g., Qwen 3.6/3.8) and streams or populates `reasoning_content` following OpenAI O-series conventions.
|
||||
- **Dynamic Model Discovery & Switching**: Discovers active models directly from the Streamlit space on startup and allows seamless model switching between requests (`qwen/qwen3.6-27b`, `openai/gpt-oss-120b`, `openai/gpt-oss-20b`, `groq/compound`, etc.).
|
||||
- **SOCKS5 Proxy Support**: Native pure Go SOCKS5 proxy client supporting authentication (`-socks` flag or `ALL_PROXY` / `SOCKS5_PROXY` environment variables).
|
||||
- **Direct WebSocket Protobuf protocol**: communicates directly with Streamlit's internal engine over RFC 6455 WebSockets and Protocol Buffers wire format.
|
||||
- **Completely headless and zero dependencies**: written entirely in pure Go using only the standard library (`net/http`, `crypto/tls`, `encoding/binary`, `encoding/json`, etc.). No Chromium, Chrome, Xvfb, Puppeteer, or external Go modules required.
|
||||
- **Sub-second latency**: bypasses browser rendering and DOM parsing entirely, delivering responses with minimal overhead.
|
||||
- **OpenAI-compatible API**: exposes standard `/v1/models` and `/v1/chat/completions` endpoints. Drop-in replacement for OpenAI SDKs, LiteLLM, Open-WebUI, LibreChat, and LangChain.
|
||||
- **System prompt support**: formats developer/system instructions cleanly for the target model.
|
||||
- **Streaming and non-streaming**: supports Server-Sent Events (`stream: true`) with real-time token streaming and synchronous JSON responses.
|
||||
- **Tool and function calling**: fully supports OpenAI `tools`, `tool_choice`, and multi-turn execution (`role: "tool"`). Automatically injects schemas and parses `<tool_call>` outputs into standard OpenAI `tool_calls` payloads with `finish_reason: "tool_calls"`.
|
||||
- **Reasoning content**: extracts `<think>` and `</think>` tags from reasoning models (e.g., Qwen 3.6/3.8) and streams or populates `reasoning_content` following OpenAI O-series conventions.
|
||||
- **Dynamic model discovery and switching**: discovers active models directly from the Streamlit space on startup and allows seamless model switching between requests (`qwen/qwen3.6-27b`, `openai/gpt-oss-120b`, `openai/gpt-oss-20b`, `groq/compound`, etc.).
|
||||
- **SOCKS5 proxy support**: native pure Go SOCKS5 proxy client supporting authentication (`-socks` flag or `ALL_PROXY` / `SOCKS5_PROXY` environment variables).
|
||||
|
||||
## Architecture
|
||||
|
||||
@@ -40,11 +40,11 @@ It connects directly to Streamlit's binary WebSocket engine (`/_stcore/stream`)
|
||||
|
||||
## Requirements
|
||||
|
||||
- **Linux / macOS / Windows**
|
||||
- **Go 1.20+** (for building from source)
|
||||
- No browser or graphics packages needed.
|
||||
- Linux, macOS, or Windows
|
||||
- Go 1.20+ (for building from source)
|
||||
- No browser or graphics packages needed
|
||||
|
||||
## Installation & Build
|
||||
## Installation and build
|
||||
|
||||
Clone or navigate to the repository, then build the binary:
|
||||
|
||||
@@ -54,7 +54,7 @@ make
|
||||
|
||||
The optimized binary will be created at `bin/groqqer`.
|
||||
|
||||
## Running the Server
|
||||
## Running the server
|
||||
|
||||
Start the gateway with default settings:
|
||||
|
||||
@@ -62,7 +62,7 @@ Start the gateway with default settings:
|
||||
./bin/groqqer -port 8080
|
||||
```
|
||||
|
||||
### CLI Flags
|
||||
### CLI flags
|
||||
|
||||
| Flag | Default | Description |
|
||||
|------|---------|-------------|
|
||||
@@ -74,9 +74,9 @@ Start the gateway with default settings:
|
||||
|
||||
*(Note: legacy flags `-browser`, `-xvfb`, and `-headless` are retained for backward compatibility but are ignored, as groqqer operates completely headless via direct WebSocket).*
|
||||
|
||||
## API Usage Examples
|
||||
## API usage examples
|
||||
|
||||
### 1. List Available Models
|
||||
### 1. List available models
|
||||
|
||||
```bash
|
||||
curl -s http://127.0.0.1:8080/v1/models
|
||||
@@ -100,7 +100,7 @@ curl -s http://127.0.0.1:8080/v1/models
|
||||
|
||||
---
|
||||
|
||||
### 2. Chat Completion (Non-Streaming)
|
||||
### 2. Chat completion (non-streaming)
|
||||
|
||||
```bash
|
||||
curl -s -X POST http://127.0.0.1:8080/v1/chat/completions \
|
||||
@@ -141,7 +141,7 @@ curl -s -X POST http://127.0.0.1:8080/v1/chat/completions \
|
||||
|
||||
---
|
||||
|
||||
### 3. Streaming Chat Completion (SSE)
|
||||
### 3. Streaming chat completion (SSE)
|
||||
|
||||
```bash
|
||||
curl -N -s -X POST http://127.0.0.1:8080/v1/chat/completions \
|
||||
@@ -176,7 +176,7 @@ data: [DONE]
|
||||
|
||||
---
|
||||
|
||||
### 4. Tool / Function Calling
|
||||
### 4. Tool and function calling
|
||||
|
||||
```bash
|
||||
curl -s -X POST http://127.0.0.1:8080/v1/chat/completions \
|
||||
@@ -239,7 +239,7 @@ curl -s -X POST http://127.0.0.1:8080/v1/chat/completions \
|
||||
|
||||
---
|
||||
|
||||
### 5. Multi-Turn Tool Response Execution
|
||||
### 5. Multi-turn tool response execution
|
||||
|
||||
Send back the tool execution results using `role: "tool"`:
|
||||
|
||||
@@ -295,7 +295,7 @@ curl -s -X POST http://127.0.0.1:8080/v1/chat/completions \
|
||||
|
||||
---
|
||||
|
||||
### 6. Python OpenAI SDK Example
|
||||
### 6. Python OpenAI SDK example
|
||||
|
||||
```python
|
||||
from openai import OpenAI
|
||||
@@ -318,4 +318,4 @@ print(response.choices[0].message.content)
|
||||
|
||||
## License
|
||||
|
||||
MIT License
|
||||
Created by Luxferre in 2026, released into the public domain with no warranties.
|
||||
|
||||
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
// groqqer: Pure Go OpenAI-compatible LLM gateway for the Groq Streamlit space
|
||||
// Reverse engineers https://dromerosm-groq-chatbot.hf.space via direct WebSocket Protobuf wire format
|
||||
// Created by Luxferre in 2026, released into the public domain
|
||||
// Created by Luxferre in 2026, released into the public domain with no warranties
|
||||
|
||||
package main
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// groqqer unit tests
|
||||
// Created by Luxferre in 2026, released into the public domain with no warranties
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
||||
Reference in New Issue
Block a user