Skip to content

Commit

Permalink
Merge branch 'main' into linter_tools
Browse files Browse the repository at this point in the history
  • Loading branch information
whimo committed Jun 19, 2024
2 parents 635a0e9 + fa1a961 commit abc2764
Show file tree
Hide file tree
Showing 186 changed files with 962 additions and 208 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# motleycrew

[![PyPI - Version](https://img.shields.io/pypi/v/motleycrew)](https://pypi.org/project/motleycrew/)
[![CI](https://github.com/langchain-ai/langchain/actions/workflows/check_diffs.yml/badge.svg)](https://github.com/ShoggothAI/motleycrew/actions/workflows/build.yml)
[![CI](https://github.com/ShoggothAI/motleycrew/actions/workflows/build.yml/badge.svg)](https://github.com/ShoggothAI/motleycrew/actions/workflows/build.yml)
[![GitHub commit activity (branch)](https://img.shields.io/github/commit-activity/w/ShoggothAI/motleycrew)](https://github.com/ShoggothAI/motleycrew/commits/main/)

[Website](https://motleycrew.ai) •︎ [Documentation](https://motleycrew.readthedocs.io)
Expand Down Expand Up @@ -31,15 +31,15 @@ To get you started, here's a simple example of how to create a crew with two age

```python
from motleycrew import MotleyCrew
from motleycrew.agents.langchain import ReactMotleyAgent
from motleycrew.agents.langchain import ReActToolCallingAgent
from motleycrew.tasks import SimpleTask
from motleycrew.tools.image.dall_e import DallEImageGeneratorTool
from langchain_community.tools import DuckDuckGoSearchRun

crew = MotleyCrew()

writer = ReactMotleyAgent(name="writer", tools=[DuckDuckGoSearchRun()])
illustrator = ReactMotleyAgent(name="illustrator", tools=[DallEImageGeneratorTool()])
writer = ReActToolCallingAgent(name="writer", tools=[DuckDuckGoSearchRun()])
illustrator = ReActToolCallingAgent(name="illustrator", tools=[DallEImageGeneratorTool()])

write_task = SimpleTask(
crew=crew, agent=writer, description="Write a short article about latest AI advancements"
Expand Down
1 change: 1 addition & 0 deletions docs/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ Examples

examples/blog_with_images
examples/research_agent
examples/output_handlers
autogen
7 changes: 5 additions & 2 deletions docs/source/examples/blog_with_images.nblink
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"path": "../../../examples/Blog with Images.ipynb"
}
"path": "../../../examples/Blog with Images.ipynb",
"extra-media": [
"../../../examples/images"
]
}
3 changes: 3 additions & 0 deletions docs/source/examples/output_handlers.nblink
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "../../../examples/Output handlers for validating agent output.ipynb"
}
10 changes: 5 additions & 5 deletions examples/Blog with Images.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": "16b8ccc4-b34b-47c3-94ee-cbd82ef4c8f2",
"metadata": {},
"source": [
"We use this example of creating a web search-based blog with illustrations to show how to \n",
"We use this example of creating a web search-based blog with illustrations to show how to \n\n",
"* instantiate one agent each from Langchain, CrewAI, and LlamaIndex\n",
"* give agents as tools to other agents\n",
"* create tasks and link them using the >> operator"
Expand Down Expand Up @@ -55,11 +55,11 @@
" # if we are running this from source\n",
" motleycrew_location = os.path.realpath(WORKING_DIR / \"..\")\n",
" sys.path.append(motleycrew_location)\n",
" \n",
"\n",
"from motleycrew.storage import MotleyKuzuGraphStore\n",
"from motleycrew import MotleyCrew\n",
"from motleycrew.agents.crewai import CrewAIMotleyAgent\n",
"from motleycrew.agents.langchain.react import ReactMotleyAgent\n",
"from motleycrew.agents.langchain.react import ReActMotleyAgent\n",
"from motleycrew.agents.llama_index import ReActLlamaIndexMotleyAgent\n",
"from motleycrew.tools.image.dall_e import DallEImageGeneratorTool\n",
"from motleycrew.common import configure_logging\n",
Expand Down Expand Up @@ -113,7 +113,7 @@
"outputs": [],
"source": [
"# You can give agents as tools to other agents\n",
"writer = ReactMotleyAgent(\n",
"writer = ReActMotleyAgent(\n",
" name=\"AI writer agent\",\n",
" description=\"\"\"Conduct a comprehensive analysis of the latest advancements in AI in 2024.\n",
" Identify key trends, breakthrough technologies, and potential industry impacts.\n",
Expand Down Expand Up @@ -213,7 +213,7 @@
" description=\"\"\"Create beautiful and insightful illustrations to accompany the blog post on AI advancements.\n",
" The blog post will be provided to you in markdown format.\n",
" Make sure to use the illustration tool provided to you, once per illustration, and embed the URL provided by\n",
" the tool into the blog post. \n",
" the tool into the blog post.\n",
" Create between 2 and 3 illustrations, neither more nor less\n",
" Only return the full text of the blog post with embedded URLs, no backticks, no other text.\n",
" Only use slashes as path separators, never backslashes\"\"\",\n",
Expand Down
4 changes: 2 additions & 2 deletions examples/Caching and observability.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"outputs": [],
"source": [
"from motleycrew import MotleyCrew\n",
"from motleycrew.agents.langchain.react import ReactMotleyAgent\n",
"from motleycrew.agents.langchain.react import ReActMotleyAgent\n",
"from motleycrew.tasks import SimpleTask\n",
"from langchain_community.tools import DuckDuckGoSearchRun"
]
Expand Down Expand Up @@ -103,7 +103,7 @@
"\n",
"duckduckgo_search = DuckDuckGoSearchRun()\n",
"\n",
"writer = ReactMotleyAgent(\n",
"writer = ReActMotleyAgent(\n",
" name=\"writer\",\n",
" description=\"Using the results of a web search, write an article on the latest advancements in AI in 2024.\",\n",
" tools=[duckduckgo_search],\n",
Expand Down
Loading

0 comments on commit abc2764

Please sign in to comment.