(rw http.ResponseWriter, r *http.Request)
| 7368 | } |
| 7369 | |
| 7370 | func parseChatModelConfigID(rw http.ResponseWriter, r *http.Request) (uuid.UUID, bool) { |
| 7371 | modelConfigID, err := uuid.Parse(chi.URLParam(r, "modelConfig")) |
| 7372 | if err != nil { |
| 7373 | httpapi.Write(r.Context(), rw, http.StatusBadRequest, codersdk.Response{ |
| 7374 | Message: "Invalid chat model config ID.", |
| 7375 | Detail: err.Error(), |
| 7376 | }) |
| 7377 | return uuid.Nil, false |
| 7378 | } |
| 7379 | return modelConfigID, true |
| 7380 | } |
| 7381 | |
| 7382 | func convertChatModelConfig(config database.ChatModelConfig) codersdk.ChatModelConfig { |
| 7383 | var aiProviderID *uuid.UUID |
no test coverage detected