kenken999 commited on
Commit
59df6d9
·
1 Parent(s): 90690f3

うpだて

Browse files
chat_history.db CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c4a29d74b25021365bcddd626fc2057271273c6ae843f8759a2811027fdbb1e1
3
- size 1687552
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e8dc1bad561e084af3587ea04b3c1205fb67ae26f6bdb99f725e550714cb64f
3
+ size 1708032
controllers/gra_02_openInterpreter/OpenInterpreter.py CHANGED
@@ -30,29 +30,22 @@ def format_response(chunk, full_response):
30
 
31
  # Console
32
  if chunk["type"] == "console":
33
- console_content = chunk.get("content", "")
34
-
35
- # デバッグログ: console_content の内容と型を出力
36
- print(f"Processing console content: {console_content}, type={type(console_content)}")
37
-
38
  if not isinstance(console_content, str):
39
  console_content = str(console_content)
40
- print(f"Converted console_content to string: {console_content}")
41
-
42
- # バッククオートを削除
43
- console_content = console_content.replace("`", "")
44
 
45
  # 言語タグなしでコードブロックを開始
46
  if chunk.get("start", False):
47
  full_response += "```\n"
48
 
49
  if chunk.get("format", "") == "active_line":
50
- if not console_content.strip():
51
  full_response += "No output available on console.\n"
52
  else:
53
- full_response += console_content + "\n"
54
  elif chunk.get("format", "") == "output":
55
- full_response += console_content + "\n"
56
 
57
  if chunk.get("end", False):
58
  full_response += "```\n"
 
30
 
31
  # Console
32
  if chunk["type"] == "console":
 
 
 
 
 
33
  if not isinstance(console_content, str):
34
  console_content = str(console_content)
35
+ print(f"Converted console_content to string: {console_content}")
36
+ content = chunk.get("content", "").replace("`", "")
 
 
37
 
38
  # 言語タグなしでコードブロックを開始
39
  if chunk.get("start", False):
40
  full_response += "```\n"
41
 
42
  if chunk.get("format", "") == "active_line":
43
+ if not content:
44
  full_response += "No output available on console.\n"
45
  else:
46
+ full_response += content + "\n"
47
  elif chunk.get("format", "") == "output":
48
+ full_response += content + "\n"
49
 
50
  if chunk.get("end", False):
51
  full_response += "```\n"