Spaces:
Sleeping
Sleeping
File size: 1,066 Bytes
d8652af |
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 |
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)
|