File size: 1,652 Bytes
ced9327
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "d444d3ce",
   "metadata": {},
   "source": [
    "# Build and Deploy a Multimodal Chatbot\n",
    "\n",
    "Queens University - GenAI - From Studio 2, Lab 2\n",
    "\n",
    "references: \n",
    "\n",
    "medium: [Build and Deploy a Multimodal Chatbot with Gemini API](https://medium.com/@turna.fardousi/building-a-multimodal-chatbot-with-gemini-api-8015bfbee538)\n",
    "\n",
    "hugging face space [Gemini 2.0 Multimodal Chatbot](https://huggingface.co/spaces/Rahatara/Gemini2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "1cd185e6",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "It learns from data to recognize patterns and make predictions or decisions.\n"
     ]
    }
   ],
   "source": [
    "from google import genai\n",
    "GEMINI_API_KEY = 'AIzaSyCMOojm7aZCdHsN1n6DKQRj4IWl9J9MuVs'\n",
    "\n",
    "client = genai.Client(api_key=GEMINI_API_KEY)\n",
    "\n",
    "response = client.models.generate_content(\n",
    "    model=\"gemini-2.5-flash\", contents=\"Explain how AI works in a few words\"\n",
    ")\n",
    "print(response.text)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "llmgroq",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}