···251251252252 return messages, nil
253253}
254254+255255+func (c *Client) Ready(ctx context.Context) error {
256256+ // more CORRECT to do a very simple response request with allowed tokens 1 but this seems cheaper
257257+ // https://chatgpt.com/share/6984da16-ff88-8009-8486-4e0479ac6a01
258258+ // could only do it once to ensure startup
259259+ client := openai.NewClient(option.WithAPIKey(c.apiKey))
260260+ _, err := client.Models.List(ctx)
261261+ return err
262262+}
+5
internal/locations/locations.go
···111111 return locations, nil
112112}
113113114114+func Ready(ctx context.Context, l locationGetter) error {
115115+ _, err := l.GetLocationsByZip(ctx, "98005") //magic number is my zip code :)
116116+ return err
117117+}
118118+114119func Register(l locationGetter, mux *http.ServeMux) {
115120 mux.HandleFunc("/locations", func(w http.ResponseWriter, r *http.Request) {
116121 ctx := r.Context()