You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following change fixes the issue (tested locally):
response_json=response.json()
I'm submitting an issue and not a PR because I'm not familiar enough with the code base and the impact this change might have. Also I can't really write tests for a PR
Relevant log output
litellm-1 | Traceback (most recent call last):
litellm-1 | File "/usr/local/lib/python3.11/site-packages/litellm/main.py", line 3070, in aembedding
litellm-1 | response = await init_response # type: ignore
litellm-1 | ^^^^^^^^^^^^^^^^^^^
litellm-1 | File "/usr/local/lib/python3.11/site-packages/litellm/llms/ollama/completion/handler.py", line 77, in ollama_aembeddings
litellm-1 | response_json = await response.json()
litellm-1 | ^^^^^^^^^^^^^^^^^^^^^
litellm-1 | TypeError: object dict can't be used in 'await' expression
Are you a ML Ops Team?
No
What LiteLLM version are you on ?
ghcr.io/berriai/litellm:main-latest which at time of writing would be v1.55.8-stable
Twitter / LinkedIn details
No response
The text was updated successfully, but these errors were encountered:
What happened?
Using OpenAI sdk, LiteLLM proxy. When creating embeddings using Ollama
nomic-embed-text
, the proxy throws the following error.This issue comes from here, the
response
object is already awaited before, so there's no need for a secondawait
.litellm/litellm/llms/ollama/completion/handler.py
Line 55 in 8b1ea40
The following change fixes the issue (tested locally):
I'm submitting an issue and not a PR because I'm not familiar enough with the code base and the impact this change might have. Also I can't really write tests for a PR
Relevant log output
Are you a ML Ops Team?
No
What LiteLLM version are you on ?
ghcr.io/berriai/litellm:main-latest which at time of writing would be v1.55.8-stable
Twitter / LinkedIn details
No response
The text was updated successfully, but these errors were encountered: