Ver código fonte

Fix missplace for vector sim weight and token sim weight. (#4627)

### What problem does this PR solve?

#4610

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.16.0
Kevin Hu 9 meses atrás
pai
commit
898ae7fa80
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2
    2
      api/apps/sdk/chat.py

+ 2
- 2
api/apps/sdk/chat.py Ver arquivo

res["prompt"] = renamed_dict res["prompt"] = renamed_dict
del res["prompt_config"] del res["prompt_config"]
new_dict = {"similarity_threshold": res["similarity_threshold"], new_dict = {"similarity_threshold": res["similarity_threshold"],
"keywords_similarity_weight": res["vector_similarity_weight"],
"keywords_similarity_weight": 1-res["vector_similarity_weight"],
"top_n": res["top_n"], "top_n": res["top_n"],
"rerank_model": res['rerank_id']} "rerank_model": res['rerank_id']}
res["prompt"].update(new_dict) res["prompt"].update(new_dict)
res["prompt"] = renamed_dict res["prompt"] = renamed_dict
del res["prompt_config"] del res["prompt_config"]
new_dict = {"similarity_threshold": res["similarity_threshold"], new_dict = {"similarity_threshold": res["similarity_threshold"],
"keywords_similarity_weight": res["vector_similarity_weight"],
"keywords_similarity_weight": 1-res["vector_similarity_weight"],
"top_n": res["top_n"], "top_n": res["top_n"],
"rerank_model": res['rerank_id']} "rerank_model": res['rerank_id']}
res["prompt"].update(new_dict) res["prompt"].update(new_dict)

Carregando…
Cancelar
Salvar