Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
update doc SpaceNewsKnowledgeSource code snippet (#2275)
Amine Saihif8f9df6d1d5e
diff --git a/docs/concepts/knowledge.mdx b/docs/concepts/knowledge.mdxindex b5827551a..13a875409 100644--- a/docs/concepts/knowledge.mdx+++ b/docs/concepts/knowledge.mdx@@ -460,12 +460,12 @@ class SpaceNewsKnowledgeSource(BaseKnowledgeSource):data = response.json()articles = data.get('results', [])- formatted_data = self._format_articles(articles)+ formatted_data = self.validate_content(articles)return {self.api_endpoint: formatted_data}except Exception as e:raise ValueError(f"Failed to fetch space news: {str(e)}")- def _format_articles(self, articles: list) -> str:+ def validate_content(self, articles: list) -> str:"""Format articles into readable text."""formatted = "Space News Articles:\n\n"for article in articles: