OpenInterpreter / 01

The open-source language model computer
http://openinterpreter.com/01
GNU Affero General Public License v3.0
4.75k stars 468 forks source link

Inconsistent Model Specification Behavior #269

Open zdaar opened 1 month ago

zdaar commented 1 month ago

Title: Inconsistent Model Specification Behavior in Open Interpreter

Describe the bug When attempting to specify a model using the --model flag in Open Interpreter, the system incorrectly handles the 'groq/' prefix by appending 'openai/' by default, which is confusing. There should be a clearer handling of prefixes.

To Reproduce Steps to reproduce the behavior:

  1. Open the terminal.
  2. Run the command interpreter --api_base "https://api.groq.com/openai/v1" --model "groq/Mixtral-8x7b-32768".
  3. Observe that the system appends 'openai/' to the model path instead of recognizing 'groq/'.

Expected behavior Correct handling of the provider. Groq should be supported without having to specify its api_base.

# This doesnt work, and is desired
interpreter --model "groq/llama3-8b-8192" --api_key "key_here"
# This doesnt work either
interpreter --api_base "https://api.groq.com/openai/v1" --model "groq/llama3-8b-8192" --api_key "key_here"
# This works
interpreter --api_base "https://api.groq.com/openai/v1" --model "llama3-8b-8192" --api_key "key_here"

Screenshots image image

image image

Desktop (please complete the following information):

Additional context