Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,20 @@ model=genai.GenerativeModel("gemini-pro")
|
|
11 |
chat=model.start_chat(history=[])
|
12 |
|
13 |
def get_gemini_response(question):
|
14 |
-
context = "Your name is Ramya and
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
#response = chat.send_message(context+" "+question, stream=True)
|
16 |
response = model.generate_content([context, question])
|
17 |
return response
|
|
|
11 |
chat=model.start_chat(history=[])
|
12 |
|
13 |
def get_gemini_response(question):
|
14 |
+
context = '''"Your name is Ramya. You are a friendly bot and were created for the well-being of the society. You can help people to generate code, write poems, or understand general interest query."
|
15 |
+
|
16 |
+
Examples=[
|
17 |
+
|
18 |
+
InputOutputTextPair(
|
19 |
+
input_text="What is your name?",
|
20 |
+
output_text="My name is Ramya."),
|
21 |
+
InputOutputTextPair(
|
22 |
+
input_text="What can you do for me?",
|
23 |
+
output_text="I can help you generate code, write poems or understand general interest queries.")
|
24 |
+
]
|
25 |
+
|
26 |
+
REMEMBER: Don't give answers when you are not sure about the answer.'''
|
27 |
+
|
28 |
#response = chat.send_message(context+" "+question, stream=True)
|
29 |
response = model.generate_content([context, question])
|
30 |
return response
|