mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-10 21:39:33 +00:00
feat(core): Support i18n (#1327)
This commit is contained in:
@@ -4,6 +4,7 @@ from typing import Dict, Type
|
||||
|
||||
from dbgpt.core.awel.flow import ResourceCategory, register_resource
|
||||
from dbgpt.core.interface.serialization import Serializable, Serializer
|
||||
from dbgpt.util.i18n_utils import _
|
||||
|
||||
JSON_ENCODING = "utf-8"
|
||||
|
||||
@@ -19,10 +20,10 @@ class JsonSerializable(Serializable, ABC):
|
||||
|
||||
|
||||
@register_resource(
|
||||
label="Json Serializer",
|
||||
label=_("Json Serializer"),
|
||||
name="json_serializer",
|
||||
category=ResourceCategory.SERIALIZER,
|
||||
description="The serializer for serializing data with json format.",
|
||||
description=_("The serializer for serializing data with json format."),
|
||||
)
|
||||
class JsonSerializer(Serializer):
|
||||
"""The serializer abstract class for serializing cache keys and values."""
|
||||
|
Reference in New Issue
Block a user