Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
eddyvargas
Contributor III
Contributor III

Using Gemini in QlikSense #qlik #qlikview #saas #gemini #google #rest

To config REST connector for Gemini (Free chat AI) use the next parameters

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

Then in your script you need to create your question in a variable (like vResponseBody) and use in the Query

WITH CONNECTION (BODY "$(vResponseBody)");

 

Labels (4)
3 Replies
marksouzacosta

Thank you for sharing @eddyvargas.

For articles like that you can publish it as Member Articles: go to Support > Member Articles:
Member Articles - Qlik Community

Also, tag your article as Not a Question.

Regards,

Mark Costa

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

eddyvargas
Contributor III
Contributor III
Author

Thanks, can delete this question?

marksouzacosta

I would keep it for now and just add a link that redirects to your article.

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com