From 38a185b13b5838f116f01a42b2ec373dcaac5f9d Mon Sep 17 00:00:00 2001 From: lorenzejay Date: Tue, 15 Apr 2025 14:04:36 -0700 Subject: [PATCH] docs: Enhance BaseConverterAdapter documentation - Added a detailed docstring to the BaseConverterAdapter class, outlining its purpose and the expected functionality for all converter adapters. - Updated the post_process_result method's docstring to specify the expected format of the result as a string. --- .../agents/agent_adapters/base_converter_adapter.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/crewai/agents/agent_adapters/base_converter_adapter.py b/src/crewai/agents/agent_adapters/base_converter_adapter.py index 0bb9128d5..557e627f3 100644 --- a/src/crewai/agents/agent_adapters/base_converter_adapter.py +++ b/src/crewai/agents/agent_adapters/base_converter_adapter.py @@ -2,6 +2,12 @@ from abc import ABC, abstractmethod class BaseConverterAdapter(ABC): + """Base class for all converter adapters in CrewAI. + + This abstract class defines the common interface and functionality that all + converter adapters must implement for converting structured output. + """ + def __init__(self, agent_adapter): self.agent_adapter = agent_adapter @@ -19,6 +25,5 @@ class BaseConverterAdapter(ABC): @abstractmethod def post_process_result(self, result: str) -> str: - """Post-process the result to ensure it matches the expected format.""" - # Transform the string result to the expected format. + """Post-process the result to ensure it matches the expected format: string.""" pass