From 4fba0427ebebcda03d21c296b3a42ee5f790dd45 Mon Sep 17 00:00:00 2001 From: cecilia-uu <117628326+cecilia-uu@users.noreply.github.com> Date: Tue, 4 Jun 2024 09:50:47 +0800 Subject: [PATCH] added delete_dataset method (#1051) ### What problem does this PR solve? Added delete_dataset method and test for it. ### Type of change - [x] New Feature (non-breaking change which adds functionality) --- sdk/python/ragflow/ragflow.py | 2 ++ sdk/python/test/test_basic.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/sdk/python/ragflow/ragflow.py b/sdk/python/ragflow/ragflow.py index a3aabc5f631..4aefaf3b6c7 100644 --- a/sdk/python/ragflow/ragflow.py +++ b/sdk/python/ragflow/ragflow.py @@ -25,3 +25,5 @@ def __init__(self, user_key, base_url): def create_dataset(self, name): return name + def delete_dataset(self, name): + return name \ No newline at end of file diff --git a/sdk/python/test/test_basic.py b/sdk/python/test/test_basic.py index f784279f03a..9bae8e4cf71 100644 --- a/sdk/python/test/test_basic.py +++ b/sdk/python/test/test_basic.py @@ -10,3 +10,6 @@ def test_version(self): def test_create_dataset(self): assert ragflow.ragflow.RAGFLow('123', 'url').create_dataset('abc') == 'abc' + + def test_delete_dataset(self): + assert ragflow.ragflow.RAGFLow('123', 'url').delete_dataset('abc') == 'abc' \ No newline at end of file