mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-12 23:01:15 +00:00
feat(base_step): set default language from app context when not provided (#269)
- Initialize language attribute with app context language if not explicitly set - Add conditional logic to check for existing language value before assignment - Ensure proper fallback behavior when language parameter is empty or None
This commit is contained in:
parent
041f957a7f
commit
aa87f4fdea
2 changed files with 3 additions and 1 deletions
|
|
@ -418,7 +418,7 @@ components:
|
|||
|
||||
as_llm_formatter:
|
||||
default:
|
||||
backend: ${LLM_FORMATTER_BACKEND:-anthropic}
|
||||
backend: ${LLM_BACKEND:-anthropic}
|
||||
|
||||
file_graph:
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -125,6 +125,8 @@ class BaseStep(ComponentMixin, ABC):
|
|||
):
|
||||
super().__init__(name=name, backend=backend, app_context=app_context, **kwargs)
|
||||
self.language: str = language
|
||||
if not self.language and self.app_context is not None:
|
||||
self.language = self.app_context.app_config.language
|
||||
self.input_mapping = input_mapping
|
||||
self.output_mapping = output_mapping
|
||||
self.context: RuntimeContext | None = None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue