Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

docs: cited self-instruct paper (#1372)

AveryYayc9ef72c82823
diff --git a/README.md b/README.md
index 830654593..b1b883deb 100644
--- a/README.md
+++ b/README.md
@@ -357,6 +357,8 @@ We implemented amazing research ideas from other works for you to build, compare
- `PersonaHub` from *Tao Ge et al.*: [Scaling Synthetic Data Creation with 1,000,000,000 Personas](https://arxiv.org/pdf/2406.20094). [[Example](https://github.com/camel-ai/camel/blob/master/examples/personas/personas_generation.py)]
+- `Self-Instruct` from *Yizhong Wang et al.*: [SELF-INSTRUCT: Aligning Language Models with Self-Generated Instructions](https://arxiv.org/pdf/2212.10560). [[Example](https://github.com/camel-ai/camel/blob/master/examples/datagen/self_instruct/self_instruct.py)]
+
## Other Research Works Based on Camel
- [Agent Trust](http://agent-trust.camel-ai.org/): Can Large Language Model Agents Simulate Human Trust Behavior?
diff --git a/camel/datagen/__init__.py b/camel/datagen/__init__.py
index 843819c80..b5efe677a 100644
--- a/camel/datagen/__init__.py
+++ b/camel/datagen/__init__.py
@@ -13,5 +13,9 @@
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
from .o1datagen import O1DataGenerator
+from .self_instruct import SelfInstructPipeline
-__all__ = ['O1DataGenerator']
+__all__ = [
+ "O1DataGenerator",
+ "SelfInstructPipeline",
+]
diff --git a/camel/synthetic_datagen/self_instruct/__init__.py b/camel/datagen/self_instruct/__init__.py
similarity index 100%
rename from camel/synthetic_datagen/self_instruct/__init__.py
rename to camel/datagen/self_instruct/__init__.py
diff --git a/camel/synthetic_datagen/self_instruct/filter/__init__.py b/camel/datagen/self_instruct/filter/__init__.py
similarity index 100%
rename from camel/synthetic_datagen/self_instruct/filter/__init__.py
rename to camel/datagen/self_instruct/filter/__init__.py
diff --git a/camel/synthetic_datagen/self_instruct/filter/filter_function.py b/camel/datagen/self_instruct/filter/filter_function.py
similarity index 100%
rename from camel/synthetic_datagen/self_instruct/filter/filter_function.py
rename to camel/datagen/self_instruct/filter/filter_function.py
diff --git a/camel/synthetic_datagen/self_instruct/filter/filter_registry.py b/camel/datagen/self_instruct/filter/filter_registry.py
similarity index 100%
rename from camel/synthetic_datagen/self_instruct/filter/filter_registry.py
rename to camel/datagen/self_instruct/filter/filter_registry.py
diff --git a/camel/synthetic_datagen/self_instruct/filter/instruction_filter.py b/camel/datagen/self_instruct/filter/instruction_filter.py
similarity index 100%
rename from camel/synthetic_datagen/self_instruct/filter/instruction_filter.py
rename to camel/datagen/self_instruct/filter/instruction_filter.py
diff --git a/camel/synthetic_datagen/self_instruct/self_instruct.py b/camel/datagen/self_instruct/self_instruct.py
similarity index 100%
rename from camel/synthetic_datagen/self_instruct/self_instruct.py
rename to camel/datagen/self_instruct/self_instruct.py
diff --git a/camel/synthetic_datagen/self_instruct/templates.py b/camel/datagen/self_instruct/templates.py
similarity index 100%
rename from camel/synthetic_datagen/self_instruct/templates.py
rename to camel/datagen/self_instruct/templates.py
diff --git a/camel/synthetic_datagen/__init__.py b/camel/synthetic_datagen/__init__.py
deleted file mode 100644
index 78357c081..000000000
--- a/camel/synthetic_datagen/__init__.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
-from .self_instruct import SelfInstructPipeline
-
-__all__ = [
- "SelfInstructPipeline",
-]
diff --git a/camel/toolkits/search_toolkit.py b/camel/toolkits/search_toolkit.py
index de5d755e6..d9a87ee0a 100644
--- a/camel/toolkits/search_toolkit.py
+++ b/camel/toolkits/search_toolkit.py
@@ -65,7 +65,11 @@ class SearchToolkit(BaseToolkit):
return result
@dependencies_required("linkup")
- @api_keys_required("LINKUP_API_KEY")
+ @api_keys_required(
+ [
+ (None, "LINKUP_API_KEY"),
+ ]
+ )
def search_linkup(
self,
query: str,
diff --git a/examples/synthetic_datagen/self_instruct/self_instruct.py b/examples/synthetic_datagen/self_instruct/self_instruct.py
index e5a45439c..4be97956f 100644
--- a/examples/synthetic_datagen/self_instruct/self_instruct.py
+++ b/examples/synthetic_datagen/self_instruct/self_instruct.py
@@ -12,7 +12,7 @@
# limitations under the License.
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
from camel.agents import ChatAgent
-from camel.synthetic_datagen.self_instruct import SelfInstructPipeline
+from camel.datagen.self_instruct import SelfInstructPipeline
agent = ChatAgent()
diff --git a/test/synthetic_datagen/self_instruct/filter/filter_function_tests.py b/test/datagen/self_instruct/filter/filter_function_tests.py
similarity index 98%
rename from test/synthetic_datagen/self_instruct/filter/filter_function_tests.py
rename to test/datagen/self_instruct/filter/filter_function_tests.py
index 2f60898d9..28973dedc 100644
--- a/test/synthetic_datagen/self_instruct/filter/filter_function_tests.py
+++ b/test/datagen/self_instruct/filter/filter_function_tests.py
@@ -13,7 +13,7 @@
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
import unittest
-from camel.synthetic_datagen.self_instruct import (
+from camel.datagen.self_instruct import (
KeywordFilter,
LengthFilter,
NonEnglishFilter,
diff --git a/test/synthetic_datagen/self_instruct/filter/instruction_filter_tests.py b/test/datagen/self_instruct/filter/instruction_filter_tests.py
similarity index 98%
rename from test/synthetic_datagen/self_instruct/filter/instruction_filter_tests.py
rename to test/datagen/self_instruct/filter/instruction_filter_tests.py
index ded416aea..bfb54c707 100644
--- a/test/synthetic_datagen/self_instruct/filter/instruction_filter_tests.py
+++ b/test/datagen/self_instruct/filter/instruction_filter_tests.py
@@ -14,7 +14,7 @@
import unittest
from unittest.mock import MagicMock, patch
-from camel.synthetic_datagen.self_instruct import (
+from camel.datagen.self_instruct import (
FILTER_REGISTRY,
FilterFunction,
InstructionFilter,
diff --git a/test/synthetic_datagen/self_instruct/self_instruct_tests.py b/test/datagen/self_instruct/self_instruct_tests.py
similarity index 99%
rename from test/synthetic_datagen/self_instruct/self_instruct_tests.py
rename to test/datagen/self_instruct/self_instruct_tests.py
index 75b6c3369..64f9998a1 100644
--- a/test/synthetic_datagen/self_instruct/self_instruct_tests.py
+++ b/test/datagen/self_instruct/self_instruct_tests.py
@@ -15,7 +15,7 @@ import unittest
from unittest.mock import MagicMock, mock_open, patch
from camel.agents import ChatAgent
-from camel.synthetic_datagen.self_instruct import (
+from camel.datagen.self_instruct import (
InstructionFilter,
SelfInstructPipeline,
)