itsalissonsilva commited on
Commit
1fc4ec9
·
verified ·
1 Parent(s): 01643ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -9,11 +9,14 @@ def encrypt_decrypt(input_text, key, operation):
9
  'Content-Type': 'application/json'
10
  }
11
 
12
- # Construct the instruction for the AI based on the operation
13
- instruction = f"{operation} the following message with key {key}: {input_text}"
14
-
 
15
  data = {
16
- "messages": [{"content": instruction, "role": "system"}],
 
 
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