I use gemini 1.5 flash in my functions.
Simple function. Just generating a response to a text query. If I use this function directly from its file, everything works correctly.
But, if I use this function somewhere else like:
from some_file import some_func
then the response comes incorrect. The system duplicates the last message until it runs out of response length.
Also, the quality of the response itself gets worse. It’s like the model is getting a level dumber.
The model settings:
generation_config = {
"temperature": 0.35,
"top_p": 0.9,
"top_k": 40,
"max_output_tokens": 2048,
"response_mime_type": "text/plain",
}
Has anyone had this problem?