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
f"\nYour computer should have enough RAM to run any model below.\n"
43
41
)
44
42
45
-
time.sleep(1)
46
-
47
43
interpreter.display_message(
48
44
f"In general, the larger the model, the better the performance, but choose a model that best fits your computer's hardware. \nOnly models you have the storage space to download are shown:\n"
] # Extract names, trim out ":latest", skip header
256
235
257
-
ifllama3_installed:
258
-
interpreter.display_message(
259
-
f"**{len(names)} Ollama model{'s'iflen(names) !=1else''} found.** To download a new model, run `ollama run <model-name>`, then start a new interpreter session. \n\n For a full list of downloadable models, check out [https://ollama.com/library](https://ollama.com/library) \n"
260
-
)
236
+
formodelin ["llama3", "phi3", "wizardlm2"]:
237
+
ifmodelnotinnames:
238
+
names.append("→ Download "+model)
261
239
262
240
# Create a new inquirer selection from the names
263
241
name_question= [
264
242
inquirer.List(
265
243
"name",
266
-
message="Select a downloaded Ollama model:"
267
-
ifllama3_installed
268
-
else"No models found. Select a model to install:",
244
+
message="Select a model",
269
245
choices=names,
270
246
),
271
247
]
@@ -276,17 +252,16 @@ def list_ollama_models():
276
252
277
253
selected_name=name_answer["name"]
278
254
279
-
ifselected_name=="llama3":
280
-
# If the user selects llama3, we need to check if it's installed, and if not, install it
"**Open Interpreter** will require approval before running code."
404
+
+"\n\nUse `interpreter -y` to bypass this."
405
+
+"\n\nPress `CTRL-C` to exit.\n"
406
+
)
407
+
422
408
# Set the system message to a minimal version for all local models.
423
409
interpreter.system_message="""
424
410
You are Open Interpreter, a world-class programmer that can execute code on the user's machine.
@@ -450,14 +436,14 @@ def list_ollama_models():
450
436
Now, your turn:
451
437
"""
452
438
453
-
interpreter.user_message_template="{content} Please send me some code that would be able to answer my question, in the form of ```python\n... the code ...\n``` or ```shell\n... the code ...\n```"
439
+
# interpreter.user_message_template = "{content} Please send me some code that would be able to answer my question, in the form of ```python\n... the code ...\n``` or ```shell\n... the code ...\n```"
454
440
interpreter.code_output_template="I executed that code. This was the ouput: {content}\n\nWhat does this output mean / what's next (if anything, or are we done)?"
455
441
interpreter.empty_code_output_template="The code above was executed on my machine. It produced no text output. what's next (if anything, or are we done?)"
456
442
interpreter.code_output_sender="user"
457
443
interpreter.max_output=500
458
444
interpreter.llm.context_window=8000
459
445
interpreter.force_task_completion=False
460
-
# interpreter.user_message_template = "{content}. If my question must be solved by running code on my computer, send me code to run enclosed in ```python or ```shell. Otherwise, don't send code and answer like a chatbot. Be concise, don't include anything unnecessary. Don't use placeholders, I can't edit code."
446
+
interpreter.user_message_template="{content}. If my question must be solved by running code on my computer, send me code to run enclosed in ```python or ```shell. Otherwise, don't send code. Be concise, don't include anything unnecessary. Don't use placeholders, I can't edit code."
0 commit comments