mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 16:48:30 +00:00
fix: update AgentOps documentation links to point to correct examples
- Update English and Portuguese AgentOps documentation to link to correct examples in AgentOps repository - Remove Instagram post example that doesn't exist in AgentOps repository - Change CardGroup from 3 to 2 columns to accommodate removal - Add tests to validate documentation links are accessible and contain AgentOps implementation Fixes #3247 Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -79,11 +79,11 @@ This feature is useful for debugging and understanding how agents interact with
|
|||||||
|
|
||||||
### Crew + AgentOps Examples
|
### Crew + AgentOps Examples
|
||||||
|
|
||||||
<CardGroup cols={3}>
|
<CardGroup cols={2}>
|
||||||
<Card
|
<Card
|
||||||
title="Job Posting"
|
title="Job Posting"
|
||||||
color="#F3A78B"
|
color="#F3A78B"
|
||||||
href="https://github.com/joaomdmoura/crewAI-examples/tree/main/job-posting"
|
href="https://github.com/AgentOps-AI/agentops/blob/main/examples/crewai/job_posting.py"
|
||||||
icon="briefcase"
|
icon="briefcase"
|
||||||
iconType="solid"
|
iconType="solid"
|
||||||
>
|
>
|
||||||
@@ -92,21 +92,12 @@ This feature is useful for debugging and understanding how agents interact with
|
|||||||
<Card
|
<Card
|
||||||
title="Markdown Validator"
|
title="Markdown Validator"
|
||||||
color="#F3A78B"
|
color="#F3A78B"
|
||||||
href="https://github.com/joaomdmoura/crewAI-examples/tree/main/markdown_validator"
|
href="https://github.com/AgentOps-AI/agentops/blob/main/examples/crewai/markdown_validator.py"
|
||||||
icon="markdown"
|
icon="markdown"
|
||||||
iconType="solid"
|
iconType="solid"
|
||||||
>
|
>
|
||||||
Example of a Crew agent that validates Markdown files.
|
Example of a Crew agent that validates Markdown files.
|
||||||
</Card>
|
</Card>
|
||||||
<Card
|
|
||||||
title="Instagram Post"
|
|
||||||
color="#F3A78B"
|
|
||||||
href="https://github.com/joaomdmoura/crewAI-examples/tree/main/instagram_post"
|
|
||||||
icon="square-instagram"
|
|
||||||
iconType="brands"
|
|
||||||
>
|
|
||||||
Example of a Crew agent that generates Instagram posts.
|
|
||||||
</Card>
|
|
||||||
</CardGroup>
|
</CardGroup>
|
||||||
|
|
||||||
### Further Information
|
### Further Information
|
||||||
|
|||||||
@@ -79,11 +79,11 @@ Esse recurso é útil para depuração e entendimento de como os agentes interag
|
|||||||
|
|
||||||
### Exemplos de Crew + AgentOps
|
### Exemplos de Crew + AgentOps
|
||||||
|
|
||||||
<CardGroup cols={3}>
|
<CardGroup cols={2}>
|
||||||
<Card
|
<Card
|
||||||
title="Vaga de Emprego"
|
title="Vaga de Emprego"
|
||||||
color="#F3A78B"
|
color="#F3A78B"
|
||||||
href="https://github.com/joaomdmoura/crewAI-examples/tree/main/job-posting"
|
href="https://github.com/AgentOps-AI/agentops/blob/main/examples/crewai/job_posting.py"
|
||||||
icon="briefcase"
|
icon="briefcase"
|
||||||
iconType="solid"
|
iconType="solid"
|
||||||
>
|
>
|
||||||
@@ -92,21 +92,12 @@ Esse recurso é útil para depuração e entendimento de como os agentes interag
|
|||||||
<Card
|
<Card
|
||||||
title="Validador de Markdown"
|
title="Validador de Markdown"
|
||||||
color="#F3A78B"
|
color="#F3A78B"
|
||||||
href="https://github.com/joaomdmoura/crewAI-examples/tree/main/markdown_validator"
|
href="https://github.com/AgentOps-AI/agentops/blob/main/examples/crewai/markdown_validator.py"
|
||||||
icon="markdown"
|
icon="markdown"
|
||||||
iconType="solid"
|
iconType="solid"
|
||||||
>
|
>
|
||||||
Exemplo de um agente Crew que valida arquivos Markdown.
|
Exemplo de um agente Crew que valida arquivos Markdown.
|
||||||
</Card>
|
</Card>
|
||||||
<Card
|
|
||||||
title="Post no Instagram"
|
|
||||||
color="#F3A78B"
|
|
||||||
href="https://github.com/joaomdmoura/crewAI-examples/tree/main/instagram_post"
|
|
||||||
icon="square-instagram"
|
|
||||||
iconType="brands"
|
|
||||||
>
|
|
||||||
Exemplo de um agente Crew que gera posts para Instagram.
|
|
||||||
</Card>
|
|
||||||
</CardGroup>
|
</CardGroup>
|
||||||
|
|
||||||
### Mais Informações
|
### Mais Informações
|
||||||
@@ -123,4 +114,4 @@ Para sugestões de funcionalidades ou relatos de bugs, entre em contato com o ti
|
|||||||
<span> • </span>
|
<span> • </span>
|
||||||
<a href="https://app.agentops.ai/?=crew">🖇️ Dashboard AgentOps</a>
|
<a href="https://app.agentops.ai/?=crew">🖇️ Dashboard AgentOps</a>
|
||||||
<span> • </span>
|
<span> • </span>
|
||||||
<a href="https://docs.agentops.ai/introduction">📙 Documentação</a>
|
<a href="https://docs.agentops.ai/introduction">📙 Documentação</a>
|
||||||
|
|||||||
45
tests/test_documentation_links.py
Normal file
45
tests/test_documentation_links.py
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
"""Test for documentation links to ensure they are valid and accessible."""
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
import requests
|
||||||
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
|
|
||||||
|
class TestDocumentationLinks:
|
||||||
|
"""Test class for validating documentation links."""
|
||||||
|
|
||||||
|
@pytest.mark.parametrize("url", [
|
||||||
|
"https://github.com/AgentOps-AI/agentops/blob/main/examples/crewai/job_posting.py",
|
||||||
|
"https://github.com/AgentOps-AI/agentops/blob/main/examples/crewai/markdown_validator.py",
|
||||||
|
])
|
||||||
|
def test_agentops_example_links_are_accessible(self, url):
|
||||||
|
"""Test that AgentOps example links in documentation are accessible."""
|
||||||
|
try:
|
||||||
|
response = requests.get(url, timeout=10)
|
||||||
|
assert response.status_code == 200, f"URL {url} returned status code {response.status_code}"
|
||||||
|
|
||||||
|
parsed_url = urlparse(url)
|
||||||
|
assert parsed_url.scheme in ['http', 'https'], f"URL {url} should use http or https protocol"
|
||||||
|
assert parsed_url.netloc, f"URL {url} should have a valid domain"
|
||||||
|
|
||||||
|
except requests.exceptions.RequestException as e:
|
||||||
|
pytest.fail(f"Failed to access URL {url}: {str(e)}")
|
||||||
|
|
||||||
|
def test_agentops_examples_contain_agentops_implementation(self):
|
||||||
|
"""Test that the linked examples actually contain AgentOps implementation."""
|
||||||
|
urls = [
|
||||||
|
"https://raw.githubusercontent.com/AgentOps-AI/agentops/main/examples/crewai/job_posting.py",
|
||||||
|
"https://raw.githubusercontent.com/AgentOps-AI/agentops/main/examples/crewai/markdown_validator.py",
|
||||||
|
]
|
||||||
|
|
||||||
|
for url in urls:
|
||||||
|
try:
|
||||||
|
response = requests.get(url, timeout=10)
|
||||||
|
assert response.status_code == 200, f"Could not fetch raw content from {url}"
|
||||||
|
|
||||||
|
content = response.text.lower()
|
||||||
|
assert "agentops" in content, f"Example at {url} does not contain AgentOps implementation"
|
||||||
|
assert "import agentops" in content or "from agentops" in content, f"Example at {url} does not import AgentOps"
|
||||||
|
|
||||||
|
except requests.exceptions.RequestException as e:
|
||||||
|
pytest.fail(f"Failed to fetch content from {url}: {str(e)}")
|
||||||
Reference in New Issue
Block a user