You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/profiles.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@ Profiles are Python files that configure Open Interpreter. A wide range of field
8
8
9
9
You can access your Profiles by running `interpreter --profiles`. This will open the directory where all of your Profiles are stored.
10
10
11
+
If you want to make your own profile, start with the [Template Profile](https://github.com/OpenInterpreter/open-interpreter/blob/main/interpreter/terminal_interface/profiles/defaults/template_profile.py).
12
+
11
13
To apply a Profile to an Open Interpreter session, you can run `interpreter --profile <name>`
Copy file name to clipboardExpand all lines: interpreter/core/respond.py
+17-17Lines changed: 17 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -98,8 +98,10 @@ def respond(interpreter):
98
98
"""
99
99
)
100
100
break
101
-
# Provide extra information on how to change API keys, if we encounter that error
102
-
# (Many people writing GitHub issues were struggling with this)
101
+
102
+
# Provide extra information on how to change API keys, if we encounter that error
103
+
# (Many people writing GitHub issues were struggling with this)
104
+
103
105
exceptExceptionase:
104
106
error_message=str(e).lower()
105
107
if (
@@ -115,36 +117,34 @@ def respond(interpreter):
115
117
interpreter.offline==Falseand"not have access"instr(e).lower()
116
118
):
117
119
"""
118
-
Check for invalid model in error message and then fallback to groq, then OpenAI.
120
+
Check for invalid model in error message and then fallback.
119
121
"""
120
122
if (
121
123
"invalid model"inerror_message
122
124
or"model does not exist"inerror_message
123
125
):
124
-
provider_message=f" The model '{interpreter.llm.model}' does not exist or is invalid. Please check the model name and try again.\n\nWould you like to try an alternative model instead? (y/n)\n\n "
126
+
provider_message=f"\n\nThe model '{interpreter.llm.model}' does not exist or is invalid. Please check the model name and try again.\n\nWould you like to try Open Interpreter's hosted `i` model instead? (y/n)\n\n "
125
127
elif"groq"inerror_message:
126
-
provider_message=f" You do not have access to {interpreter.llm.model}. Please check with Groq for more details.\n\nWould you like to try an alternative model instead? (y/n)\n\n "
128
+
provider_message=f"\n\nYou do not have access to {interpreter.llm.model}. Please check with Groq for more details.\n\nWould you like to try Open Interpreter's hosted `i` model instead? (y/n)\n\n "
127
129
else:
128
-
provider_message=f" You do not have access to {interpreter.llm.model}. You will need to add a payment method and purchase credits for the OpenAI API billing page (different from ChatGPT) to use `GPT-4`.\n\nhttps://platform.openai.com/account/billing/overview\n\nWould you like to try GPT-3.5-TURBO instead? (y/n)\n\n"
130
+
provider_message=f"\n\nYou do not have access to {interpreter.llm.model}. If you are using an OpenAI model, you may need to add a payment method and purchase credits for the OpenAI API billing page (this is different from ChatGPT Plus).\n\nhttps://platform.openai.com/account/billing/overview\n\nWould you like to try Open Interpreter's hosted `i` model instead? (y/n)\n\n"
129
131
130
-
response=input(provider_message)
132
+
print(provider_message)
133
+
134
+
response=input()
131
135
print("") # <- Aesthetic choice
132
136
133
137
ifresponse.strip().lower() =="y":
134
-
interpreter.llm.model="gpt-3.5-turbo-1106"
135
-
interpreter.llm.context_window=16000
136
-
interpreter.llm.max_tokens=4096
137
-
interpreter.llm.supports_functions=True
138
+
interpreter.llm.model="i"
139
+
display_markdown_message(f"> Model set to `i`")
138
140
display_markdown_message(
139
-
f"> Model set to `{interpreter.llm.model}`"
141
+
"***Note:*** *Conversations with this model will be used to train our open-source model.*\n"
140
142
)
143
+
141
144
else:
142
-
raiseException(
143
-
"\n\nYou will need to add a payment method and purchase credits for the OpenAI API billing page (different from ChatGPT) to use GPT-4.\n\nhttps://platform.openai.com/account/billing/overview"
{"role": "user", "type": "message", "content": "I "+message}
296
298
)
297
299
sys.argv=sys.argv[:1]
298
300
301
+
interpreter.custom_instructions="UPDATED INSTRUCTIONS: You are in ULTRA FAST, ULTRA CERTAIN mode. Do not ask the user any questions or run code to gathet information. Go as quickly as you can. Run code quickly. Do not plan out loud, simply start doing the best thing. The user expects speed. Trust that the user knows best. Just interpret their ambiguous command as quickly and certainly as possible and try to fulfill it IN ONE COMMAND, assuming they have the right information. If they tell you do to something, just do it quickly in one command, DO NOT try to get more information (for example by running `cat` to get a file's infomration— this is probably unecessary!). DIRECTLY DO THINGS AS FAST AS POSSIBLE."
302
+
303
+
files_in_directory=os.listdir()[:100]
304
+
interpreter.custom_instructions+= (
305
+
"\nThe files in CWD, which THE USER MAY BE REFERRING TO, are: "
306
+
+", ".join(files_in_directory)
307
+
)
308
+
309
+
# interpreter.debug = True
310
+
299
311
# Check for deprecated flags before parsing arguments
0 commit comments