From 67298eaa6c01149c2fe62475c8fefbf332b2cae7 Mon Sep 17 00:00:00 2001 From: imotai Date: Tue, 10 Oct 2023 14:21:33 +0800 Subject: [PATCH 1/4] fix: adjust the sleep time --- agent/src/og_agent/prompt.py | 2 +- docker/Dockerfile | 2 +- up/src/og_up/up.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/agent/src/og_agent/prompt.py b/agent/src/og_agent/prompt.py index 3635c87..276ca2a 100644 --- a/agent/src/og_agent/prompt.py +++ b/agent/src/og_agent/prompt.py @@ -19,13 +19,13 @@ Secondly, Being an expert in programming, you must follow the rules * To complete the goal, You must write a plan and execute it step by step, the followings are examples - * The data visualization plan involves previewing, cleaning, and processing the data to generate the chart. * Every step must include the explanation and the code block * Execute the python code using function `execute_python_code` * If the code creates any files, add them to the saved_filenames of function `execute_python_code`. * If the code has any display data, save it as a file and add it to the saved_filenames of function `execute_python_code` * You must try to correct your code when you get errors from the output * Your code should produce output in Markdown format. For instance, if you're using a Pandas DataFrame to display data, make sure to utilize the to_markdown function. +* You must preview one row of the data when using pandas to process data Thirdly, the programming environment used to execute code has the following capabilities * Internet connection: This allows the programming environment to access online resources, such as documentation, libraries, and code repositories. diff --git a/docker/Dockerfile b/docker/Dockerfile index e1f39d3..8acfd86 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:22.04 RUN apt update RUN apt install -y python3 python3-pip RUN pip install -U og_proto og_sdk og_agent og_kernel hapless -RUN adduser octogen +RUN useradd -ms /bin/bash octogen ADD server /bin/ ADD start_all.sh /bin/ ADD add_endpoint.sh /bin/ diff --git a/up/src/og_up/up.py b/up/src/og_up/up.py index 9b26add..0643ac8 100644 --- a/up/src/og_up/up.py +++ b/up/src/og_up/up.py @@ -438,7 +438,7 @@ def start_service( result_code = code output += chunk pass - time.sleep(4) + time.sleep(6) segments.pop() if result_code == 0: segments.append(("✅", "Start octogen service", "")) From 7c2d83aa281e9586cefeaabef5af673abea8e086 Mon Sep 17 00:00:00 2001 From: imotai Date: Tue, 10 Oct 2023 15:45:02 +0800 Subject: [PATCH 2/4] fix: adjust the app name --- chat/src/og_terminal/terminal_chat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chat/src/og_terminal/terminal_chat.py b/chat/src/og_terminal/terminal_chat.py index 5ad1c2a..63c9264 100644 --- a/chat/src/og_terminal/terminal_chat.py +++ b/chat/src/og_terminal/terminal_chat.py @@ -348,7 +348,7 @@ def handle_final_answer(segments, respond, values): find_code(answer, segments, values) -def render_image(images, sdk, image_dir, console): +dey render_image(images, sdk, image_dir, console): try: from PIL import Image from term_image.image import AutoImage @@ -427,7 +427,7 @@ def run_app(name, sdk, session, console, values, filedir=None): def gen_app_panel(app): desc = app.desc if app.desc else "" date_str = datetime.fromtimestamp(app.ctime).strftime("%m/%d/%Y") - markdonw = f"""### {app.desc}{app.name} + markdonw = f"""### {app.desc} {app.name} created at {date_str} with {app.language}""" style = Style(bgcolor="#2e2e2e") return Panel(Markdown(markdonw), box=box.SIMPLE, title_align="left", style=style) From f715620c2abd5882fdab50da19168264aceaab8b Mon Sep 17 00:00:00 2001 From: imotai Date: Tue, 10 Oct 2023 15:56:15 +0800 Subject: [PATCH 3/4] fix: fix the terminal chat syntax error --- chat/src/og_terminal/terminal_chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chat/src/og_terminal/terminal_chat.py b/chat/src/og_terminal/terminal_chat.py index 63c9264..21b8999 100644 --- a/chat/src/og_terminal/terminal_chat.py +++ b/chat/src/og_terminal/terminal_chat.py @@ -348,7 +348,7 @@ def handle_final_answer(segments, respond, values): find_code(answer, segments, values) -dey render_image(images, sdk, image_dir, console): +def render_image(images, sdk, image_dir, console): try: from PIL import Image from term_image.image import AutoImage From 5165516f7d322930db8dd0cb23291fdba0657fb5 Mon Sep 17 00:00:00 2001 From: imotai Date: Tue, 10 Oct 2023 16:06:58 +0800 Subject: [PATCH 4/4] fix: revert the prompt --- agent/src/og_agent/prompt.py | 1 + 1 file changed, 1 insertion(+) diff --git a/agent/src/og_agent/prompt.py b/agent/src/og_agent/prompt.py index 276ca2a..29518cd 100644 --- a/agent/src/og_agent/prompt.py +++ b/agent/src/og_agent/prompt.py @@ -19,6 +19,7 @@ Secondly, Being an expert in programming, you must follow the rules * To complete the goal, You must write a plan and execute it step by step, the followings are examples + * The data visualization plan involves previewing, cleaning, and processing the data to generate the chart. * Every step must include the explanation and the code block * Execute the python code using function `execute_python_code` * If the code creates any files, add them to the saved_filenames of function `execute_python_code`.