Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
whimo committed Jul 24, 2024
1 parent ba718f2 commit f2a2b79
Show file tree
Hide file tree
Showing 120 changed files with 53 additions and 40 deletions.
3 changes: 2 additions & 1 deletion motleycrew/tools/tool.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import functools
from typing import Callable
from typing import Union, Optional, Dict, Any

Expand Down Expand Up @@ -131,7 +132,7 @@ def to_llama_index_tool(self) -> LlamaIndex__BaseTool:
"""
ensure_module_is_installed("llama_index")
llama_index_tool = LlamaIndex__FunctionTool.from_defaults(
fn=self.tool._run,
fn=functools.partial(self.tool._run, config=RunnableConfig()),
name=self.tool.name,
description=self.tool.description,
fn_schema=self.tool.args_schema,
Expand Down
78 changes: 45 additions & 33 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.10,<=3.13"
langchain = "^0.2"
crewai = { version = "^0.36", optional = true }
crewai = { version = "^0.41", optional = true }
setuptools = "^67.6.2"
duckduckgo-search = "5.3.0b4"
llama-index = { version = "^0.10.27", optional = true }
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"from typing import List\n\ndef bubble_sort(arr: List[int]) -> List[int]:\n n = len(arr)\n for i in range(n):\n swapped = False\n for j in range(0, n - i - 1):\n if arr[j] > arr[j + 1]:\n arr[j], arr[j + 1] = arr[j + 1], arr[j]\n swapped = True\n if not swapped:\n break\n return arr\n\n# Test the bubble sort implementation\nif __name__ == \"__main__\":\n sample_list = [64, 34, 25, 12, 22, 11, 90]\n sorted_list = bubble_sort(sample_list)\n print(sorted_list)\n\nThe `bubble_sort` function sorts a list of numbers in ascending order using the bubble sort algorithm. The algorithm works by repeatedly stepping through the list, comparing adjacent elements and swapping them if they are in the wrong order. This process is repeated for each element in the list, with each pass moving the next largest element to its correct position. The outer loop runs `n` times, where `n` is the length of the list, and the inner loop runs `n-i-1` times, where `i` is the current pass number. An optimization is added to exit early if no swaps are made during a pass, indicating that the list is already sorted. This ensures that the algorithm does not perform unnecessary passes, improving efficiency. The time complexity of bubble sort is O(n^2) in the worst and average cases, making it inefficient for large datasets."
"def bubble_sort(arr):\n n = len(arr)\n for i in range(n):\n swapped = False\n for j in range(0, n-i-1):\n if arr[j] > arr[j+1]:\n arr[j], arr[j+1] = arr[j+1], arr[j]\n swapped = True\n if not swapped:\n break\n return arr\n\n# Test the bubble sort function\nsample_list = [64, 34, 25, 12, 22, 11, 90]\nsorted_list = bubble_sort(sample_list)\nprint(sorted_list)\n\nThe `bubble_sort` function sorts a list by repeatedly swapping adjacent elements if they are in the wrong order. The outer loop runs `n` times, where `n` is the length of the list. The inner loop runs `n-i-1` times, where `i` is the current iteration of the outer loop, to avoid re-checking the already sorted elements at the end of the list. An optimization is added with a `swapped` flag to break out of the loop early if no elements were swapped in an inner loop iteration, indicating that the list is already sorted. The test case demonstrates the function by sorting a sample list `[64, 34, 25, 12, 22, 11, 90]`, and the output is `[11, 12, 22, 25, 34, 64, 90]`. The time complexity of bubble sort is O(n^2) in the worst and average cases, but the early exit optimization can improve performance on nearly sorted lists."
2 changes: 1 addition & 1 deletion tests/itest_golden_data/blog_with_images_ipynb.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"# The Coolest AI Advancements in 2024: What You Need to Know\n\nHey there, tech enthusiasts! 2024 is shaping up to be an incredible year for artificial intelligence. From groundbreaking technologies to industry-changing impacts, AI is making waves like never before. Let's dive into some of the most exciting advancements that are transforming the landscape.\n\n## Generative AI is Growing Up\n\nRemember when generative AI first blew our minds? Well, it's not just a novelty anymore. In 2024, generative AI is becoming more practical and useful for everyday folks. Imagine having a bunch of small AI models at your fingertips, each designed to help with specific tasks. Whether you're creating art, writing stories, or even coding, generative AI is here to make your life easier and more fun.\n\n![Generative AI](https://example.com/Users/whimo/misc/motleycrew_clean/images/d5727d00.png)\n\n## Multimodal AI: The Jack of All Trades\n\nGone are the days when AI could only handle one type of data at a time. Enter multimodal AI, the new kid on the block that can process text, images, and audio all at once. This means smarter, more versatile AI systems that can understand and interact with the world in ways we never thought possible. Think of it as having a supercharged assistant that can do it all.\n\n![Multimodal AI](https://example.com/Users/whimo/misc/motleycrew_clean/images/cfa221e1.png)\n\n## Smaller, Smarter, and Open Source\n\nBigger isn't always better, especially when it comes to AI models. The trend in 2024 is all about creating smaller, more efficient models that pack a punch. Plus, the open-source community is making huge strides, giving everyone access to cutting-edge AI technologies. This democratization of AI means more innovation and customization, allowing you to tailor AI to your specific needs.\n\n## AI in Everyday Life\n\nAI is no longer confined to tech giants and research labs. It's becoming a part of our daily lives in ways we never imagined. From powerful virtual agents that can handle a wide range of tasks to AI-driven applications that make our routines smoother, the future is here, and it's powered by AI. And the best part? These technologies are becoming more accessible, so you don't need to be a tech wizard to benefit from them.\n\n![AI in Everyday Life](https://example.com/Users/whimo/misc/motleycrew_clean/images/f31cf221.png)\n\n## Industry Impacts: Manufacturing Leads the Way\n\nThe manufacturing industry is set to see the biggest financial boost from AI, with massive improvements in efficiency and productivity. But it's not just manufacturing that's reaping the rewards. Businesses across various sectors are starting to unlock the true potential of AI, driving significant economic and societal changes. And let's not forget the environmental and political impacts, as AI helps shape policy decisions and sustainability efforts.\n\n2024 is a game-changer for AI, and we're just scratching the surface of what's possible. So, buckle up and get ready for an exciting ride into the future of artificial intelligence!\n\nStay curious, stay innovative, and keep exploring the amazing world of AI."
"# The Coolest AI Advancements in 2024: What You Need to Know\n\nHey tech enthusiasts! 2024 is shaping up to be an incredible year for artificial intelligence. From mind-blowing new technologies to game-changing industry impacts, AI is taking the world by storm. Let's dive into some of the most exciting advancements that are making waves this year.\n\n## Generative AI: Creativity Unleashed\n\nGenerative AI is on fire! Imagine AI models that can create human-like text, images, and even videos. We're talking about the next level of content creation, coding, and scientific research. These models, like GPT-4 and beyond, are getting so sophisticated that they can produce content that's almost indistinguishable from what a human would create. It's like having a super-smart creative partner at your fingertips.\n![Generative AI](https://example.com/Users/whimo/motleycrew/images/1fd2d154.png)\n\n## AI Ethics and Regulation: Playing by the Rules\n\nWith great power comes great responsibility. As AI continues to grow, there's a big push for ethical considerations and regulatory frameworks. Governments and organizations are stepping up to ensure AI is used responsibly, without perpetuating biases or causing harm. It's all about making sure AI benefits everyone and doesn't go rogue.\n\n## AI in Healthcare: A New Era of Medicine\n\nAI is revolutionizing healthcare in ways we never thought possible. From diagnosing diseases to personalizing treatment plans, AI algorithms are analyzing medical images, predicting patient outcomes, and even assisting in surgeries. It's like having a supercharged medical team working around the clock to keep us healthy.\n![AI in Healthcare](https://example.com/Users/whimo/motleycrew/images/c4335b5b.png)\n\n## Edge AI: Smarter, Faster, Closer\n\nEdge AI is all about bringing AI processing closer to where data is generated. This means reduced latency and bandwidth usage, making AI applications more efficient and responsive. Think of it as having a mini AI powerhouse right where you need it, whether it's in your smartphone, smart home devices, or even your car.\n\n## Quantum AI: The Future is Now\n\nQuantum AI is where things get really futuristic. By combining quantum computing with AI, we're on the brink of solving complex problems that were previously impossible. This could lead to breakthroughs in cryptography, material science, and even complex system simulations. It's like unlocking a whole new level of computational power.\n![Quantum AI](https://example.com/Users/whimo/motleycrew/images/957b0b62.png)\n\n## AI-Driven Drug Discovery: Speeding Up Science\n\nAI is speeding up the drug discovery process by predicting how different compounds will interact with targets in the body. This means new drugs can be developed faster and more cost-effectively, potentially saving countless lives. It's a game-changer for the pharmaceutical industry and for patients around the world.\n\n## Autonomous Systems: The Rise of the Machines\n\nFully autonomous systems, including self-driving cars, drones, and robots, are becoming more reliable and widespread. These systems are set to transform transportation, logistics, and various industries. Imagine a world where your car drives you to work, drones deliver your packages, and robots handle dangerous tasks. The future is here, and it's autonomous.\n\n## Natural Language Processing (NLP): Talking to Machines\n\nNLP technologies are getting so advanced that interacting with machines feels more natural and intuitive. From machine translation to sentiment analysis and conversational AI, these advancements are making it easier for us to communicate with our devices. It's like having a personal assistant that understands you perfectly.\n\nIn conclusion, 2024 is a landmark year for AI, with groundbreaking advancements that are set to transform industries and improve our lives. Whether it's through generative AI, quantum computing, or autonomous systems, the future of AI is bright, and we can't wait to see what's next. Stay tuned, because the AI revolution is just getting started!"
Loading

0 comments on commit f2a2b79

Please sign in to comment.