From 04add6c9e9e200c3eee8262fea7d9ab5af48450b Mon Sep 17 00:00:00 2001 From: Luxferre Date: Tue, 8 Sep 2026 17:35:41 +0300 Subject: [PATCH] docs: apply sentence-case to headings and list items, update public domain notice --- Makefile | 3 +++ README.md | 50 ++++++++++++++++++++++++------------------------ bin/groqqer | Bin 6643977 -> 6643977 bytes groqqer.go | 2 +- groqqer_test.go | 3 +++ 5 files changed, 32 insertions(+), 26 deletions(-) diff --git a/Makefile b/Makefile index b02b5a3..cf69f67 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +# groqqer build script +# Created by Luxferre in 2026, released into the public domain with no warranties + all: groqqer groqqer: diff --git a/README.md b/README.md index 0f00c80..c8db5f9 100644 --- a/README.md +++ b/README.md @@ -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 `` outputs into standard OpenAI `tool_calls` payloads with `finish_reason: "tool_calls"`. -- **Reasoning Content**: Extracts `` and `` 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 `` outputs into standard OpenAI `tool_calls` payloads with `finish_reason: "tool_calls"`. +- **Reasoning content**: extracts `` and `` 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. diff --git a/bin/groqqer b/bin/groqqer index 6a23745b5097eba3156b3e4892223a623a374e35..210e75a4dc89ab29b245346ee803d5b462fd3b93 100755 GIT binary patch delta 487 zcmWm5$u0u{0D$38TWw>heW|S|sztS`cGW4x7_?^8)+*D~(jc+KQ9^o_CZ0mvBn~7F z9>RHUp1{rT@EyPOXU34m%dub$NT*Jh7(2A3Y|7<{<1C~lQ}&yvTfXvWeqTaWR51~h zE{%AF@dLVI delta 487 zcmWm5$u0u{0D$38`!+@G`%<)))-q$MZJ3r}+NxIVOJ|gfI8=$m*+J?eB7FiLz|BD- z;uXBY++93?-{CucnXjxZgV%GxbzM2?qXPfe zj!IOa8V=N;7Immc0~*nUX0)IcZD>aaI?;u0IMIV%^uYx;`Z0h(48a30hB1Osj6sBi zaZF$mQ}AILGnmC3<{@JNi%{T4083bgiWRIvLl7Z^v4#lN5k(9eh+`95*v1Zav4?#e R;1EYhK!<_jH%mx5BY*7)%4z@r diff --git a/groqqer.go b/groqqer.go index 87eee60..4796d6f 100644 --- a/groqqer.go +++ b/groqqer.go @@ -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 diff --git a/groqqer_test.go b/groqqer_test.go index 37bf081..7425801 100644 --- a/groqqer_test.go +++ b/groqqer_test.go @@ -1,3 +1,6 @@ +// groqqer unit tests +// Created by Luxferre in 2026, released into the public domain with no warranties + package main import (