I am trying to get gemini-1.5-flash to translate text and it is giving me a Recitation response.
Recitation issue
If you see the model stops generating output due to the RECITATION reason, this means the model output may resemble certain data. To fix this, try to make prompt / context as unique as possible and use a higher temperature.
Array
(
(
[0] => Array
(
[finishReason] => RECITATION
[safetyRatings] => Array
(
[0] => Array
(
[category] => HARM_CATEGORY_HATE_SPEECH
[probability] => NEGLIGIBLE
)
[1] => Array
(
[category] => HARM_CATEGORY_DANGEROUS_CONTENT
[probability] => NEGLIGIBLE
)
[2] => Array
(
[category] => HARM_CATEGORY_HARASSMENT
[probability] => NEGLIGIBLE
)
[3] => Array
(
[category] => HARM_CATEGORY_SEXUALLY_EXPLICIT
[probability] => NEGLIGIBLE
)
)
[citationMetadata] => Array
(
[citationSources] => Array
(
[0] => Array
(
[startIndex] => 52
[endIndex] => 1908
[uri] => https://www.sefaria.org/II_Samuel.24.14-17?with=Midrash
)
)
)
[avgLogprobs] => NaN
)
)
[usageMetadata] => Array
(
[promptTokenCount] => 1600
[totalTokenCount] => 1600
)
“Modified by moderator”
The recitation url is to text which translates a portion of the text, but not all of it. Why would Google let it’s AI search the Internet for this text instead of translating it as I requested?
Is there a workaround for this?