mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Test: Refactor test fixtures to use HttpApiAuth naming consistently (#8180)
### What problem does this PR solve? - Rename `api_key` fixture to `HttpApiAuth` across all test files - Update all dependent fixtures and test cases to use new naming - Maintain same functionality while improving naming clarity The rename better reflects the fixture's purpose as an HTTP API authentication helper rather than just an API key. ### Type of change - [x] Refactoring
This commit is contained in:
@ -28,13 +28,13 @@ def condition(_auth, _dataset_id):
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
def add_chat_assistants_func(request, api_key, add_document):
|
||||
def add_chat_assistants_func(request, HttpApiAuth, add_document):
|
||||
def cleanup():
|
||||
delete_chat_assistants(api_key)
|
||||
delete_chat_assistants(HttpApiAuth)
|
||||
|
||||
request.addfinalizer(cleanup)
|
||||
|
||||
dataset_id, document_id = add_document
|
||||
parse_documents(api_key, dataset_id, {"document_ids": [document_id]})
|
||||
condition(api_key, dataset_id)
|
||||
return dataset_id, document_id, batch_create_chat_assistants(api_key, 5)
|
||||
parse_documents(HttpApiAuth, dataset_id, {"document_ids": [document_id]})
|
||||
condition(HttpApiAuth, dataset_id)
|
||||
return dataset_id, document_id, batch_create_chat_assistants(HttpApiAuth, 5)
|
||||
|
||||
@ -54,14 +54,14 @@ class TestChatAssistantCreate:
|
||||
({"name": "case insensitive"}, 102, "Duplicated chat name in creating chat."),
|
||||
],
|
||||
)
|
||||
def test_name(self, api_key, add_chunks, payload, expected_code, expected_message):
|
||||
def test_name(self, HttpApiAuth, add_chunks, payload, expected_code, expected_message):
|
||||
payload["dataset_ids"] = [] # issues/
|
||||
if payload["name"] == "duplicated_name":
|
||||
create_chat_assistant(api_key, payload)
|
||||
create_chat_assistant(HttpApiAuth, payload)
|
||||
elif payload["name"] == "case insensitive":
|
||||
create_chat_assistant(api_key, {"name": payload["name"].upper()})
|
||||
create_chat_assistant(HttpApiAuth, {"name": payload["name"].upper()})
|
||||
|
||||
res = create_chat_assistant(api_key, payload)
|
||||
res = create_chat_assistant(HttpApiAuth, payload)
|
||||
assert res["code"] == expected_code, res
|
||||
if expected_code == 0:
|
||||
assert res["data"]["name"] == payload["name"]
|
||||
@ -78,7 +78,7 @@ class TestChatAssistantCreate:
|
||||
("invalid_dataset_id", 102, "You don't own the dataset i"),
|
||||
],
|
||||
)
|
||||
def test_dataset_ids(self, api_key, add_chunks, dataset_ids, expected_code, expected_message):
|
||||
def test_dataset_ids(self, HttpApiAuth, add_chunks, dataset_ids, expected_code, expected_message):
|
||||
dataset_id, _, _ = add_chunks
|
||||
payload = {"name": "ragflow test"}
|
||||
if callable(dataset_ids):
|
||||
@ -86,7 +86,7 @@ class TestChatAssistantCreate:
|
||||
else:
|
||||
payload["dataset_ids"] = dataset_ids
|
||||
|
||||
res = create_chat_assistant(api_key, payload)
|
||||
res = create_chat_assistant(HttpApiAuth, payload)
|
||||
assert res["code"] == expected_code, res
|
||||
if expected_code == 0:
|
||||
assert res["data"]["name"] == payload["name"]
|
||||
@ -94,10 +94,10 @@ class TestChatAssistantCreate:
|
||||
assert res["message"] == expected_message
|
||||
|
||||
@pytest.mark.p3
|
||||
def test_avatar(self, api_key, tmp_path):
|
||||
def test_avatar(self, HttpApiAuth, tmp_path):
|
||||
fn = create_image_file(tmp_path / "ragflow_test.png")
|
||||
payload = {"name": "avatar_test", "avatar": encode_avatar(fn), "dataset_ids": []}
|
||||
res = create_chat_assistant(api_key, payload)
|
||||
res = create_chat_assistant(HttpApiAuth, payload)
|
||||
assert res["code"] == 0
|
||||
|
||||
@pytest.mark.p2
|
||||
@ -135,10 +135,10 @@ class TestChatAssistantCreate:
|
||||
pytest.param({"unknown": "unknown"}, 0, "", marks=pytest.mark.skip),
|
||||
],
|
||||
)
|
||||
def test_llm(self, api_key, add_chunks, llm, expected_code, expected_message):
|
||||
def test_llm(self, HttpApiAuth, add_chunks, llm, expected_code, expected_message):
|
||||
dataset_id, _, _ = add_chunks
|
||||
payload = {"name": "llm_test", "dataset_ids": [dataset_id], "llm": llm}
|
||||
res = create_chat_assistant(api_key, payload)
|
||||
res = create_chat_assistant(HttpApiAuth, payload)
|
||||
assert res["code"] == expected_code
|
||||
if expected_code == 0:
|
||||
if llm:
|
||||
@ -202,10 +202,10 @@ class TestChatAssistantCreate:
|
||||
pytest.param({"unknown": "unknown"}, 0, "", marks=pytest.mark.skip),
|
||||
],
|
||||
)
|
||||
def test_prompt(self, api_key, add_chunks, prompt, expected_code, expected_message):
|
||||
def test_prompt(self, HttpApiAuth, add_chunks, prompt, expected_code, expected_message):
|
||||
dataset_id, _, _ = add_chunks
|
||||
payload = {"name": "prompt_test", "dataset_ids": [dataset_id], "prompt": prompt}
|
||||
res = create_chat_assistant(api_key, payload)
|
||||
res = create_chat_assistant(HttpApiAuth, payload)
|
||||
assert res["code"] == expected_code
|
||||
if expected_code == 0:
|
||||
if prompt:
|
||||
@ -233,9 +233,9 @@ class TestChatAssistantCreate:
|
||||
|
||||
class TestChatAssistantCreate2:
|
||||
@pytest.mark.p2
|
||||
def test_unparsed_document(self, api_key, add_document):
|
||||
def test_unparsed_document(self, HttpApiAuth, add_document):
|
||||
dataset_id, _ = add_document
|
||||
payload = {"name": "prompt_test", "dataset_ids": [dataset_id]}
|
||||
res = create_chat_assistant(api_key, payload)
|
||||
res = create_chat_assistant(HttpApiAuth, payload)
|
||||
assert res["code"] == 102
|
||||
assert "doesn't own parsed file" in res["message"]
|
||||
|
||||
@ -52,16 +52,16 @@ class TestChatAssistantsDelete:
|
||||
pytest.param(lambda r: {"ids": r}, 0, "", 0, marks=pytest.mark.p1),
|
||||
],
|
||||
)
|
||||
def test_basic_scenarios(self, api_key, add_chat_assistants_func, payload, expected_code, expected_message, remaining):
|
||||
def test_basic_scenarios(self, HttpApiAuth, add_chat_assistants_func, payload, expected_code, expected_message, remaining):
|
||||
_, _, chat_assistant_ids = add_chat_assistants_func
|
||||
if callable(payload):
|
||||
payload = payload(chat_assistant_ids)
|
||||
res = delete_chat_assistants(api_key, payload)
|
||||
res = delete_chat_assistants(HttpApiAuth, payload)
|
||||
assert res["code"] == expected_code
|
||||
if res["code"] != 0:
|
||||
assert res["message"] == expected_message
|
||||
|
||||
res = list_chat_assistants(api_key)
|
||||
res = list_chat_assistants(HttpApiAuth)
|
||||
assert len(res["data"]) == remaining
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@ -72,55 +72,55 @@ class TestChatAssistantsDelete:
|
||||
pytest.param(lambda r: {"ids": r + ["invalid_id"]}, marks=pytest.mark.p3),
|
||||
],
|
||||
)
|
||||
def test_delete_partial_invalid_id(self, api_key, add_chat_assistants_func, payload):
|
||||
def test_delete_partial_invalid_id(self, HttpApiAuth, add_chat_assistants_func, payload):
|
||||
_, _, chat_assistant_ids = add_chat_assistants_func
|
||||
if callable(payload):
|
||||
payload = payload(chat_assistant_ids)
|
||||
res = delete_chat_assistants(api_key, payload)
|
||||
res = delete_chat_assistants(HttpApiAuth, payload)
|
||||
assert res["code"] == 0
|
||||
assert res["data"]["errors"][0] == "Assistant(invalid_id) not found."
|
||||
assert res["data"]["success_count"] == 5
|
||||
|
||||
res = list_chat_assistants(api_key)
|
||||
res = list_chat_assistants(HttpApiAuth)
|
||||
assert len(res["data"]) == 0
|
||||
|
||||
@pytest.mark.p3
|
||||
def test_repeated_deletion(self, api_key, add_chat_assistants_func):
|
||||
def test_repeated_deletion(self, HttpApiAuth, add_chat_assistants_func):
|
||||
_, _, chat_assistant_ids = add_chat_assistants_func
|
||||
res = delete_chat_assistants(api_key, {"ids": chat_assistant_ids})
|
||||
res = delete_chat_assistants(HttpApiAuth, {"ids": chat_assistant_ids})
|
||||
assert res["code"] == 0
|
||||
|
||||
res = delete_chat_assistants(api_key, {"ids": chat_assistant_ids})
|
||||
res = delete_chat_assistants(HttpApiAuth, {"ids": chat_assistant_ids})
|
||||
assert res["code"] == 102
|
||||
assert "not found" in res["message"]
|
||||
|
||||
@pytest.mark.p3
|
||||
def test_duplicate_deletion(self, api_key, add_chat_assistants_func):
|
||||
def test_duplicate_deletion(self, HttpApiAuth, add_chat_assistants_func):
|
||||
_, _, chat_assistant_ids = add_chat_assistants_func
|
||||
res = delete_chat_assistants(api_key, {"ids": chat_assistant_ids + chat_assistant_ids})
|
||||
res = delete_chat_assistants(HttpApiAuth, {"ids": chat_assistant_ids + chat_assistant_ids})
|
||||
assert res["code"] == 0
|
||||
assert "Duplicate assistant ids" in res["data"]["errors"][0]
|
||||
assert res["data"]["success_count"] == 5
|
||||
|
||||
res = list_chat_assistants(api_key)
|
||||
res = list_chat_assistants(HttpApiAuth)
|
||||
assert res["code"] == 0
|
||||
|
||||
@pytest.mark.p3
|
||||
def test_concurrent_deletion(self, api_key):
|
||||
def test_concurrent_deletion(self, HttpApiAuth):
|
||||
count = 100
|
||||
ids = batch_create_chat_assistants(api_key, count)
|
||||
ids = batch_create_chat_assistants(HttpApiAuth, count)
|
||||
|
||||
with ThreadPoolExecutor(max_workers=5) as executor:
|
||||
futures = [executor.submit(delete_chat_assistants, api_key, {"ids": ids[i : i + 1]}) for i in range(count)]
|
||||
futures = [executor.submit(delete_chat_assistants, HttpApiAuth, {"ids": ids[i : i + 1]}) for i in range(count)]
|
||||
responses = list(as_completed(futures))
|
||||
assert len(responses) == count, responses
|
||||
assert all(future.result()["code"] == 0 for future in futures)
|
||||
|
||||
@pytest.mark.p3
|
||||
def test_delete_10k(self, api_key):
|
||||
ids = batch_create_chat_assistants(api_key, 1_000)
|
||||
res = delete_chat_assistants(api_key, {"ids": ids})
|
||||
def test_delete_10k(self, HttpApiAuth):
|
||||
ids = batch_create_chat_assistants(HttpApiAuth, 1_000)
|
||||
res = delete_chat_assistants(HttpApiAuth, {"ids": ids})
|
||||
assert res["code"] == 0
|
||||
|
||||
res = list_chat_assistants(api_key)
|
||||
res = list_chat_assistants(HttpApiAuth)
|
||||
assert len(res["data"]) == 0
|
||||
|
||||
@ -43,8 +43,8 @@ class TestAuthorization:
|
||||
@pytest.mark.usefixtures("add_chat_assistants")
|
||||
class TestChatAssistantsList:
|
||||
@pytest.mark.p1
|
||||
def test_default(self, api_key):
|
||||
res = list_chat_assistants(api_key)
|
||||
def test_default(self, HttpApiAuth):
|
||||
res = list_chat_assistants(HttpApiAuth)
|
||||
assert res["code"] == 0
|
||||
assert len(res["data"]) == 5
|
||||
|
||||
@ -73,8 +73,8 @@ class TestChatAssistantsList:
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_page(self, api_key, params, expected_code, expected_page_size, expected_message):
|
||||
res = list_chat_assistants(api_key, params=params)
|
||||
def test_page(self, HttpApiAuth, params, expected_code, expected_page_size, expected_message):
|
||||
res = list_chat_assistants(HttpApiAuth, params=params)
|
||||
assert res["code"] == expected_code
|
||||
if expected_code == 0:
|
||||
assert len(res["data"]) == expected_page_size
|
||||
@ -108,13 +108,13 @@ class TestChatAssistantsList:
|
||||
)
|
||||
def test_page_size(
|
||||
self,
|
||||
api_key,
|
||||
HttpApiAuth,
|
||||
params,
|
||||
expected_code,
|
||||
expected_page_size,
|
||||
expected_message,
|
||||
):
|
||||
res = list_chat_assistants(api_key, params=params)
|
||||
res = list_chat_assistants(HttpApiAuth, params=params)
|
||||
assert res["code"] == expected_code
|
||||
if expected_code == 0:
|
||||
assert len(res["data"]) == expected_page_size
|
||||
@ -146,13 +146,13 @@ class TestChatAssistantsList:
|
||||
)
|
||||
def test_orderby(
|
||||
self,
|
||||
api_key,
|
||||
HttpApiAuth,
|
||||
params,
|
||||
expected_code,
|
||||
assertions,
|
||||
expected_message,
|
||||
):
|
||||
res = list_chat_assistants(api_key, params=params)
|
||||
res = list_chat_assistants(HttpApiAuth, params=params)
|
||||
assert res["code"] == expected_code
|
||||
if expected_code == 0:
|
||||
if callable(assertions):
|
||||
@ -183,13 +183,13 @@ class TestChatAssistantsList:
|
||||
)
|
||||
def test_desc(
|
||||
self,
|
||||
api_key,
|
||||
HttpApiAuth,
|
||||
params,
|
||||
expected_code,
|
||||
assertions,
|
||||
expected_message,
|
||||
):
|
||||
res = list_chat_assistants(api_key, params=params)
|
||||
res = list_chat_assistants(HttpApiAuth, params=params)
|
||||
assert res["code"] == expected_code
|
||||
if expected_code == 0:
|
||||
if callable(assertions):
|
||||
@ -207,8 +207,8 @@ class TestChatAssistantsList:
|
||||
({"name": "unknown"}, 102, 0, "The chat doesn't exist"),
|
||||
],
|
||||
)
|
||||
def test_name(self, api_key, params, expected_code, expected_num, expected_message):
|
||||
res = list_chat_assistants(api_key, params=params)
|
||||
def test_name(self, HttpApiAuth, params, expected_code, expected_num, expected_message):
|
||||
res = list_chat_assistants(HttpApiAuth, params=params)
|
||||
assert res["code"] == expected_code
|
||||
if expected_code == 0:
|
||||
if params["name"] in [None, ""]:
|
||||
@ -230,7 +230,7 @@ class TestChatAssistantsList:
|
||||
)
|
||||
def test_id(
|
||||
self,
|
||||
api_key,
|
||||
HttpApiAuth,
|
||||
add_chat_assistants,
|
||||
chat_assistant_id,
|
||||
expected_code,
|
||||
@ -243,7 +243,7 @@ class TestChatAssistantsList:
|
||||
else:
|
||||
params = {"id": chat_assistant_id}
|
||||
|
||||
res = list_chat_assistants(api_key, params=params)
|
||||
res = list_chat_assistants(HttpApiAuth, params=params)
|
||||
assert res["code"] == expected_code
|
||||
if expected_code == 0:
|
||||
if params["id"] in [None, ""]:
|
||||
@ -265,7 +265,7 @@ class TestChatAssistantsList:
|
||||
)
|
||||
def test_name_and_id(
|
||||
self,
|
||||
api_key,
|
||||
HttpApiAuth,
|
||||
add_chat_assistants,
|
||||
chat_assistant_id,
|
||||
name,
|
||||
@ -279,7 +279,7 @@ class TestChatAssistantsList:
|
||||
else:
|
||||
params = {"id": chat_assistant_id, "name": name}
|
||||
|
||||
res = list_chat_assistants(api_key, params=params)
|
||||
res = list_chat_assistants(HttpApiAuth, params=params)
|
||||
assert res["code"] == expected_code
|
||||
if expected_code == 0:
|
||||
assert len(res["data"]) == expected_num
|
||||
@ -287,27 +287,27 @@ class TestChatAssistantsList:
|
||||
assert res["message"] == expected_message
|
||||
|
||||
@pytest.mark.p3
|
||||
def test_concurrent_list(self, api_key):
|
||||
def test_concurrent_list(self, HttpApiAuth):
|
||||
count = 100
|
||||
with ThreadPoolExecutor(max_workers=5) as executor:
|
||||
futures = [executor.submit(list_chat_assistants, api_key) for i in range(count)]
|
||||
futures = [executor.submit(list_chat_assistants, HttpApiAuth) for i in range(count)]
|
||||
responses = list(as_completed(futures))
|
||||
assert len(responses) == count, responses
|
||||
assert all(future.result()["code"] == 0 for future in futures)
|
||||
|
||||
@pytest.mark.p3
|
||||
def test_invalid_params(self, api_key):
|
||||
def test_invalid_params(self, HttpApiAuth):
|
||||
params = {"a": "b"}
|
||||
res = list_chat_assistants(api_key, params=params)
|
||||
res = list_chat_assistants(HttpApiAuth, params=params)
|
||||
assert res["code"] == 0
|
||||
assert len(res["data"]) == 5
|
||||
|
||||
@pytest.mark.p2
|
||||
def test_list_chats_after_deleting_associated_dataset(self, api_key, add_chat_assistants):
|
||||
def test_list_chats_after_deleting_associated_dataset(self, HttpApiAuth, add_chat_assistants):
|
||||
dataset_id, _, _ = add_chat_assistants
|
||||
res = delete_datasets(api_key, {"ids": [dataset_id]})
|
||||
res = delete_datasets(HttpApiAuth, {"ids": [dataset_id]})
|
||||
assert res["code"] == 0
|
||||
|
||||
res = list_chat_assistants(api_key)
|
||||
res = list_chat_assistants(HttpApiAuth)
|
||||
assert res["code"] == 0
|
||||
assert len(res["data"]) == 5
|
||||
|
||||
@ -51,13 +51,13 @@ class TestChatAssistantUpdate:
|
||||
pytest.param({"name": "TEST_CHAT_ASSISTANT_1"}, 102, "Duplicated chat name in updating chat.", marks=pytest.mark.p3),
|
||||
],
|
||||
)
|
||||
def test_name(self, api_key, add_chat_assistants_func, payload, expected_code, expected_message):
|
||||
def test_name(self, HttpApiAuth, add_chat_assistants_func, payload, expected_code, expected_message):
|
||||
_, _, chat_assistant_ids = add_chat_assistants_func
|
||||
|
||||
res = update_chat_assistant(api_key, chat_assistant_ids[0], payload)
|
||||
res = update_chat_assistant(HttpApiAuth, chat_assistant_ids[0], payload)
|
||||
assert res["code"] == expected_code, res
|
||||
if expected_code == 0:
|
||||
res = list_chat_assistants(api_key, {"id": chat_assistant_ids[0]})
|
||||
res = list_chat_assistants(HttpApiAuth, {"id": chat_assistant_ids[0]})
|
||||
assert res["data"][0]["name"] == payload.get("name")
|
||||
else:
|
||||
assert res["message"] == expected_message
|
||||
@ -71,7 +71,7 @@ class TestChatAssistantUpdate:
|
||||
pytest.param("invalid_dataset_id", 102, "You don't own the dataset i", marks=pytest.mark.p3),
|
||||
],
|
||||
)
|
||||
def test_dataset_ids(self, api_key, add_chat_assistants_func, dataset_ids, expected_code, expected_message):
|
||||
def test_dataset_ids(self, HttpApiAuth, add_chat_assistants_func, dataset_ids, expected_code, expected_message):
|
||||
dataset_id, _, chat_assistant_ids = add_chat_assistants_func
|
||||
payload = {"name": "ragflow test"}
|
||||
if callable(dataset_ids):
|
||||
@ -79,20 +79,20 @@ class TestChatAssistantUpdate:
|
||||
else:
|
||||
payload["dataset_ids"] = dataset_ids
|
||||
|
||||
res = update_chat_assistant(api_key, chat_assistant_ids[0], payload)
|
||||
res = update_chat_assistant(HttpApiAuth, chat_assistant_ids[0], payload)
|
||||
assert res["code"] == expected_code, res
|
||||
if expected_code == 0:
|
||||
res = list_chat_assistants(api_key, {"id": chat_assistant_ids[0]})
|
||||
res = list_chat_assistants(HttpApiAuth, {"id": chat_assistant_ids[0]})
|
||||
assert res["data"][0]["name"] == payload.get("name")
|
||||
else:
|
||||
assert res["message"] == expected_message
|
||||
|
||||
@pytest.mark.p3
|
||||
def test_avatar(self, api_key, add_chat_assistants_func, tmp_path):
|
||||
def test_avatar(self, HttpApiAuth, add_chat_assistants_func, tmp_path):
|
||||
dataset_id, _, chat_assistant_ids = add_chat_assistants_func
|
||||
fn = create_image_file(tmp_path / "ragflow_test.png")
|
||||
payload = {"name": "avatar_test", "avatar": encode_avatar(fn), "dataset_ids": [dataset_id]}
|
||||
res = update_chat_assistant(api_key, chat_assistant_ids[0], payload)
|
||||
res = update_chat_assistant(HttpApiAuth, chat_assistant_ids[0], payload)
|
||||
assert res["code"] == 0
|
||||
|
||||
@pytest.mark.p3
|
||||
@ -130,13 +130,13 @@ class TestChatAssistantUpdate:
|
||||
pytest.param({"unknown": "unknown"}, 0, "", marks=pytest.mark.skip),
|
||||
],
|
||||
)
|
||||
def test_llm(self, api_key, add_chat_assistants_func, llm, expected_code, expected_message):
|
||||
def test_llm(self, HttpApiAuth, add_chat_assistants_func, llm, expected_code, expected_message):
|
||||
dataset_id, _, chat_assistant_ids = add_chat_assistants_func
|
||||
payload = {"name": "llm_test", "dataset_ids": [dataset_id], "llm": llm}
|
||||
res = update_chat_assistant(api_key, chat_assistant_ids[0], payload)
|
||||
res = update_chat_assistant(HttpApiAuth, chat_assistant_ids[0], payload)
|
||||
assert res["code"] == expected_code
|
||||
if expected_code == 0:
|
||||
res = list_chat_assistants(api_key, {"id": chat_assistant_ids[0]})
|
||||
res = list_chat_assistants(HttpApiAuth, {"id": chat_assistant_ids[0]})
|
||||
if llm:
|
||||
for k, v in llm.items():
|
||||
assert res["data"][0]["llm"][k] == v
|
||||
@ -198,13 +198,13 @@ class TestChatAssistantUpdate:
|
||||
pytest.param({"unknown": "unknown"}, 0, "", marks=pytest.mark.skip),
|
||||
],
|
||||
)
|
||||
def test_prompt(self, api_key, add_chat_assistants_func, prompt, expected_code, expected_message):
|
||||
def test_prompt(self, HttpApiAuth, add_chat_assistants_func, prompt, expected_code, expected_message):
|
||||
dataset_id, _, chat_assistant_ids = add_chat_assistants_func
|
||||
payload = {"name": "prompt_test", "dataset_ids": [dataset_id], "prompt": prompt}
|
||||
res = update_chat_assistant(api_key, chat_assistant_ids[0], payload)
|
||||
res = update_chat_assistant(HttpApiAuth, chat_assistant_ids[0], payload)
|
||||
assert res["code"] == expected_code
|
||||
if expected_code == 0:
|
||||
res = list_chat_assistants(api_key, {"id": chat_assistant_ids[0]})
|
||||
res = list_chat_assistants(HttpApiAuth, {"id": chat_assistant_ids[0]})
|
||||
if prompt:
|
||||
for k, v in prompt.items():
|
||||
if k == "keywords_similarity_weight":
|
||||
|
||||
Reference in New Issue
Block a user