Gemini Search App - Flask-based Chatbot API
789
The Gemini Search App is a simple Python Flask-based REST server that allows users to interact with the Gemini chatbot via API calls. It takes a user-defined prompt and returns a pre-parsed JSON response, providing the flexibility to specify a custom response format.
To run the container, define the GEMINI_API_KEYS environment variable (multiple keys handled separated by comma) and run the following command:
docker run -d -e GEMINI_API_KEY=your_key_1,your_key_2,your_key_3 -p 8080:8080 lolcatcodes/gemini-search:latest
This will start the Flask server on the default port 8080. You can change the port by specifying the -p flag with the docker run command.
Endpoint:
curl -X POST http://localhost:8080/search \
-H "Content-Type: application/json" \
-d "{
\"prompt\": \"Please provide the following information about the phrase 'fresh'. 1. English explanation: A brief definition of the word; 2.Polish translation: The translation of the word in Polish; 3. Usage examples: A list of example sentences using the word;\",
\"response_format\": {
\"explanation\": \"\",
\"translation\": \"\",
\"usages\": []
}
}"
Sample Request Body:
{
"prompt": "Please provide the following information about the phrase 'fresh'. 1. English explanation: A brief definition of the word; 2. Polish translation: The translation of the word in Polish; 3. Usage examples: A list of example sentences using the word;",
"response_format": {
"explanation": "",
"translation": "",
"usages": []
}
}
Sample Response:
{
"explanation": "Recently made, produced, or obtained; also, pleasantly new or different",
"translation": "świeży",
"usages": [
"This bread is incredibly fresh.",
"She wore a fresh, summer dress.",
"Let's start with a fresh perspective.",
"The air smelled fresh after the rain.",
"He had a fresh batch of cookies."
]
}
You can find the landing page here. Once there, click on the “Gemini API” tab or the “Learn more about the Gemini API” button.
Alternatively, you can visit the Gemini API landing page directly by clicking here.
Content type
Image
Digest
sha256:691bb6563…
Size
105.2 MB
Last updated
12 months ago
docker pull lolcatcodes/gemini-search