mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
Enhance CrewAgentExecutor initialization by allowing optional i18n parameter for improved internationalization support. This change ensures that the executor can utilize a provided i18n instance or fallback to the default, enhancing flexibility in multilingual contexts.
This commit is contained in:
@@ -91,6 +91,7 @@ class CrewAgentExecutor(CrewAgentExecutorMixin):
|
|||||||
request_within_rpm_limit: Callable[[], bool] | None = None,
|
request_within_rpm_limit: Callable[[], bool] | None = None,
|
||||||
callbacks: list[Any] | None = None,
|
callbacks: list[Any] | None = None,
|
||||||
response_model: type[BaseModel] | None = None,
|
response_model: type[BaseModel] | None = None,
|
||||||
|
i18n: I18N | None = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Initialize executor.
|
"""Initialize executor.
|
||||||
|
|
||||||
@@ -114,7 +115,7 @@ class CrewAgentExecutor(CrewAgentExecutorMixin):
|
|||||||
callbacks: Optional callbacks list.
|
callbacks: Optional callbacks list.
|
||||||
response_model: Optional Pydantic model for structured outputs.
|
response_model: Optional Pydantic model for structured outputs.
|
||||||
"""
|
"""
|
||||||
self._i18n: I18N = get_i18n()
|
self._i18n: I18N = i18n or get_i18n()
|
||||||
self.llm = llm
|
self.llm = llm
|
||||||
self.task = task
|
self.task = task
|
||||||
self.agent = agent
|
self.agent = agent
|
||||||
|
|||||||
Reference in New Issue
Block a user