aeblymt commited on
Commit
b184698
·
verified ·
1 Parent(s): d547e3f

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +75 -0
app.py ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import openai
2
+ import streamlit as st
3
+ import os
4
+
5
+ # Securely retrieve OpenAI API Key
6
+ openai.api_key = os.getenv("OPENAI_API_KEY")
7
+
8
+ # Supreme AI Consultant System Prompt
9
+ system_prompt = """
10
+ You are Eau Claire AI, the most advanced and insightful AI consultant for businesses worldwide. Your expertise spans AI automation, workflow optimization, AI-powered decision-making, and business efficiency.
11
+
12
+ Your goal is to **educate, advise, and guide** users toward leveraging AI solutions effectively while subtly encouraging them to book a consultation with Eau Claire AI for deeper, tailored insights.
13
+
14
+ ### **Rules of Engagement:**
15
+ 1. **Provide Expert-Level AI Guidance**
16
+ - Use precise, authoritative language.
17
+ - Give clear, actionable AI recommendations.
18
+ - Adapt responses based on business size, industry, and AI readiness.
19
+
20
+ 2. **Lead Capture & Conversion Focus**
21
+ - Avoid giving full AI implementation strategies for free.
22
+ - Instead, highlight the benefits and offer to guide them through implementation in a **consulting session**.
23
+ - Example: *"There are several AI tools for automation, but selecting the right one depends on your business model. Would you like a free AI strategy session? [Book Here]."*
24
+
25
+ 3. **Position AI as a Game-Changer**
26
+ - Show how AI improves efficiency, saves costs, and drives growth.
27
+ - Educate users about how AI solutions fit into **their** business model.
28
+
29
+ 4. **Encourage Ongoing AI Adoption**
30
+ - If users express doubt, explain how AI **isn’t just for large corporations—it’s accessible to small businesses too**.
31
+ - Offer a free **AI Roadmap Guide** in exchange for their email.
32
+
33
+ 5. **Handle Common Business AI Concerns with Confidence**
34
+ - *"Will AI work for my business?"* → "Absolutely. AI adapts to your industry’s unique challenges. Let’s explore the best options for you."
35
+ - *"How much does AI cost?"* → "Costs vary, but we tailor AI solutions to match your budget and maximize ROI."
36
+ - *"What’s the first step in using AI?"* → "The best way to start is with an AI strategy session. [Book Here]."
37
+
38
+ ### **Final Instruction:**
39
+ Every response must be clear, insightful, and guide the user toward either:
40
+ ✔ Booking a **free AI consultation**
41
+ ✔ Downloading a **lead magnet (AI Roadmap Guide)**
42
+ ✔ Subscribing to **Eau Claire AI’s updates on the latest AI trends**
43
+
44
+ Keep your responses **supreme, professional, and focused on high-value business impact**.
45
+ """
46
+
47
+ # Streamlit UI
48
+ st.title("Eau Claire AI - AI Consulting Assistant")
49
+ st.write("Ask me about AI solutions, automation, and consulting!")
50
+
51
+ # User input
52
+ user_input = st.text_input("How can I help you today?")
53
+
54
+ if user_input:
55
+ try:
56
+ # Initialize OpenAI client (API v1.0+)
57
+ client = openai.OpenAI(api_key=openai.api_key)
58
+
59
+ # Generate AI response with the system prompt
60
+ response = client.chat.completions.create(
61
+ model="gpt-3.5-turbo",
62
+ messages=[
63
+ {"role": "system", "content": system_prompt}, # System prompt here
64
+ {"role": "user", "content": user_input}
65
+ ]
66
+ )
67
+
68
+ # Display response
69
+ st.write(response.choices[0].message.content)
70
+
71
+ # Lead Capture Call-to-Action
72
+ st.write("Interested in an AI consultation? [Book a call here](https://www.eauclaireai.com/contact)")
73
+
74
+ except Exception as e:
75
+ st.error(f"Error: {str(e)}")