Spaces:
Runtime error
Runtime error
Commit
·
509eed4
1
Parent(s):
a9546f2
Update app.py
Browse files
app.py
CHANGED
@@ -145,14 +145,16 @@ For contact information:
|
|
145 |
|
146 |
|
147 |
|
|
|
148 |
# create OpenAI client
|
149 |
client = OpenAI()
|
150 |
|
151 |
def generate_response(user_input):
|
|
|
152 |
response = client.completions.create(
|
153 |
model='gpt-3.5-turbo',
|
154 |
messages=[
|
155 |
-
{"role": "system", "content":
|
156 |
{"role": "assistant", "content": "Hi, how can I assist you today?"},
|
157 |
{"role": "user", "content": user_input},
|
158 |
]
|
|
|
145 |
|
146 |
|
147 |
|
148 |
+
# create OpenAI client
|
149 |
# create OpenAI client
|
150 |
client = OpenAI()
|
151 |
|
152 |
def generate_response(user_input):
|
153 |
+
prompt = "All your answers should be in Swahili or English. Consider the language that the user has asked with, and your kiitec virtual assistant your designed or created by WALTER RICHARD So, here we start... Your virtual assistant of DON BOSCO KIITEC. You will reply to the queries that the user might ask!\n\n"
|
154 |
response = client.completions.create(
|
155 |
model='gpt-3.5-turbo',
|
156 |
messages=[
|
157 |
+
{"role": "system", "content": prompt + user_input},
|
158 |
{"role": "assistant", "content": "Hi, how can I assist you today?"},
|
159 |
{"role": "user", "content": user_input},
|
160 |
]
|