mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 16:18:30 +00:00
fix: add type annotations to converter instance variables
This commit is contained in:
@@ -22,10 +22,11 @@ class OpenAIConverterAdapter(BaseConverterAdapter):
|
||||
|
||||
def __init__(self, agent_adapter: Any) -> None:
|
||||
"""Initialize the converter adapter with a reference to the agent adapter"""
|
||||
super().__init__(agent_adapter) # type: ignore
|
||||
self.agent_adapter = agent_adapter
|
||||
self._output_format = None
|
||||
self._schema = None
|
||||
self._output_model = None
|
||||
self._output_format: str | None = None
|
||||
self._schema: str | None = None
|
||||
self._output_model: Any = None
|
||||
|
||||
def configure_structured_output(self, task: Any) -> None:
|
||||
"""
|
||||
@@ -76,7 +77,7 @@ class OpenAIConverterAdapter(BaseConverterAdapter):
|
||||
|
||||
return f"{base_prompt}\n\n{output_schema}"
|
||||
|
||||
def post_process_result(self, result: str) -> str:
|
||||
def post_process_result(self, result: str) -> Any:
|
||||
"""
|
||||
Post-process the result to ensure it matches the expected format.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user