fix(utils.py): support caching individual items in embedding input list

https://github.com/BerriAI/litellm/issues/1350
This commit is contained in:
Krrish Dholakia 2024-01-11 16:51:34 +05:30
parent df9df7b040
commit 2cd5f0fbe9
2 changed files with 78 additions and 6 deletions

View file

@ -234,7 +234,7 @@ async def acompletion(
}
try:
# Use a partial function to pass your keyword arguments
func = partial(completion, **completion_kwargs, **kwargs)
func = partial(completion, **completion_kwargs)
# Add the context to the function
ctx = contextvars.copy_context()