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
Operating System: win11 ,ubuntu 22.04, docker for windows
**Browser (if applicable):**chrome latest
Reproduction Details
Confirmation:
I have read and followed all the instructions provided in the README.md.
I am on the latest version of both Open WebUI and Ollama.
I have included the browser console logs.
I have included the Docker container logs.
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]
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
- **Operating System:** win11 ,ubuntu 22.04, docker for windows
- **Browser (if applicable):**chrome latest
-
## Reproduction Details
**Confirmation:**
- [x] I have read and followed all the instructions provided in the README.md.
- [x] I am on the latest version of both Open WebUI and Ollama.
- [x] I have included the browser console logs.
- [x] I have included the Docker container logs.
## 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]
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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]