Spaces:
Sleeping
Sleeping
Neurolingua
commited on
Commit
•
8c242c9
1
Parent(s):
3f6a39c
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ if not os.path.exists(UPLOAD_FOLDER):
|
|
16 |
|
17 |
account_sid = os.environ.get('TWILIO_ACCOUNT_SID')
|
18 |
auth_token = os.environ.get('TWILIO_AUTH_TOKEN')
|
19 |
-
client
|
20 |
from_whatsapp_number = 'whatsapp:+14155238886'
|
21 |
|
22 |
PROMPT_TEMPLATE = """
|
@@ -28,11 +28,11 @@ Answer the question based on the above context: {question}
|
|
28 |
model = "mistral-large-latest"
|
29 |
api_key='xQ2Zhfsp4cLar4lvBRDWZKljvp0Ej427'
|
30 |
|
31 |
-
|
32 |
|
33 |
def generate_response(query,chat_history):
|
34 |
|
35 |
-
chat_response =
|
36 |
model= model,
|
37 |
messages = [
|
38 |
{
|
|
|
16 |
|
17 |
account_sid = os.environ.get('TWILIO_ACCOUNT_SID')
|
18 |
auth_token = os.environ.get('TWILIO_AUTH_TOKEN')
|
19 |
+
client= Client(account_sid, auth_token)
|
20 |
from_whatsapp_number = 'whatsapp:+14155238886'
|
21 |
|
22 |
PROMPT_TEMPLATE = """
|
|
|
28 |
model = "mistral-large-latest"
|
29 |
api_key='xQ2Zhfsp4cLar4lvBRDWZKljvp0Ej427'
|
30 |
|
31 |
+
client1 = Mistral(api_key=api_key)
|
32 |
|
33 |
def generate_response(query,chat_history):
|
34 |
|
35 |
+
chat_response = client1.chat.complete(
|
36 |
model= model,
|
37 |
messages = [
|
38 |
{
|