mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-10-22 17:39:02 +00:00
feat(core): Support i18n (#1327)
This commit is contained in:
@@ -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."
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
|
Reference in New Issue
Block a user