Sulba
ReviewSign inAccount
Theme
Editor theme
Light
Dark

Intermediate · Go for programmers

Types, errors and interfaces

The start of a model gateway, in Go: a chat request read and checked, with its errors as values; routes from each model to the upstreams that serve it; a fallback from one upstream to the next, behind an interface; a review of an assistant's usage counter; and the gateway's answers when a request fails.

You build
request.go, then routes.go, then fallback.go, then usage.go, then failures.go
Stages
3 Build, 1 Catch, 1 Ship
Time
About 3.5 hours
Runs on
Your machine

Loading the workspace…