How to be able to chat about a final report produced by a crew after the crew is done?

Is there a way for an AI manager transition to a chat bot where you can discuss the outcome of the kickoff with the manager. Is that something that’s possible right now and if so, does anybody have any examples of this?

For example, I wrote a crew that will analyze a noncompete contract and generate a report specifically for the individual contract once that reports generated I’d like to be able to chat with the legal advisor that manages that crew and ask additional questions against what it has already learned I think this would be tremendously valuable And would have a huge impact on client adoption of these tech technologies.

@coderberry One way I can theoretically imagine this is the following:

  1. Set the output_file to True on all tasks (see the docs).
  2. Do a RAG on these output files. For example, use CrewAI’s TXTSearchTool.

Fantastic idea. Thank you!

@coderberry You’re welcome! :slight_smile:

Maybe with our new flow feature as well

I’m trying to use txtsearchtool, but this error appears, I tried to solve it but so far nothing. What could it be?
I encountered an error while trying to use the tool. This was the error: APIStatusError.init() missing 2 required keyword-only arguments: ‘response’ and ‘body’.
Tool Search a txt’s content accepts these inputs: Tool Name: Search a txt’s content
Tool Arguments: {‘search_query’: {‘description’: “Mandatory search query you want to use to search the txt’s content”, ‘type’: ‘str’}, ‘txt’: {‘description’: ‘Mandatory txt path you want to search’, ‘type’: ‘str’}}
Tool Description: A tool that can be used to semantic search a query from a txt’s content. Help

Does it occur sometimes, or every time you kickoff the crew? If just sometimes, try switching the LLM you’re using to a more capable one.

every time! I use gemini and ollama and showed the same error.
I’ve seen it in the documentation but I can’t get it to work
How should I pass the function txtSeachTool?

search_tool = TXTSearchTool(txt=‘data.txt’)
search_tool = TXTSearchTool()

@luaanlopes Can you please share your full code?

sure!

from crewai_tools import tool
from crewai import Agent , Task , Crew , Process
from langchain_openai import ChatOpenAI
import os
from crewai_tools import SerperDevTool , ScrapeWebsiteTool
from crewai_tools import TXTSearchTool

os.environ[‘GEMINI_API_KEY’] = ‘xxx’
os.environ[‘OPENAI_API_KEY’] = ‘xxx’
os.environ[‘SERPER_API_KEY’] = ‘xxx’
gpt4o = ChatOpenAI (model_name =‘gemini/gemini-1.5-flash’)

search_tool = TXTSearchTool(txt_file=‘data.txt’)

site_url = ‘data.txt’

agente_extracao = Agent (
role =‘Extrator de Informações do Txt’,
backstory = “”" Você, como pesquisador de dados de arquivos de texto (txt), é responsável pela coleta, análise e interpretação de dados extraídos de arquivos no formato de texto simples. Seu trabalho envolve aplicar técnicas de mineração e processamento de dados, como análise de padrões, extração de informações relevantes e limpeza de dados brutos…“”" ,
goal = f"“” Responder perguntas baseadas exclusivamente nos dados contidos no arquivo TXT fornecido. {site_url}. .“”" ,
verbose = True ,
memory = True ,
llm = gpt4o ,
tools =[ search_tool ]
)
pergunta = ‘Quantos % de rodovias pavimentadas existem?’

extrair_informacoes_site = Task (
description =f’Com base na pergunta {pergunta} fornecida, utilize para buscar e fornecer uma resposta clara e objetiva, utilizando apenas as informações contidas no arquivo .txt {site_url}.',
expected_output =‘Resposta clara e objetiva com base nas informações encontradas no arquivo TXT .’,
tools =[ search_tool ] ,
agent = agente_extracao
)

crew = Crew (
agents =[ agente_extracao
] ,
tasks =[ extrair_informacoes_task
] ,
process = Process.sequential
)

try:
result = crew.kickoff(inputs={})
print(result)
except Exception as e:
print(f"An error occurred: {e}")

@rokbenko I was testing using gemini llm, when i change for openai its works!

@luaanlopes Glad you solved the issue! :slight_smile: