Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
eddyvargas
Contributor II
Contributor II

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
eddyvargas
Contributor II
Contributor II
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