OpenInterpreter / open-interpreter

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

The prompt seems not to be suited for togetherAI models #993

Open racinmat opened 5 months ago

racinmat commented 5 months ago

Describe the bug

I am not able to get any reasonable input when using codellama hosted in togetherAI.

Reproduce

import os
os.environ["TOGETHERAI_API_KEY"] = "..."
from interpreter import interpreter
#interpreter.llm.model = "together_ai/togethercomputer/CodeLlama-34b-Instruct"
#interpreter.llm.model = "together_ai/codellama/CodeLlama-70b-Python-hf"
interpreter.llm.model = "together_ai/codellama/CodeLlama-70b-hf"
interpreter.llm.api_key = os.environ["TOGETHERAI_API_KEY"]
interpreter.chat("Please print hello world.")

I tried all 3 models above in jupyter notebook and the output was not properly formatted

Expected behavior

provide a code which is readable in jupyter notebook

Screenshots

image when I try it in https://api.together.xyz/playground/chat/codellama/CodeLlama-70b-Instruct-hf I get image

Open Interpreter version

0.2.0

Python version

3.10.12

Operating System name and version

linux, google colab

Additional context

No response

racinmat commented 5 months ago

This is my attempt using 34b models

PS C:\Users\E10270> interpreter --model together_ai/WizardLM/WizardCoder-Python-34B-V1.0

▌ Model set to together_ai/WizardLM/WizardCoder-Python-34B-V1.0

Open Interpreter will require approval before running code.

Use interpreter -y to bypass this.

Press CTRL-C to exit.
>  generate seaborn code for drawing histogram for all columns in all csv files in given directory

We were unable to determine the context window of this model. Defaulting to 3000.

If your model can handle more, run interpreter --context_window {token limit} --max_tokens {max tokens per response}.

Continuing...

  To generate a seaborn histogram for all columns in all CSV files in a given directory, you can use the following steps:\n\n1. Install the required libraries:\n

> write code for drawing histogram for all columns in all csv files in given directory
> write code for drawing histogram for all columns in all csv files in given directory

  To generate a seaborn histogram for all columns in all CSV files in a given directory, you can use the following steps:\n\n1. Install the required libraries:\n

>

  To generate a seaborn histogram for all columns in all CSV files in a given directory, you can use the following steps:\n\n1. Install the required libraries:\n

> continue

  To generate a seaborn histogram for all columns in all CSV files in a given directory, you can use the following steps:\n\n1. Install the required libraries:\n

> aand next

  To generate a seaborn histogram for all columns in all CSV files in a given directory, you can use the following steps:\n\n1. Install the required libraries:\n

> Add subtitles to all videos in /videos.

  To generate a seaborn histogram for all columns in all CSV files in a given directory, you can use the following steps:\n\n1. Install the required libraries:\n

>
PS C:\Users\E10270> interpreter --model together_ai/togethercomputer/CodeLlama-34b-Instruct

▌ Model set to together_ai/togethercomputer/CodeLlama-34b-Instruct

Open Interpreter will require approval before running code.

Use interpreter -y to bypass this.

Press CTRL-C to exit.

>  Add subtitles to all videos in /videos.

We were unable to determine the context window of this model. Defaulting to 3000.

If your model can handle more, run interpreter --context_window {token limit} --max_tokens {max tokens per response}.

Continuing...

  Plan:\n\n1. Installffmpeg andselenium usingpip\n2. Useffmpeg to extract the audio from the video\n3. Useselenium to automate the process of downloading the subtitles from the website\n4. Useffmpeg to merge
  the audio and subtitles into a new video file\n\nNote: Make sure to use the correct version offfmpeg andselenium that is compatible with your operating system and Python version.\n\nCode Snippets:\n\n1.
  Installingffmpeg andselenium\n