File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ def create(tenant_id):
140
140
res ["prompt" ] = renamed_dict
141
141
del res ["prompt_config" ]
142
142
new_dict = {"similarity_threshold" : res ["similarity_threshold" ],
143
- "keywords_similarity_weight" : res ["vector_similarity_weight" ],
143
+ "keywords_similarity_weight" : 1 - res ["vector_similarity_weight" ],
144
144
"top_n" : res ["top_n" ],
145
145
"rerank_model" : res ['rerank_id' ]}
146
146
res ["prompt" ].update (new_dict )
@@ -304,7 +304,7 @@ def list_chat(tenant_id):
304
304
res ["prompt" ] = renamed_dict
305
305
del res ["prompt_config" ]
306
306
new_dict = {"similarity_threshold" : res ["similarity_threshold" ],
307
- "keywords_similarity_weight" : res ["vector_similarity_weight" ],
307
+ "keywords_similarity_weight" : 1 - res ["vector_similarity_weight" ],
308
308
"top_n" : res ["top_n" ],
309
309
"rerank_model" : res ['rerank_id' ]}
310
310
res ["prompt" ].update (new_dict )
You can’t perform that action at this time.
0 commit comments