Skip to content

Commit 079fd4d

Browse files
committed
internal/genai, cmd/vulnreport: remove support for legacy PaLM API
The Gemini API has fully replaced the PaLM API so there is no need for us to maintain support. Change-Id: I1e6581313b481a7ce9042d5ef82e99cb45ee48cf Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/559598 Reviewed-by: Damien Neil <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent aff2b00 commit 079fd4d

File tree

4 files changed

+6
-369
lines changed

4 files changed

+6
-369
lines changed

cmd/vulnreport/suggest.go

+4-11
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
var (
1818
interactive = flag.Bool("i", false, "for suggest, interactive mode")
1919
numSuggestions = flag.Int("n", 4, "for suggest, the number of suggestions to attempt to generate (max is 8)")
20-
palm = flag.Bool("palm", false, "use the legacy PaLM API instead of the Gemini API")
2120
)
2221

2322
func suggestCmd(ctx context.Context, filename string) (err error) {
@@ -28,16 +27,10 @@ func suggestCmd(ctx context.Context, filename string) (err error) {
2827
return err
2928
}
3029

31-
var c genai.Client
32-
if *palm {
33-
infolog.Print("contacting the PaLM API...")
34-
c = genai.NewDefaultPaLMClient()
35-
} else {
36-
infolog.Print("contacting the Gemini API... (set flag -palm to use legacy PaLM API instead)")
37-
c, err = genai.NewGeminiClient(ctx)
38-
if err != nil {
39-
return err
40-
}
30+
infolog.Print("contacting the Gemini API...")
31+
c, err := genai.NewGeminiClient(ctx)
32+
if err != nil {
33+
return err
4134
}
4235

4336
suggestions, err := suggest(ctx, c, r, *numSuggestions)

internal/genai/gen_examples/main.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
// license that can be found in the LICENSE file.
44

55
// Command gen_examples generates and stores examples
6-
// that can be used to create prompts / training inputs for the PaLM API.
6+
// that can be used to create prompts / training inputs for Google's
7+
// Generative AI APIs.
78
package main
89

910
import (

internal/genai/palmclient.go

-210
This file was deleted.

internal/genai/palmclient_test.go

-147
This file was deleted.

0 commit comments

Comments
 (0)