Your first chat
Once the stack is up, drive a chat through the API to verify everything's wired correctly. Two paths: OpenAI Python SDK or raw HTTP.
Via the OpenAI SDK
Bigwave is OpenAI-compatible. Point the SDK at your local URL:
import os
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:8000/v1",
api_key=os.environ["BIGWAVE_ADMIN_TOKEN"],
)
# Non-streaming
resp = client.chat.completions.create(
model="llama3.2:3b",
messages=[
{"role": "system", "content": "You are a precise assistant."},
{"role": "user", "content": "What is the capital of Australia?"},
],
)
print(resp.choices[0].message.content)
print("completion_id:", resp.id)Streaming works the same way:
stream = client.chat.completions.create(
model="llama3.2:3b",
messages=[{"role": "user", "content": "Tell me a joke."}],
stream=True,
)
for chunk in stream:
delta = chunk.choices[0].delta.content
if delta:
print(delta, end="", flush=True)Via raw HTTP
curl -H "Authorization: Bearer $BIGWAVE_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
http://localhost:8000/v1/chat/completions \
-d '{
"model": "llama3.2:3b",
"messages": [{"role": "user", "content": "Hello!"}],
"stream": false
}'The response wire shape matches OpenAI exactly. Every existing client library (langchain, llamaindex, instructor, openai-python, openai-node) works against Bigwave with one URL change.
Submit thumbs feedback
Bigwave extends the OpenAI surface with a feedback endpoint. Capture the completion_id from the response and submit 1 (thumbs-up) or -1 (thumbs-down):
import requests
import os
requests.post(
f"http://localhost:8000/v1/chat/completions/{completion_id}/feedback",
headers={"Authorization": f"Bearer {os.environ['BIGWAVE_ADMIN_TOKEN']}"},
json={"rating": 1, "label": "great"},
)The feedback row lands in the workspace's FeedbackStore. It becomes preference data the next time you build a DPO dataset.
RAG-augmented chat
Drag a folder of notes into the Knowledge tab in the Web UI, or ingest via the admin API. Then chat with bigwave_kb_id to ground the response:
resp = client.chat.completions.create(
model="llama3.2:3b",
messages=[{"role": "user", "content": "What did the notes say about X?"}],
extra_body={"bigwave_kb_id": "notes", "bigwave_rag_top_k": 4},
)The gateway retrieves the top-k chunks from the workspace's vector store, assembles them into a system message, and prepends. The response includes x-bigwave-rag-status and x-bigwave-rag-hits headers so you can verify retrieval ran.
Inspect what happened
Every chat lands a row in the inference log:
curl -H "Authorization: Bearer $BIGWAVE_ADMIN_TOKEN" \
"http://localhost:8000/admin/inference?limit=10"The Loop dashboard at http://localhost:8080 (Loop tab) shows the active adapter, the latest eval pass-rate (with Wilson 95% CI), the last-7-day feedback ratio, and recent training jobs — auto-refreshing every 15 seconds.
What's next
| If you want to… | Read |
|---|---|
| Fine-tune on your own data | Train SFT in getting started |
| Understand how feedback becomes preference data | The loop concept |
| Wire Bigwave into Cursor / Continue | Coding-assistant use case |
| Deploy beyond a laptop | Deploy guide |