修复 args_hash在使用常规缓存时候才计算导致embedding缓存时没有计算的bug
This commit is contained in:
parent
6c29a37f20
commit
5dfb74ef2d
1 changed files with 0 additions and 4 deletions
|
|
@ -162,7 +162,6 @@ async def azure_openai_complete_if_cache(
|
||||||
if prompt is not None:
|
if prompt is not None:
|
||||||
messages.append({"role": "user", "content": prompt})
|
messages.append({"role": "user", "content": prompt})
|
||||||
|
|
||||||
hashing_kv: BaseKVStorage = kwargs.pop("hashing_kv", None)
|
|
||||||
if hashing_kv is not None:
|
if hashing_kv is not None:
|
||||||
# Calculate args_hash only when using cache
|
# Calculate args_hash only when using cache
|
||||||
args_hash = compute_args_hash(model, messages)
|
args_hash = compute_args_hash(model, messages)
|
||||||
|
|
@ -373,7 +372,6 @@ async def hf_model_if_cache(
|
||||||
messages.extend(history_messages)
|
messages.extend(history_messages)
|
||||||
messages.append({"role": "user", "content": prompt})
|
messages.append({"role": "user", "content": prompt})
|
||||||
|
|
||||||
hashing_kv: BaseKVStorage = kwargs.pop("hashing_kv", None)
|
|
||||||
if hashing_kv is not None:
|
if hashing_kv is not None:
|
||||||
# Calculate args_hash only when using cache
|
# Calculate args_hash only when using cache
|
||||||
args_hash = compute_args_hash(model, messages)
|
args_hash = compute_args_hash(model, messages)
|
||||||
|
|
@ -491,7 +489,6 @@ async def ollama_model_if_cache(
|
||||||
messages.extend(history_messages)
|
messages.extend(history_messages)
|
||||||
messages.append({"role": "user", "content": prompt})
|
messages.append({"role": "user", "content": prompt})
|
||||||
|
|
||||||
hashing_kv: BaseKVStorage = kwargs.pop("hashing_kv", None)
|
|
||||||
if hashing_kv is not None:
|
if hashing_kv is not None:
|
||||||
# Calculate args_hash only when using cache
|
# Calculate args_hash only when using cache
|
||||||
args_hash = compute_args_hash(model, messages)
|
args_hash = compute_args_hash(model, messages)
|
||||||
|
|
@ -652,7 +649,6 @@ async def lmdeploy_model_if_cache(
|
||||||
messages.extend(history_messages)
|
messages.extend(history_messages)
|
||||||
messages.append({"role": "user", "content": prompt})
|
messages.append({"role": "user", "content": prompt})
|
||||||
|
|
||||||
hashing_kv: BaseKVStorage = kwargs.pop("hashing_kv", None)
|
|
||||||
if hashing_kv is not None:
|
if hashing_kv is not None:
|
||||||
# Calculate args_hash only when using cache
|
# Calculate args_hash only when using cache
|
||||||
args_hash = compute_args_hash(model, messages)
|
args_hash = compute_args_hash(model, messages)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue