mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-16 12:02:07 -05:00
The google gemini api gives an error when used in litellm. #619
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @flyfox666 on GitHub (Apr 10, 2024).
Bug Report
Description
Bug Summary:
The google gemini api gives an error when used in litellm,when use in chat, error show:
GenerationConfig.init() got an unexpected keyword argument 'num_ctx'
Steps to Reproduce:
add gemini api in webui ,then refresh ,then use the model to chat
Expected Behavior:
no error
Actual Behavior:
error showen
Environment
Reproduction Details
Confirmation:
Logs and Screenshots
Docker Container Logs:
[Include relevant Docker container logs, if applicable]
02:16:19 - LiteLLM Router:INFO: litellm.acompletion(model=gemini/gemini-pro) Exception GenerationConfig.init() got an unexpected keyword argument 'num_ctx'
INFO:LiteLLM Router:litellm.acompletion(model=gemini/gemini-pro) Exception GenerationConfig.init() got an unexpected keyword argument 'num_ctx'
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/litellm/llms/gemini.py", line 177, in async_streaming
generation_config=genai.types.GenerationConfig(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: GenerationConfig.init() got an unexpected keyword argument 'num_ctx'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/litellm/main.py", line 279, in acompletion
response = await init_response
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/litellm/llms/gemini.py", line 192, in async_streaming
raise GeminiError(status_code=500, message=str(e))
Screenshots (if applicable):
[Attach any relevant screenshots to help illustrate the issue]