Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: LiteLLM handler fails with Invalid empty array #9385

Open
credwise14 opened this issue Jun 21, 2024 · 1 comment
Open

[Bug]: LiteLLM handler fails with Invalid empty array #9385

credwise14 opened this issue Jun 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@credwise14
Copy link

Short description of current behavior

mindsdb.integrations.libs.ml_exec_base.MLEngineException: [litellm/litellm_handler_messages]: BadRequestError: OpenAIException - Error code: 400 - {'error': {'message': "Invalid 'functions': empty array. Expected an array with minimum length 1, but got an empty array instead.", 'type': 'invalid_request_error', 'param': 'functions', 'code': 'empty_array'}}

Video or screenshots

No response

Expected behavior

It should respond with completion text.

How to reproduce the error

create ML_Engine litellm_new2 from litellm;

create model litellm_handler_azure_new2
predict text
using
engine="litellm_new2",
model="azure/PROBZAI",
api_key="47c0683a3017430ab5d8a1c60fc48a0e",
base_url="https://probzsweden.openai.azure.com/",
api_version="2024-02-01"
;

select * from information_schema.models where name ="litellm_handler_azure_new2" ;

select * from litellm_handler_azure_new2 where text='Once upon a time';

Anything else?

Manged to fix the issue by :
litellm_handler/settings.py : Making function and function_call optional and commenting our llm_model_list

@credwise14 credwise14 added the bug Something isn't working label Jun 21, 2024
@Shahbaz898414
Copy link

assign me this issue plz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants