kenken999 commited on
Commit
a974023
Β·
1 Parent(s): bc2f1c7
chat_history.db CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a5aedaf08f956b557f869095a9d3953144dafdb03f4ff9a4ee7b27026647d4de
3
  size 1843200
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dfd81f4568f0d17c607a776c55cee68d598c585c3651d22f75e230aa42bf2e59
3
  size 1843200
controllers/gra_02_openInterpreter/OpenInterpreter.py CHANGED
@@ -45,11 +45,11 @@ def format_response(chunk, full_response):
45
  return full_response
46
 
47
  # バッククγ‚ͺγƒΌγƒˆγ‚’ε‰Šι™€
48
- #console_content = console_content.replace("`", "")
49
 
50
  # 言θͺžγ‚Ώγ‚°γͺしでコードブロックを開始
51
  if chunk.get("start", False):
52
- full_response += "```python\n"
53
 
54
  if chunk.get("format", "") == "active_line":
55
  if not console_content.strip():
@@ -128,7 +128,6 @@ def ensure_triple_quotes(s):
128
 
129
 
130
  def chat_with_interpreter(message, history=None, a=None, b=None, c=None, d=None):
131
- interpreter.reset()
132
  if message == "reset":
133
  interpreter.reset()
134
  return "Interpreter reset", history
@@ -160,7 +159,7 @@ def chat_with_interpreter(message, history=None, a=None, b=None, c=None, d=None)
160
  add_message_to_db("assistant", "message", full_response)
161
 
162
  yield full_response
163
- return full_response, ""#history
164
 
165
 
166
  def chat_with_interpreter_no_stream(message, history=None, a=None, b=None, c=None, d=None):
 
45
  return full_response
46
 
47
  # バッククγ‚ͺγƒΌγƒˆγ‚’ε‰Šι™€
48
+ console_content = console_content.replace("`", "")
49
 
50
  # 言θͺžγ‚Ώγ‚°γͺしでコードブロックを開始
51
  if chunk.get("start", False):
52
+ full_response += "```code\n"
53
 
54
  if chunk.get("format", "") == "active_line":
55
  if not console_content.strip():
 
128
 
129
 
130
  def chat_with_interpreter(message, history=None, a=None, b=None, c=None, d=None):
 
131
  if message == "reset":
132
  interpreter.reset()
133
  return "Interpreter reset", history
 
159
  add_message_to_db("assistant", "message", full_response)
160
 
161
  yield full_response
162
+ return full_response, history
163
 
164
 
165
  def chat_with_interpreter_no_stream(message, history=None, a=None, b=None, c=None, d=None):