Spaces:
Sleeping
Sleeping
itsalissonsilva
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -9,11 +9,14 @@ def encrypt_decrypt(input_text, key, operation):
|
|
9 |
'Content-Type': 'application/json'
|
10 |
}
|
11 |
|
12 |
-
# Construct the
|
13 |
-
|
14 |
-
|
|
|
15 |
data = {
|
16 |
-
"messages": [
|
|
|
|
|
17 |
"stream": False
|
18 |
}
|
19 |
|
|
|
9 |
'Content-Type': 'application/json'
|
10 |
}
|
11 |
|
12 |
+
# Construct the message to be sent to the AI
|
13 |
+
# Assuming the AI can understand the operation from the context
|
14 |
+
message = f"{operation.lower()} this message: '{input_text}' with key {key}"
|
15 |
+
|
16 |
data = {
|
17 |
+
"messages": [
|
18 |
+
{"content": message, "role": "user"}
|
19 |
+
],
|
20 |
"stream": False
|
21 |
}
|
22 |
|