New version, updating dependencies, fixing memory

This commit is contained in:
João Moura
2024-05-13 22:26:41 -03:00
parent 615ac7f297
commit 27fddae286
9 changed files with 430 additions and 520 deletions

View File

@@ -1,13 +1,32 @@
import pytest
from crewai.agent import Agent
from crewai.crew import Crew
from crewai.memory.short_term.short_term_memory import ShortTermMemory
from crewai.memory.short_term.short_term_memory_item import ShortTermMemoryItem
from crewai.task import Task
@pytest.fixture
def short_term_memory():
"""Fixture to create a ShortTermMemory instance"""
return ShortTermMemory()
agent = Agent(
role="Researcher",
goal="Search relevant data and provide results",
backstory="You are a researcher at a leading tech think tank.",
tools=[],
verbose=True,
)
task = Task(
description="Perform a search on specific topics.",
expected_output="A list of relevant URLs based on the search query.",
agent=agent,
)
return ShortTermMemory(crew=Crew(
agents=[agent],
tasks=[task]
))
@pytest.mark.vcr(filter_headers=["authorization"])