Feature: Allow page_size max value 100 (#15292)

Feature: Allow page_size max value 100
This commit is contained in:
Wang Qi
2026-05-28 11:13:01 +08:00
committed by GitHub
parent 0940f1a135
commit 0aff6a3f32
25 changed files with 110 additions and 43 deletions

View File

@@ -59,7 +59,7 @@ def delete_datasets(auth, payload=None, *, headers=HEADERS, data=None):
return res.json()
def delete_all_datasets(auth, *, page_size=1000):
def delete_all_datasets(auth, *, page_size=100):
return delete_datasets(auth, {"ids": None, "delete_all": True})
@@ -133,7 +133,7 @@ def delete_documents(auth, dataset_id, payload=None):
return res.json()
def delete_all_documents(auth, dataset_id, *, page_size=1000):
def delete_all_documents(auth, dataset_id, *, page_size=100):
return delete_documents(auth, dataset_id, {"ids": None, "delete_all": True})
@@ -192,7 +192,7 @@ def delete_chunks(auth, dataset_id, document_id, payload=None):
return res.json()
def delete_all_chunks(auth, dataset_id, document_id, *, page_size=1000):
def delete_all_chunks(auth, dataset_id, document_id, *, page_size=100):
return delete_chunks(auth, dataset_id, document_id, {"chunk_ids": None, "delete_all": True})
@@ -247,7 +247,7 @@ def delete_chat_assistants(auth, payload=None):
return res.json()
def delete_all_chat_assistants(auth, *, page_size=1000):
def delete_all_chat_assistants(auth, *, page_size=100):
return delete_chat_assistants(auth, {"ids": None, "delete_all": True})
@@ -284,7 +284,7 @@ def delete_session_with_chat_assistants(auth, chat_assistant_id, payload=None):
return res.json()
def delete_all_sessions_with_chat_assistant(auth, chat_assistant_id, *, page_size=1000):
def delete_all_sessions_with_chat_assistant(auth, chat_assistant_id, *, page_size=100):
return delete_session_with_chat_assistants(auth, chat_assistant_id, {"ids": None, "delete_all": True})
@@ -378,7 +378,7 @@ def delete_agent_sessions(auth, agent_id, payload=None):
return res.json()
def delete_all_agent_sessions(auth, agent_id, *, page_size=1000):
def delete_all_agent_sessions(auth, agent_id, *, page_size=100):
return delete_agent_sessions(auth, agent_id, {"ids": None, "delete_all": True})
@@ -525,4 +525,3 @@ def search_dataset(auth, dataset_id, payload=None, *, headers=HEADERS):
return res.json()

View File

@@ -58,7 +58,7 @@ def _agent_items(res):
@pytest.fixture(scope="function")
def agent_id(HttpApiAuth, request):
res = list_agents(HttpApiAuth, {"page_size": 1000})
res = list_agents(HttpApiAuth, {"page_size": 100})
assert res["code"] == 0, res
for agent in _agent_items(res):
if agent.get("title") == AGENT_TITLE:

View File

@@ -58,7 +58,7 @@ def _agent_items(res):
@pytest.fixture(scope="function")
def agent_id(HttpApiAuth, request):
res = list_agents(HttpApiAuth, {"page_size": 1000})
res = list_agents(HttpApiAuth, {"page_size": 100})
assert res["code"] == 0, res
for agent in _agent_items(res):
if agent.get("title") == AGENT_TITLE: