feat(core): Support i18n (#1327)

This commit is contained in:
Fangyin Cheng
2024-03-25 20:15:39 +08:00
committed by GitHub
parent fa06be64c1
commit fcc325d411
179 changed files with 12052 additions and 69512 deletions

View File

@@ -6,6 +6,7 @@ from typing import Any, Dict, Generic, List, Optional, Type, TypeVar, cast
from dbgpt.core.awel.flow import Parameter, ResourceCategory, register_resource
from dbgpt.core.interface.serialization import Serializable, Serializer
from dbgpt.util.annotations import PublicAPI
from dbgpt.util.i18n_utils import _
from dbgpt.util.pagination_utils import PaginationResult
from dbgpt.util.serialization.json_serialization import JsonSerializer
@@ -386,19 +387,21 @@ class StorageInterface(Generic[T, TDataRepresentation], ABC):
@register_resource(
label="Memory Storage",
label=_("Memory Storage"),
name="in_memory_storage",
category=ResourceCategory.STORAGE,
description="Save your data in memory.",
description=_("Save your data in memory."),
parameters=[
Parameter.build_from(
"Serializer",
_("Serializer"),
"serializer",
Serializer,
optional=True,
default=None,
description="The serializer for serializing the data. If not set, the "
"default JSON serializer will be used.",
description=_(
"The serializer for serializing the data. If not set, the "
"default JSON serializer will be used."
),
)
],
)