accept model
This commit is contained in:
4
main.go
4
main.go
@@ -27,6 +27,8 @@ func main() {
|
||||
func run(ctx context.Context) error {
|
||||
fs := flag.NewFlagSet(os.Args[0], flag.ContinueOnError)
|
||||
n := fs.Int("n", 1, "loops")
|
||||
model := fs.String("m", "gemini-2.5-flash", "model to use")
|
||||
|
||||
if err := fs.Parse(os.Args[1:]); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -105,7 +107,7 @@ For the city {{.City}}, answer the following descriptors '1' for true or '0' for
|
||||
for i := 0; i < *n; i++ {
|
||||
result, err := client.Models.GenerateContent(
|
||||
ctx,
|
||||
"gemini-2.5-flash",
|
||||
*model,
|
||||
genai.Text(w.String()),
|
||||
nil,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user