~/talk

Live coding a streaming ChatGPT proxy with Swift OpenAPI—from scratch!

Talkat try! Swift Tokyo 2025 · 2025-04-09..04-11· [swift, ai-assisted-development]
slides:none on file

Builds a type-safe ChatGPT client and a Linux proxy server from scratch and demonstrates they work live: generated code via Swift OpenAPI Generator, URLSession on macOS and AsyncHTTPClient on Linux, Vapor for the proxy. Streams upstream SSE into JSON Lines as an async sequence with no buffering upstream responses, maps chat payloads to a simplified API, and fixes stale model output by injecting roster data into the system prompt.

AI-written summary · about

  1. 0:00Introduction
  2. 1:47Proxy server for ChatGPT
  3. 3:14Chant GPT use case
  4. 4:36Swift OpenAPI client
  5. 7:30Streaming CLI client
  6. 10:27Fixing CLI client
  7. 11:52Enhancing prompts
  8. 12:37Proxy server setup
  9. 14:25Proxy server logic
  10. 15:49Streaming responses
  11. 16:54Testing proxy with curl
  12. 17:37Proxy client for CLI
  13. 18:42CLI with proxy
  14. 19:24Final demo
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.