mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
fix(utils.py): bug fixes
This commit is contained in:
parent
0440168915
commit
f8d1720690
3 changed files with 4 additions and 3 deletions
|
@ -290,6 +290,7 @@ async def test_embedding_caching_azure_individual_items():
|
|||
embedding_val_2 = await aembedding(
|
||||
model="azure/azure-embedding-model", input=embedding_2, caching=True
|
||||
)
|
||||
print(f"embedding_val_2: {embedding_val_2}")
|
||||
if (
|
||||
embedding_val_2["data"][0]["embedding"]
|
||||
!= embedding_val_1["data"][0]["embedding"]
|
||||
|
|
|
@ -673,7 +673,7 @@ async def test_async_embedding_bedrock():
|
|||
response = await litellm.aembedding(
|
||||
model="bedrock/cohere.embed-multilingual-v3",
|
||||
input=["good morning from litellm"],
|
||||
aws_region_name="os.environ/AWS_REGION_NAME_2",
|
||||
aws_region_name="us-east-1",
|
||||
)
|
||||
await asyncio.sleep(1)
|
||||
print(f"customHandler_success.errors: {customHandler_success.errors}")
|
||||
|
|
|
@ -2341,7 +2341,7 @@ def client(original_function):
|
|||
for val in non_null_list:
|
||||
idx, cr = val # (idx, cr) tuple
|
||||
if cr is not None:
|
||||
final_embedding_cached_response.data[idx] = val
|
||||
final_embedding_cached_response.data[idx] = cr
|
||||
|
||||
if len(remaining_list) == 0:
|
||||
# LOG SUCCESS
|
||||
|
@ -2485,9 +2485,9 @@ def client(original_function):
|
|||
for item in final_embedding_cached_response.data:
|
||||
if item is None:
|
||||
final_data_list.append(result.data[idx])
|
||||
idx += 1
|
||||
else:
|
||||
final_data_list.append(item)
|
||||
idx += 1
|
||||
|
||||
final_embedding_cached_response.data = final_data_list
|
||||
return final_embedding_cached_response
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue