Spaces:
Sleeping
Sleeping
up
Browse files
chat_history.db
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5536deda90695cebec97d85d9ca4231d8fd4f74a9608e558baf660b6d3e97d21
|
3 |
+
size 1687552
|
controllers/gra_02_openInterpreter/OpenInterpreter.py
CHANGED
@@ -8,7 +8,7 @@ import duckdb
|
|
8 |
def format_response(chunk, full_response):
|
9 |
# Message
|
10 |
if chunk["type"] == "message":
|
11 |
-
full_response += chunk.get("content", "")
|
12 |
if chunk.get("end", False):
|
13 |
full_response += "\n"
|
14 |
|
@@ -30,18 +30,22 @@ def format_response(chunk, full_response):
|
|
30 |
|
31 |
# Console
|
32 |
if chunk["type"] == "console":
|
|
|
|
|
|
|
33 |
if chunk.get("start", False):
|
34 |
-
full_response += "
|
|
|
35 |
if chunk.get("format", "") == "active_line":
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
full_response +=
|
|
|
42 |
if chunk.get("end", False):
|
43 |
-
full_response += "
|
44 |
-
|
45 |
# Image
|
46 |
if chunk["type"] == "image":
|
47 |
if chunk.get("start", False) or chunk.get("end", False):
|
|
|
8 |
def format_response(chunk, full_response):
|
9 |
# Message
|
10 |
if chunk["type"] == "message":
|
11 |
+
full_response += chunk.get("content", "")
|
12 |
if chunk.get("end", False):
|
13 |
full_response += "\n"
|
14 |
|
|
|
30 |
|
31 |
# Console
|
32 |
if chunk["type"] == "console":
|
33 |
+
content = chunk.get("content", "").replace("`", "")
|
34 |
+
|
35 |
+
# 言語タグなしでコードブロックを開始
|
36 |
if chunk.get("start", False):
|
37 |
+
full_response += "```\n"
|
38 |
+
|
39 |
if chunk.get("format", "") == "active_line":
|
40 |
+
if not content:
|
41 |
+
full_response += "No output available on console.\n"
|
42 |
+
else:
|
43 |
+
full_response += content + "\n"
|
44 |
+
elif chunk.get("format", "") == "output":
|
45 |
+
full_response += content + "\n"
|
46 |
+
|
47 |
if chunk.get("end", False):
|
48 |
+
full_response += "```\n"
|
|
|
49 |
# Image
|
50 |
if chunk["type"] == "image":
|
51 |
if chunk.get("start", False) or chunk.get("end", False):
|