OpenInterpreter / open-interpreter

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

litellm.exceptions.ServiceUnavailableError: AnthropicException - anthropic does not support parameters: {'functions' #1240

Open nobu007 opened 2 months ago

nobu007 commented 2 months ago

Describe the bug

litellm.exceptions.ServiceUnavailableError: AnthropicException - anthropic does not support parameters: {'functions': [{'name': 'execute', 'description': "Executes code on the user's machine **in the users local environment** and returns the output", 'parameters': {'type': 'object', 'properties': {'language': {'type': 'string', 'description': 'The programming language (required parameter to the `execute` function)', 'enum': ['ruby', 'python', 'shell', 'javascript', 'html', 'applescript', 'r', 'powershell', 'react']}, 'code': {'type': 'string', 'description': 'The code to execute (required)'}}, 'required': ['language', 'code']}}]}. To drop these, set `litellm.drop_params=True` or for proxy:

`litellm_settings:
 drop_params: true`

Reproduce

  1. bash installers/oi-linux-installer.sh
  2. pyenv shell 3.11
  3. pip install -e .
  4. export ANTHROPIC_API_KEY=sk-XXXX
  5. interpreter --model claude-3-haiku-20240307 -y
  6. Enter any prompt like "pythonで円周率をprintするプログラムを書いてください".

Expected behavior

Works fine.

Screenshots

キャプチャ

Open Interpreter version

0.2.5

Python version

3.11.7

Operating System name and version

Ubuntu 23.04

Additional context

interpreter --model claude-3-haiku-20240307 -y --no-llm_supports_functions works fine. Why functions not works for claude-3?

This document shows functions of claude-3 should work(my litellm==1.35.29). https://litellm.vercel.app/docs/providers/anthropic