career_conversation / gemini_exercise_solution.py
nehit07's picture
Upload folder using huggingface_hub
d8652af verified
import os
from google import genai
from dotenv import load_dotenv
# Load environment variables
load_dotenv()
# Initialize the client
# Ensure you have GEMINI_API_KEY in your .env file
client = genai.Client(api_key=os.getenv('GEMINI_API_KEY'))
# Create the chat session
# We use client.chats.create for multi-turn conversations in the new SDK
chat = client.chats.create(model='gemini-2.0-flash')
# 1. Ask for a business area
print("--- Asking for Business Area ---")
response = chat.send_message('Pick a business area that might be worth exploring for an Agentic AI opportunity.')
print(response.text)
# 2. Ask for a pain point
# The chat session remembers the context automatically
print("\n--- Asking for Pain Point ---")
response = chat.send_message('Present a pain-point in that industry - something challenging that might be ripe for an Agentic solution.')
print(response.text)
# 3. Propose a solution
print("\n--- Proposing Solution ---")
response = chat.send_message('Propose the Agentic AI solution.')
print(response.text)