microsoft / semantic-kernel

Integrate cutting-edge LLM technology quickly and easily into your apps
https://aka.ms/semantic-kernel
MIT License
21.93k stars 3.27k forks source link

.Net: OpenAI connector issue with LiteLLM #7339

Closed sshrishipwc closed 2 months ago

sshrishipwc commented 3 months ago

We are in process to integrate Lite LLM with our application using semantic kernel. When we try to call Gemini from our application. As all these api are deployed on our side we are using OpenAi connector to make calls but getting below error.

Error Details

Exception :- Microsoft.SemanticKernel.HttpOperationException: 'Service request failed. Status: 500 (Internal Server Error)   Content: {"error":{"message":"VertexAIException - 400 Unable to submit request because the model does not support the presencePenalty parameter. Remove it and try again. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/overview \n\nKey Name: Beta Access Key\nTeam: AI Factory - Tech & Innovation\nModel: vertex_ai/gemini-1.0-pro\nAPI Base: us-central1-aiplatform.googleapis.com/v1/projects/pg-gx-p-app-518711/locations/us-central1/publishers/google/models/gemini-1.0-pro:streamGenerateContent\nMessages: [{'content': 'You are an AI assistant that helps people find information.', 'role': 'system'}, {'con\nmodel_group: vertex_ai.gemini-1.0-pro\n\ndeployment: vertex_ai/gemini-1.0-pro\n\nvertex_project: pg-gx-p-app-518711\n\nvertex_location: us-central1\n\nNumber Retries = 1","type":null,"param":null,"code":500}}   Headers: Date: Wed, 17 Jul 2024 20:26:34 GMT Server: istio-envoy x-envoy-upstream-service-time: REDACTED Content-Length: 842 Content-Type: application/json '

matthewbolanos commented 3 months ago

@SergeyMenshykh and @RogerBarreto, can y'all confirm if this will be fixed as part of y'all's changes moving to the new Azure OpenAI SDK?

RogerBarreto commented 3 months ago

Thats right @matthewbolanos with the changes of this:

This settings are going to be optional and not sent to the server side.

sshrishipwc commented 3 months ago

@RogerBarreto When we expect this to release? What version of SK we need to get this fix?

RogerBarreto commented 2 months ago

@sshrishipwc , please make sure you have your problem sorted using our 1.18.0-rc release candidate version. Looking forward to have a General Availability this week.