Closed eliben closed 2 months ago
Good stuff. One request: skip the live tests if testing.Short() is true. I sometimes use
go test
as a quick way to see if my code is basically ok. With this PR as it is, to make that work I'd have to clear my GEMINI_API_KEY env var, then restore it after. I'd prefer if I can just typego test -short
.
Done
Requiring flags precludes us from running
go test ./...
in this repository. The model name is open now so we can just place it as a constant in the file - it's no longer the only model used by the tests either, so it's less confusing. The API key can be provided with an env var like in the examples.With this change,
go test ./...
now succeeds (the live test skip if the env var key is not set).Also fix some test expectations to be more resilient.