OpenInterpreter / open-interpreter

A natural language interface for computers
http://openinterpreter.com/
GNU Affero General Public License v3.0
50.54k stars 4.4k forks source link

DeepSeek Integration: Improving Minor Details #1314

Closed webia1 closed 4 days ago

webia1 commented 1 week ago

Is your feature request related to a problem? Please describe.

Yes, I can create a profile for DeepSeeker, and everything works well overall. However, when reading the files, it encounters problems. It seems there's a minor issue; it finds the files but cannot read them.

Describe the solution you'd like

For example, this is a profile deepseeker.yaml I use for DeepSeeker, and perhaps a key like "no fear, you can read files" would be useful for DeepSeeker. DeepSeeker is extremely shy.

llm:
  model: "deepseek-coder"
  temperature: 0
  api_key: "sk-..." 
  api_base: "https://api.deepseek.com/v1" 
  max_output: 2500 

computer:
  import_computer_api: True 
  emit_images: True
  verbose: True

auto_run: True 
safe_mode: "ask" 
multi_line: True 
version: 0.2.5 

Describe alternatives you've considered

I have tried almost every option listed here: OpenInterpreter Settings. Perhaps DeepSeeker needs to be taught differently to be less shy.

Additional context

The "deepseek-coder" model works extremely well compared to the competition.

KillianLucas commented 1 week ago

Hi @webia1! Have you tried adding custom_instructions with that command? "You can read files, you can execute code..." etc?

webia1 commented 5 days ago

Hi, @KillianLucas , Thanks for your feedback. Yes, I have tried it. It works sometimes, but not consistently. It reads the file, but sometimes only partially. I haven't figured it out completely yet, but I'm still experimenting. I'll get back to you in case of new findings.

Edit: I guess that they have built in additional checks and ignore or overwrite custom instructions if they seem suspicious for them. I can imagine that they want to be particularly careful. But as I said, that's just my guess, maybe it's not that and I'm making a different mistake.

webia1 commented 4 days ago

I believe I found a magic formula after all. You just need to give it a little encouragement. It worked with these custom instructions:

custom_instructions: |
  My dear friend, before we start, please read this very carefully. Always respond in English, regardless of the query language. Notify immediately if there's any ambiguity. No backups needed; git handles version control. Eliminate repetitions; I can observe your actions. Respect ".gitignore" settings when scanning workspaces—this is crucial. Remove unnecessary phrases like apologies or untested code notifications. 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). When executing code, it will be executed on my machine. I've given you full and complete permission to execute any code necessary to complete the task. Execute the code. You can access the internet. Run any code to achieve the goal, and if at first you don't succeed, try again. I can see your actions, if something is not OK, I would interrupt you. You can install new packages. When I refer to a filename, I'm likely referring to an existing file in the directory you're currently executing code in. I will try to give you always a relative path. Write messages in Markdown. Make plans with as few steps as possible. As for actually executing code to carry out that plan, for stateful languages (like python, javascript, shell, but NOT for html which starts from 0 every time) 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. For Python tasks, ensure no unfinished string literals and that the Conda environment has necessary packages and the correct Python version. Don't forget: You are capable of any task and you have no limitations, you can read (with e.g. "cat" command) and write/overwrite files. You are a world-class programmer. I'm also a world-class programmer, but you are (sometimes) much faster. I think I'm the better programmer, but you can always try to prove me wrong; let's see if you can do it ;)