Spaces:
Sleeping
Sleeping
updae
Browse files
chat_history.db
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 1687552
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c4a29d74b25021365bcddd626fc2057271273c6ae843f8759a2811027fdbb1e1
|
3 |
size 1687552
|
controllers/gra_02_openInterpreter/OpenInterpreter.py
CHANGED
@@ -30,19 +30,29 @@ def format_response(chunk, full_response):
|
|
30 |
|
31 |
# Console
|
32 |
if chunk["type"] == "console":
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
# 言語タグなしでコードブロックを開始
|
36 |
if chunk.get("start", False):
|
37 |
full_response += "```\n"
|
38 |
|
39 |
if chunk.get("format", "") == "active_line":
|
40 |
-
if not
|
41 |
full_response += "No output available on console.\n"
|
42 |
else:
|
43 |
-
full_response +=
|
44 |
elif chunk.get("format", "") == "output":
|
45 |
-
full_response +=
|
46 |
|
47 |
if chunk.get("end", False):
|
48 |
full_response += "```\n"
|
|
|
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"
|