Closed davenportjw closed 1 month ago
Here is the summary of changes.
This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run
label or use the checkbox below:
@davenportjw any idea why change in model name might cause the error
tmpfs/docker/overlay2/85ba26e363cfea28217e7dc8e3c0363a0d8f95a8c884410d2f380c5b415db5f2/merged/sys/fs/cgroup/cpuset. [ERROR] Tests run: 21, Failures: 0, Errors: 3, Skipped: 1, Time elapsed: 1,210.961 s <<< FAILURE! - in vertexai.gemini.SnippetsIT [ERROR] vertexai.gemini.SnippetsIT.testMultimodalQuery Time elapsed: 591.885 s <<< ERROR! java.lang.IllegalArgumentException: The response is blocked due to unauthorized citations.
@davenportjw any idea why change in model name might cause the error
It looks like you need to revise the input or to adjust the safety settings by updating the model with:
SafetySetting safetySettings = SafetySetting.newBuilder()
.setThreshold(SafetySetting.HarmBlockThreshold.BLOCK_NONE)
.build();
GenerativeModel model = new GenerativeModel(modelName, vertexAI)
.withSafetySettings(safetySettings);
@davenportjw @iennae @minherz: GetTokenCount.java has been updated along with other files in another PR (https://github.com/GoogleCloudPlatform/java-docs-samples/pull/9356). We can close this PR. Please let me know if you have any questions.. Thank you!
No questions
Description
Fixes #
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
pom.xml
parent set to latestshared-configuration
mvn clean verify
requiredmvn -P lint checkstyle:check
requiredmvn -P lint clean compile pmd:cpd-check spotbugs:check
advisory only