debisoft commited on
Commit
e189cc3
·
1 Parent(s): 9e2ad76
Files changed (1) hide show
  1. main.py +4 -11
main.py CHANGED
@@ -29,16 +29,9 @@ function load()
29
  }
30
  setTimeout(load, 1000);
31
 
32
- $('#chat_form')
33
- .ajaxForm({
34
- url : 'myscript.php', // or whatever
35
- dataType : 'json',
36
- success : function (response) {
37
- alert("The server says: " + response);
38
- }
39
- })
40
- ;
41
-
42
 
43
  """
44
 
@@ -124,7 +117,7 @@ def send(msg:str, messages:list[str]=None):
124
  if not messages: messages = []
125
  messages.append(msg.rstrip())
126
  print(messages[0])
127
- post_append_str = ' Return as JSON with GeoLocation'
128
  r = get_completion(messages[0] + post_append_str) # get response from chat model
129
  return (ChatMessage(msg, True), # The user's message
130
  ChatMessage(r.rstrip(), False), # The chatbot's response
 
29
  }
30
  setTimeout(load, 1000);
31
 
32
+ $("messages").change(function(){
33
+ alert("The text has been changed.");
34
+ });
 
 
 
 
 
 
 
35
 
36
  """
37
 
 
117
  if not messages: messages = []
118
  messages.append(msg.rstrip())
119
  print(messages[0])
120
+ post_append_str = ' Return as a JSON response with GeoLocation'
121
  r = get_completion(messages[0] + post_append_str) # get response from chat model
122
  return (ChatMessage(msg, True), # The user's message
123
  ChatMessage(r.rstrip(), False), # The chatbot's response