feat(vertexai/genai): add SystemInstruction
Expose GenerateContentRequest.SystemInstruction.
As usual, put it on the Model, and use the Model field to construct each request.
Example forthcoming.
I added a test and an example that shows various config options. But I'm marking this a draft because the feature doesn't seem to be implemented.
But I'm marking this a draft because the feature doesn't seem to be implemented.
The Python sample for system instructions with Gemini 1.5 Pro is working for me. I'll see if I can get similar results with the Go sdk.
I'm getting compile errors at example_test.go, @jba can you PTAL?
I'm getting compile errors at
example_test.go, @jba can you PTAL?
Is it a vet error? What does it say?
I'm getting compile errors at
example_test.go, @jba can you PTAL?Is it a vet error? What does it say?
% go test
# cloud.google.com/go/vertexai/genai_test [cloud.google.com/go/vertexai/genai.test]
./example_test.go:58:38: undefined: option
./example_test.go:58:38: not enough arguments in call to genai.NewClient
have (context.Context, unknown type)
want (context.Context, string, string, ...option.ClientOption)
./example_test.go:58:56: undefined: os
FAIL cloud.google.com/go/vertexai/genai [build failed]
And after fixing the imports:
./example_test.go:60:38: not enough arguments in call to genai.NewClient
The errors are trivial but I suspect we don't have jba's latest code.
Sorry for the wait. I fixed the compilation problem and the feature now works with gemini-1.0-pro. Removing draft status.