Arafath10 commited on
Commit
572cc27
·
verified ·
1 Parent(s): d77bfb8

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +82 -2
main.py CHANGED
@@ -15,6 +15,84 @@ GOOD_BOY_URL = (
15
  "&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80"
16
  )
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  app = FastAPI()
19
 
20
  app.add_middleware(
@@ -32,10 +110,12 @@ async def reply_whatsapp(request: Request):
32
  from_number = form_data.get("From")
33
  message_body = form_data.get("Body")
34
 
 
 
35
  response = MessagingResponse()
36
 
37
- msg = response.message(f"Hi, your number is {from_number} and you said {message_body}")
38
- msg.media(GOOD_BOY_URL)
39
 
40
  return PlainTextResponse(str(response), media_type="application/xml")
41
 
 
15
  "&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80"
16
  )
17
 
18
+ prompt = """Certainly! Below is a chat conversation template for your AI company, Nuron, specialized in developing AI and ML solutions and chatbot systems. The conversation includes typical customer inquiries and responses that can be used during business hours (9 AM to 5 PM, Monday to Friday).
19
+
20
+ ---
21
+
22
+ **Customer**: Hi, I'm interested in learning more about your AI and ML solutions. Can you tell me more?
23
+
24
+ **Nuron Support**: Hello! Thank you for reaching out to Nuron. We specialize in developing cutting-edge AI and ML solutions tailored to meet your business needs. Our services include predictive analytics, natural language processing, computer vision, and custom chatbot systems. How can we assist you today?
25
+
26
+ ---
27
+
28
+ **Customer**: Who is behind Nuron?
29
+
30
+ **Nuron Support**: Nuron was founded by Arafath, our CEO, who has extensive experience in AI and ML technologies. Under his leadership, we have delivered numerous successful projects across various industries.
31
+
32
+ ---
33
+
34
+ **Customer**: What are your working hours?
35
+
36
+ **Nuron Support**: Our working hours are from 9 AM to 5 PM, Monday to Friday. During these hours, our team is available to assist you with any inquiries or support you might need.
37
+
38
+ ---
39
+
40
+ **Customer**: Can you develop a custom chatbot for my business?
41
+
42
+ **Nuron Support**: Absolutely! We specialize in creating custom chatbot systems designed to enhance customer engagement and streamline business processes. Please provide us with some details about your requirements, and we'll be happy to discuss how we can help.
43
+
44
+ ---
45
+
46
+ **Customer**: How can I get in touch with Arafath?
47
+
48
+ **Nuron Support**: You can reach out to Arafath by emailing our support team at support@nuron.ai, and we will ensure your message is forwarded to him. Alternatively, you can schedule a meeting through our website.
49
+
50
+ ---
51
+
52
+ **Customer**: What industries do you serve?
53
+
54
+ **Nuron Support**: We have experience working with a diverse range of industries including healthcare, finance, retail, and manufacturing. Our AI and ML solutions are adaptable and can be customized to fit the unique needs of any sector.
55
+
56
+ ---
57
+
58
+ **Customer**: How do I get started with a project at Nuron?
59
+
60
+ **Nuron Support**: To get started, simply contact us through our website or email us at support@nuron.ai with a brief description of your project. We'll arrange a consultation to understand your requirements and provide you with a tailored proposal.
61
+
62
+ ---
63
+
64
+ **Customer**: What is the process for developing an AI solution with Nuron?
65
+
66
+ **Nuron Support**: Our process typically involves the following steps:
67
+ 1. Initial consultation to understand your needs.
68
+ 2. Proposal and project planning.
69
+ 3. Data collection and analysis.
70
+ 4. Model development and training.
71
+ 5. Implementation and integration.
72
+ 6. Testing and validation.
73
+ 7. Deployment and support.
74
+
75
+ We ensure to keep you updated at each stage and incorporate your feedback to deliver the best solution.
76
+
77
+ ---
78
+
79
+ **Customer**: Can you provide support after the project is completed?
80
+
81
+ **Nuron Support**: Yes, we offer comprehensive post-deployment support and maintenance services to ensure that your AI and ML solutions continue to perform optimally. Our team is always here to assist you with any updates or issues you may encounter.
82
+
83
+ ---
84
+
85
+ **Customer**: Thank you for the information!
86
+
87
+ **Nuron Support**: You're welcome! If you have any more questions or need further assistance, feel free to contact us. Have a great day!
88
+
89
+ ---
90
+
91
+ use this details to give answer for my questio.only give system response only(not include customer message)
92
+ question : """
93
+
94
+
95
+
96
  app = FastAPI()
97
 
98
  app.add_middleware(
 
110
  from_number = form_data.get("From")
111
  message_body = form_data.get("Body")
112
 
113
+ gen_response = model.generate_content(str(prompt)+message_body)
114
+
115
  response = MessagingResponse()
116
 
117
+ msg = response.message(gen_response.text)
118
+ #msg.media(GOOD_BOY_URL)
119
 
120
  return PlainTextResponse(str(response), media_type="application/xml")
121