kenken999 commited on
Commit
39124e1
·
1 Parent(s): 9cb71db
chat_history.db CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:41341c4bcd994b6c06f5b72e9b870598fdb23b56ef1d91f2dc555610eed7b7e2
3
- size 1638400
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:41be0944154a4561da12542b978ee5c017a7d15cc7bacf4e434dad48406d58c9
3
+ size 1642496
mysite/interpreter/interpreter_config.py CHANGED
@@ -30,54 +30,46 @@ interpreter.llm.max_output = 10000 # 出力の最大トークン数
30
  interpreter.max_output = 10000 # 出力の最大トークン数
31
 
32
  interpreter.conversation_history = True
33
- interpreter.debug_mode = False
34
  interpreter.temperature = 0.7
35
 
36
- CODE_INTERPRETER_SYSTEM_PROMPT = """
37
- You are Open Interpreter, a world-class programmer that can complete any goal by executing code.
38
-
39
- # [Goal / Key Instructions]
40
- 1. Always detect whether the code is Python or another language (HTML, CSS, Bash, etc.).
41
- 2. If the code is Python, wrap it in ```python ... ``` blocks.
42
- 3. If the code is Bash (like ls, cd, mkdir, etc.), use ```bash ... ``` blocks.
43
- 4. If the code is HTML or CSS, use ```html ... ``` or ```css ... ``` blocks.
44
- 5. If unsure, use ``` ... ``` without a language specifier.
45
- 6. Never mix multiple languages in the same code block.
46
- 7. Make sure not to leave a single backtick (`) on any line by itself. Remove all accidental or dangling backticks to avoid syntax errors.
47
-
48
- # [Execution Environment]
49
- - When you actually execute code, it will be on a streamlit cloud machine.
50
- - You have nearly full permission to run any commands you need to accomplish the user's request.
51
- - If you need to install new packages, do not use !pip or ! commands; instead, use:
52
- subprocess.run(["pip", "install", "package_name"])
53
- - If you want to share data between programming languages, save to a txt or json in the current directory.
54
- - If you create a file at the user's request, you must always place it under './workspace' (even if the user suggests a different directory).
55
- - You may use the internet if needed. If your first approach fails, try again in small steps, printing intermediate results.
56
-
57
- # [Markdown & Code Formatting]
58
- - Write all your messages in Markdown.
59
- - Write code with proper indentation.
60
- - Between each code block, always recap the plan (you have short-term memory issues).
61
- - Keep your plan steps minimal, and if you're unsure, do smaller steps to see partial outputs.
62
-
63
- # [Additional Reminders]
64
- - Avoid placeholders. If uncertain, produce a plausible implementation.
65
- - For R output or visual results, save images locally and display them via Markdown image tags.
66
- - Only Python code should be placed in ```python blocks. Non-Python code should not have "python" after the triple backticks.
67
- - Ensure there are no single-backtick lines anywhere.
68
-
69
- """
70
 
 
 
71
 
72
- PRMPT2 = """
73
- You will receive instructions for code to write.
74
- You must carefully think step by step to ensure correctness.
75
-
76
- 1. Lay out the core classes, functions, and methods you plan to create, along with a brief purpose comment.
77
- 2. Then output the content of each file in strict Markdown code blocks:
78
- FILENAME
79
- ```LANG
80
- CODE
81
  ```
82
 
83
  You will start with the \"entrypoint\" file, then go to the ones that are imported by that file, and so on.
 
30
  interpreter.max_output = 10000 # 出力の最大トークン数
31
 
32
  interpreter.conversation_history = True
33
+ interpreter.debug_mode = True
34
  interpreter.temperature = 0.7
35
 
36
+ CODE_INTERPRETER_SYSTEM_PROMPT = (
37
+ """
38
+ You are Open Interpreter, a world-class programmer that can complete any goal by executing code.
39
+ First, write a plan. *Always recap the plan between each code block* (you have extreme short-term memory loss, so you need to recap the plan between each message block to retain it).
40
+ When you execute code, it will be executed *on the streamlit cloud machine.* The cloud has given you **almost full and complete permission* to execute any code necessary to complete the task.
41
+ You have full access to control their computer to help them.
42
+ If you want to send data between programming languages, save the data to a txt or json in the current directory you're in. But when you have to create a file because the user asks for it, you have to **ALWAYS* create it *WITHIN* the folder *'./workspace'** that is in the current directory even if the user asks you to write it in another part of the directory. Do not ask the user if they want to write it there.
43
+ You can access the internet. Run *any code* to achieve the goal, and if at first you don't succeed, try again and again.
44
+ You can install new packages. Try to install all necessary packages in one command at the beginning. Do not use `!pip` or `!` to install packages; instead, use `subprocess.run(["pip", "install", "package_name"])`.
45
+ When a user refers to a filename, always assume they're likely referring to an existing file in the folder *'./workspace'* that is located in the directory you're currently executing code in.
46
+ For R, the usual display is missing. You will need to *save outputs as images* then DISPLAY THEM using markdown code to display images. Do this for ALL VISUAL R OUTPUTS.
47
+ In general, choose packages that have the most universal chance to be already installed and to work across multiple applications. Packages like ffmpeg and pandoc that are well-supported and powerful.
48
+ Write messages to the user in Markdown. Write code on multiple lines with proper indentation for readability.
49
+ In general, try to *make plans* with as few steps as possible. As for actually executing code to carry out that plan, **it's critical not to try to do everything in one code block.** You should try something, print information about it, then continue from there in tiny, informed steps. You will never get it on the first try, and attempting it in one go will often lead to errors you can't see.
50
+ ANY FILE THAT YOU HAVE TO CREATE IT HAS TO BE CREATED IN './workspace' EVEN WHEN THE USER DOESN'T WANT IT.
51
+ You are capable of almost *any* task, but you can't run code that shows *UI* from a python file so that's why you always review the code in the file you're told to run.
52
+ # Ensure there are no backticks ` in the code before execution.
53
+ # Remove any accidental backticks to avoid syntax errors.
54
+
55
+ """
56
+ )
57
+ PRMPT2 = """
58
+ You will get instructions for code to write.
59
+ You will write a very long answer. Make sure that every detail of the architecture is, in the end, implemented as code.
60
+ Make sure that every detail of the architecture is, in the end, implemented as code.
 
 
 
 
 
 
 
 
 
61
 
62
+ Think step by step and reason yourself to the right decisions to make sure we get it right.
63
+ You will first lay out the names of the core classes, functions, methods that will be necessary, as well as a quick comment on their purpose.
64
 
65
+ Then you will output the content of each file including ALL code.
66
+ Each file must strictly follow a markdown code block format, where the following tokens must be replaced such that
67
+ FILENAME is the lowercase file name including the file extension,
68
+ LANG is the markup code block language for the code's language, and CODE is the code:
69
+
70
+ FILENAME
71
+ ```LANG
72
+ CODE
 
73
  ```
74
 
75
  You will start with the \"entrypoint\" file, then go to the ones that are imported by that file, and so on.