Config REST connector for Gemini
URL: https://generativelanguage.googleapis.com/v1/models/gemini-pro:generateContent/?key=XXXXXXXXXXXXXXXX...
XXXX is your API Key
Method: POST
Body:
{"contents": {"role": "user","parts": {"text": "Give me a recipe for banana bread."}},
"safety_settings": {
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
"threshold": "BLOCK_LOW_AND_ABOVE"
},
"generation_config": {
"temperature": 0.9,
"topP": 1.0,
"maxOutputTokens": 2048
}
}
ALLOW WITH CONN
Config the script in Qlik Sense SaaS
Then in your script you need to create your question in a variable (like vResponseBody) and use in the Query
WITH CONNECTION (BODY "$(vResponseBody)");
Relative links
https://www.reddit.com/r/qlik_sense/comments/1f6m35g/how_to_use_gpt_free_to_analyze_social_media_in/