chore: Merge latest code

This commit is contained in:
Fangyin Cheng 2024-09-09 15:41:05 +08:00
commit 2e991163e6
18 changed files with 2126 additions and 251 deletions

View File

@ -36,7 +36,7 @@ def initialize_components(
system_app.register( system_app.register(
DefaultExecutorFactory, max_workers=param.default_thread_pool_size DefaultExecutorFactory, max_workers=param.default_thread_pool_size
) )
system_app.register(DefaultScheduler) system_app.register(DefaultScheduler, scheduler_enable=CFG.SCHEDULER_ENABLED)
system_app.register_instance(controller) system_app.register_instance(controller)
system_app.register(ConnectorManager) system_app.register(ConnectorManager)

View File

@ -1,4 +1,4 @@
from typing import List, Literal, Optional, Tuple, Union from typing import List, Literal, Optional, Tuple, Union, cast
from dbgpt._private.pydantic import BaseModel, Field from dbgpt._private.pydantic import BaseModel, Field
from dbgpt.core import ( from dbgpt.core import (
@ -91,7 +91,7 @@ class BaseHOLLMOperator(
self._keep_start_rounds = keep_start_rounds if self._has_history else 0 self._keep_start_rounds = keep_start_rounds if self._has_history else 0
self._keep_end_rounds = keep_end_rounds if self._has_history else 0 self._keep_end_rounds = keep_end_rounds if self._has_history else 0
self._max_token_limit = max_token_limit self._max_token_limit = max_token_limit
self._sub_compose_dag = self._build_conversation_composer_dag() self._sub_compose_dag: Optional[DAG] = None
async def _do_run(self, dag_ctx: DAGContext) -> TaskOutput[ModelOutput]: async def _do_run(self, dag_ctx: DAGContext) -> TaskOutput[ModelOutput]:
conv_serve = ConversationServe.get_instance(self.system_app) conv_serve = ConversationServe.get_instance(self.system_app)
@ -166,7 +166,7 @@ class BaseHOLLMOperator(
"messages": history_messages, "messages": history_messages,
"prompt_dict": prompt_dict, "prompt_dict": prompt_dict,
} }
end_node: BaseOperator = self._sub_compose_dag.leaf_nodes[0] end_node: BaseOperator = cast(BaseOperator, self.sub_compose_dag.leaf_nodes[0])
# Sub dag, use the same dag context in the parent dag # Sub dag, use the same dag context in the parent dag
messages = await end_node.call(call_data, dag_ctx=self.current_dag_context) messages = await end_node.call(call_data, dag_ctx=self.current_dag_context)
model_request = ModelRequest.build_request( model_request = ModelRequest.build_request(
@ -184,6 +184,12 @@ class BaseHOLLMOperator(
storage_conv.add_user_message(user_input) storage_conv.add_user_message(user_input)
return model_request return model_request
@property
def sub_compose_dag(self) -> DAG:
if not self._sub_compose_dag:
self._sub_compose_dag = self._build_conversation_composer_dag()
return self._sub_compose_dag
def _build_storage( def _build_storage(
self, req: CommonLLMHttpRequestBody self, req: CommonLLMHttpRequestBody
) -> Tuple[StorageConversation, List[BaseMessage]]: ) -> Tuple[StorageConversation, List[BaseMessage]]:
@ -207,7 +213,11 @@ class BaseHOLLMOperator(
return storage_conv, history_messages return storage_conv, history_messages
def _build_conversation_composer_dag(self) -> DAG: def _build_conversation_composer_dag(self) -> DAG:
with DAG("dbgpt_awel_app_chat_history_prompt_composer") as composer_dag: default_dag_variables = self.dag._default_dag_variables if self.dag else None
with DAG(
"dbgpt_awel_app_chat_history_prompt_composer",
default_dag_variables=default_dag_variables,
) as composer_dag:
input_task = InputOperator(input_source=SimpleCallDataInputSource()) input_task = InputOperator(input_source=SimpleCallDataInputSource())
# History transform task # History transform task
if self._history_merge_mode == "token": if self._history_merge_mode == "token":

View File

@ -421,7 +421,11 @@ class BaseOperator(DAGNode, ABC, Generic[OUT], metaclass=BaseOperatorMeta):
Args: Args:
dag_ctx (DAGContext): The context of the DAG when this node is run. dag_ctx (DAGContext): The context of the DAG when this node is run.
""" """
from ...interface.variables import VariablesIdentifier, VariablesPlaceHolder from ...interface.variables import (
VariablesIdentifier,
VariablesPlaceHolder,
is_variable_string,
)
if not self._variables_provider: if not self._variables_provider:
return return
@ -432,11 +436,13 @@ class BaseOperator(DAGNode, ABC, Generic[OUT], metaclass=BaseOperatorMeta):
resolve_items = [] resolve_items = []
for item in dag_ctx._dag_variables.items: for item in dag_ctx._dag_variables.items:
# TODO: Resolve variables just once? # TODO: Resolve variables just once?
if not item.value:
continue
if isinstance(item.value, str) and is_variable_string(item.value):
item.value = VariablesPlaceHolder(item.name, item.value)
if isinstance(item.value, VariablesPlaceHolder): if isinstance(item.value, VariablesPlaceHolder):
resolve_tasks.append( resolve_tasks.append(
self.blocking_func_to_async( item.value.async_parse(self._variables_provider)
item.value.parse, self._variables_provider
)
) )
resolve_items.append(item) resolve_items.append(item)
resolved_values = await asyncio.gather(*resolve_tasks) resolved_values = await asyncio.gather(*resolve_tasks)
@ -462,15 +468,13 @@ class BaseOperator(DAGNode, ABC, Generic[OUT], metaclass=BaseOperatorMeta):
if dag_provider: if dag_provider:
# First try to resolve the variable with the DAG variables # First try to resolve the variable with the DAG variables
resolved_value = await self.blocking_func_to_async( resolved_value = await value.async_parse(
value.parse,
dag_provider, dag_provider,
ignore_not_found_error=True, ignore_not_found_error=True,
default_identifier_map=default_identifier_map, default_identifier_map=default_identifier_map,
) )
if resolved_value is None: if resolved_value is None:
resolved_value = await self.blocking_func_to_async( resolved_value = await value.async_parse(
value.parse,
self._variables_provider, self._variables_provider,
default_identifier_map=default_identifier_map, default_identifier_map=default_identifier_map,
) )

View File

@ -4,12 +4,14 @@ from typing import AsyncIterator, List
import pytest import pytest
import pytest_asyncio import pytest_asyncio
from dbgpt.component import SystemApp
from ...interface.variables import ( from ...interface.variables import (
StorageVariables, StorageVariables,
StorageVariablesProvider, StorageVariablesProvider,
VariablesIdentifier, VariablesIdentifier,
) )
from .. import DefaultWorkflowRunner, InputOperator, SimpleInputSource from .. import DAGVar, DefaultWorkflowRunner, InputOperator, SimpleInputSource
from ..task.task_impl import _is_async_iterator from ..task.task_impl import _is_async_iterator
@ -104,7 +106,9 @@ async def stream_input_nodes(request):
@asynccontextmanager @asynccontextmanager
async def _create_variables(**kwargs): async def _create_variables(**kwargs):
vp = StorageVariablesProvider() sys_app = SystemApp()
DAGVar.set_current_system_app(sys_app)
vp = StorageVariablesProvider(system_app=sys_app)
vars = kwargs.get("vars") vars = kwargs.get("vars")
if vars and isinstance(vars, dict): if vars and isinstance(vars, dict):
for param_key, param_var in vars.items(): for param_key, param_var in vars.items():

View File

@ -374,6 +374,15 @@ class VariablesProvider(BaseComponent, ABC):
) -> Any: ) -> Any:
"""Query variables from storage.""" """Query variables from storage."""
async def async_get(
self,
full_key: str,
default_value: Optional[str] = _EMPTY_DEFAULT_VALUE,
default_identifier_map: Optional[Dict[str, str]] = None,
) -> Any:
"""Query variables from storage async."""
raise NotImplementedError("Current variables provider does not support async.")
@abstractmethod @abstractmethod
def save(self, variables_item: StorageVariables) -> None: def save(self, variables_item: StorageVariables) -> None:
"""Save variables to storage.""" """Save variables to storage."""
@ -457,6 +466,24 @@ class VariablesPlaceHolder:
return None return None
raise e raise e
async def async_parse(
self,
variables_provider: VariablesProvider,
ignore_not_found_error: bool = False,
default_identifier_map: Optional[Dict[str, str]] = None,
):
"""Parse the variables async."""
try:
return await variables_provider.async_get(
self.full_key,
self.default_value,
default_identifier_map=default_identifier_map,
)
except ValueError as e:
if ignore_not_found_error:
return None
raise e
def __repr__(self): def __repr__(self):
"""Return the representation of the variables place holder.""" """Return the representation of the variables place holder."""
return f"<VariablesPlaceHolder " f"{self.param_name} {self.full_key}>" return f"<VariablesPlaceHolder " f"{self.param_name} {self.full_key}>"
@ -508,6 +535,42 @@ class StorageVariablesProvider(VariablesProvider):
variable.value = self.encryption.decrypt(variable.value, variable.salt) variable.value = self.encryption.decrypt(variable.value, variable.salt)
return self._convert_to_value_type(variable) return self._convert_to_value_type(variable)
async def async_get(
self,
full_key: str,
default_value: Optional[str] = _EMPTY_DEFAULT_VALUE,
default_identifier_map: Optional[Dict[str, str]] = None,
) -> Any:
"""Query variables from storage async."""
# Try to get variables from storage
value = await blocking_func_to_async_no_executor(
self.get,
full_key,
default_value=None,
default_identifier_map=default_identifier_map,
)
if value is not None:
return value
key = VariablesIdentifier.from_str_identifier(full_key, default_identifier_map)
# Get all builtin variables
variables = await self.async_get_variables(
key=key.key,
scope=key.scope,
scope_key=key.scope_key,
sys_code=key.sys_code,
user_name=key.user_name,
)
values = [v for v in variables if v.name == key.name]
if not values:
if default_value == _EMPTY_DEFAULT_VALUE:
raise ValueError(f"Variable {full_key} not found")
return default_value
if len(values) > 1:
raise ValueError(f"Multiple variables found for {full_key}")
variable = values[0]
return self._convert_to_value_type(variable)
def save(self, variables_item: StorageVariables) -> None: def save(self, variables_item: StorageVariables) -> None:
"""Save variables to storage.""" """Save variables to storage."""
if variables_item.category == "secret": if variables_item.category == "secret":
@ -577,9 +640,11 @@ class StorageVariablesProvider(VariablesProvider):
) )
if is_builtin: if is_builtin:
return builtin_variables return builtin_variables
executor_factory: Optional[ executor_factory: Optional[DefaultExecutorFactory] = None
DefaultExecutorFactory if self.system_app:
] = DefaultExecutorFactory.get_instance(self.system_app, default_component=None) executor_factory = DefaultExecutorFactory.get_instance(
self.system_app, default_component=None
)
if executor_factory: if executor_factory:
return await blocking_func_to_async( return await blocking_func_to_async(
executor_factory.create(), executor_factory.create(),

View File

@ -4,7 +4,11 @@ from typing import List, Optional, Union
from sqlalchemy import URL from sqlalchemy import URL
from dbgpt.component import SystemApp from dbgpt.component import SystemApp
from dbgpt.core.interface.variables import VariablesProvider from dbgpt.core.interface.variables import (
FernetEncryption,
StorageVariablesProvider,
VariablesProvider,
)
from dbgpt.serve.core import BaseServe from dbgpt.serve.core import BaseServe
from dbgpt.storage.metadata import DatabaseManager from dbgpt.storage.metadata import DatabaseManager
@ -33,6 +37,7 @@ class Serve(BaseServe):
db_url_or_db: Union[str, URL, DatabaseManager] = None, db_url_or_db: Union[str, URL, DatabaseManager] = None,
try_create_tables: Optional[bool] = False, try_create_tables: Optional[bool] = False,
): ):
if api_prefix is None: if api_prefix is None:
api_prefix = [f"/api/v1/serve/awel", "/api/v2/serve/awel"] api_prefix = [f"/api/v1/serve/awel", "/api/v2/serve/awel"]
if api_tags is None: if api_tags is None:
@ -41,8 +46,15 @@ class Serve(BaseServe):
system_app, api_prefix, api_tags, db_url_or_db, try_create_tables system_app, api_prefix, api_tags, db_url_or_db, try_create_tables
) )
self._db_manager: Optional[DatabaseManager] = None self._db_manager: Optional[DatabaseManager] = None
self._variables_provider: Optional[VariablesProvider] = None self._serve_config = ServeConfig.from_app_config(
self._serve_config: Optional[ServeConfig] = None system_app.config, SERVE_CONFIG_KEY_PREFIX
)
self._variables_provider: StorageVariablesProvider = StorageVariablesProvider(
storage=None,
encryption=FernetEncryption(self._serve_config.encrypt_key),
system_app=system_app,
)
system_app.register_instance(self._variables_provider)
def init_app(self, system_app: SystemApp): def init_app(self, system_app: SystemApp):
if self._app_has_initiated: if self._app_has_initiated:
@ -65,10 +77,6 @@ class Serve(BaseServe):
def before_start(self): def before_start(self):
"""Called before the start of the application.""" """Called before the start of the application."""
from dbgpt.core.interface.variables import (
FernetEncryption,
StorageVariablesProvider,
)
from dbgpt.storage.metadata.db_storage import SQLAlchemyStorage from dbgpt.storage.metadata.db_storage import SQLAlchemyStorage
from dbgpt.util.serialization.json_serialization import JsonSerializer from dbgpt.util.serialization.json_serialization import JsonSerializer
@ -76,9 +84,6 @@ class Serve(BaseServe):
from .models.variables_adapter import VariablesAdapter from .models.variables_adapter import VariablesAdapter
self._db_manager = self.create_or_get_db_manager() self._db_manager = self.create_or_get_db_manager()
self._serve_config = ServeConfig.from_app_config(
self._system_app.config, SERVE_CONFIG_KEY_PREFIX
)
self._db_manager = self.create_or_get_db_manager() self._db_manager = self.create_or_get_db_manager()
storage_adapter = VariablesAdapter() storage_adapter = VariablesAdapter()
@ -89,11 +94,7 @@ class Serve(BaseServe):
storage_adapter, storage_adapter,
serializer, serializer,
) )
self._variables_provider = StorageVariablesProvider( self._variables_provider.storage = storage
storage=storage,
encryption=FernetEncryption(self._serve_config.encrypt_key),
system_app=self._system_app,
)
@property @property
def variables_provider(self): def variables_provider(self):

File diff suppressed because it is too large Load Diff

View File

@ -2,12 +2,12 @@ import inspect
from io import StringIO from io import StringIO
from typing import Any, Dict, Optional, TextIO from typing import Any, Dict, Optional, TextIO
import cloudpickle
def check_serializable( def check_serializable(
obj: Any, obj_name: str = "Object", error_msg: str = "Object is not serializable" obj: Any, obj_name: str = "Object", error_msg: str = "Object is not serializable"
): ):
import cloudpickle
try: try:
cloudpickle.dumps(obj) cloudpickle.dumps(obj)
except Exception as e: except Exception as e:
@ -27,6 +27,8 @@ class SerializabilityInspector:
self.stream.write(f"{indent}{message}\n") self.stream.write(f"{indent}{message}\n")
def inspect(self, obj: Any, name: str, depth: int = 3) -> bool: def inspect(self, obj: Any, name: str, depth: int = 3) -> bool:
import cloudpickle
self.log(f"Inspecting '{name}'") self.log(f"Inspecting '{name}'")
self.indent_level += 1 self.indent_level += 1

Binary file not shown.

View File

@ -0,0 +1,66 @@
# Chinese translations for PACKAGE package
# PACKAGE 软件包的简体中文翻译.
# Copyright (C) 2024 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Automatically generated, 2024.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-06 16:14+0800\n"
"PO-Revision-Date: 2024-09-06 16:14+0800\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../dbgpt/agent/core/plan/awel/agent_operator.py:353
msgid "Agent Branch Operator"
msgstr "智能体分支算子"
#: ../dbgpt/agent/core/plan/awel/agent_operator.py:358
msgid ""
"Branch the workflow based on the agent actionreport nexspeakers of the "
"request."
msgstr "根据智能体的操作报告和请求的下一步执行者来分支工作流。"
#: ../dbgpt/agent/core/plan/awel/agent_operator.py:363
#: ../dbgpt/agent/core/plan/awel/agent_operator.py:371
msgid "Agent Request"
msgstr "智能体请求"
#: ../dbgpt/agent/core/plan/awel/agent_operator.py:366
msgid "The input value of the operator."
msgstr "算子的输入值。"
#: ../dbgpt/agent/core/plan/awel/agent_operator.py:374
msgid "The agent request to agent Operator."
msgstr "智能体请求智能体算子。"
#: ../dbgpt/agent/core/plan/awel/agent_operator.py:418
msgid "Agent Branch Join Operator"
msgstr "智能体分支合并算子"
#: ../dbgpt/agent/core/plan/awel/agent_operator.py:422
msgid "Just keep the first non-empty output."
msgstr "只保留第一个非空输出。"
#: ../dbgpt/agent/core/plan/awel/agent_operator.py:426
msgid "Agent Output"
msgstr "智能体输出"
#: ../dbgpt/agent/core/plan/awel/agent_operator.py:429
msgid "The Agent output."
msgstr "智能体的输出。"
#: ../dbgpt/agent/core/plan/awel/agent_operator.py:434
msgid "Branch Output"
msgstr "分支输出"
#: ../dbgpt/agent/core/plan/awel/agent_operator.py:437
msgid "The output value of the operator."
msgstr "算子的输出值。"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-06-17 00:05+0800\n" "POT-Creation-Date: 2024-09-06 16:14+0800\n"
"PO-Revision-Date: 2024-03-23 11:22+0800\n" "PO-Revision-Date: 2024-03-23 11:22+0800\n"
"Last-Translator: Automatically generated\n" "Last-Translator: Automatically generated\n"
"Language-Team: none\n" "Language-Team: none\n"
@ -17,6 +17,447 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: ../dbgpt/app/dbgpt_server.py:53 ../dbgpt/app/dbgpt_server.py:54 #: ../dbgpt/app/operators/converter.py:14
#: ../dbgpt/app/operators/converter.py:39
msgid "String"
msgstr "字符串"
#: ../dbgpt/app/operators/converter.py:17
msgid "The string to be converted to other types."
msgstr "要转换为其他类型的字符串。"
#: ../dbgpt/app/operators/converter.py:20
#: ../dbgpt/app/operators/converter.py:45
msgid "Integer"
msgstr "整数"
#: ../dbgpt/app/operators/converter.py:23
msgid "The integer to be converted to other types."
msgstr "要转换为其他类型的整数。"
#: ../dbgpt/app/operators/converter.py:26
#: ../dbgpt/app/operators/converter.py:51
msgid "Float"
msgstr "浮点数"
#: ../dbgpt/app/operators/converter.py:29
msgid "The float to be converted to other types."
msgstr "要转换为其他类型的浮点数。"
#: ../dbgpt/app/operators/converter.py:32
#: ../dbgpt/app/operators/converter.py:57
msgid "Boolean"
msgstr "布尔值"
#: ../dbgpt/app/operators/converter.py:35
msgid "The boolean to be converted to other types."
msgstr "要转换为其他类型的布尔值。"
#: ../dbgpt/app/operators/converter.py:42
msgid "The string converted from other types."
msgstr "从其他类型转换来的字符串。"
#: ../dbgpt/app/operators/converter.py:48
msgid "The integer converted from other types."
msgstr "从其他类型转换来的整数。"
#: ../dbgpt/app/operators/converter.py:54
msgid "The float converted from other types."
msgstr "从其他类型转换来的浮点数。"
#: ../dbgpt/app/operators/converter.py:60
msgid "The boolean converted from other types."
msgstr "从其他类型转换来的布尔值。"
#: ../dbgpt/app/operators/converter.py:68
msgid "String to Integer"
msgstr "字符串转整数"
#: ../dbgpt/app/operators/converter.py:70
msgid "Converts a string to an integer."
msgstr "将字符串转换为整数。"
#: ../dbgpt/app/operators/converter.py:87
msgid "String to Float"
msgstr "字符串转浮点数"
#: ../dbgpt/app/operators/converter.py:89
msgid "Converts a string to a float."
msgstr "将字符串转换为浮点数。"
#: ../dbgpt/app/operators/converter.py:106
msgid "String to Boolean"
msgstr "字符串转布尔值"
#: ../dbgpt/app/operators/converter.py:108
msgid "Converts a string to a boolean, true: 'true', '1', 'y'"
msgstr "将字符串转换为布尔值true'true''1''y'"
#: ../dbgpt/app/operators/converter.py:112
msgid "True Values"
msgstr "真值"
#: ../dbgpt/app/operators/converter.py:117
msgid "Comma-separated values that should be treated as True."
msgstr "应视为真值的逗号分隔值。"
#: ../dbgpt/app/operators/converter.py:136
msgid "Integer to String"
msgstr "整数转字符串"
#: ../dbgpt/app/operators/converter.py:138
msgid "Converts an integer to a string."
msgstr "将整数转换为字符串。"
#: ../dbgpt/app/operators/converter.py:155
msgid "Float to String"
msgstr "浮点数转字符串"
#: ../dbgpt/app/operators/converter.py:157
msgid "Converts a float to a string."
msgstr "将浮点数转换为字符串。"
#: ../dbgpt/app/operators/converter.py:174
msgid "Boolean to String"
msgstr "布尔值转字符串"
#: ../dbgpt/app/operators/converter.py:176
msgid "Converts a boolean to a string."
msgstr "将布尔值转换为字符串。"
#: ../dbgpt/app/operators/llm.py:50
msgid "The context key can be used as the key for formatting prompt."
msgstr "上下文键可以用作格式化提示的键。"
#: ../dbgpt/app/operators/llm.py:54
msgid "The context."
msgstr "上下文。"
#: ../dbgpt/app/operators/llm.py:268 ../dbgpt/app/operators/datasource.py:108
msgid "Prompt Template"
msgstr "提示模板"
#: ../dbgpt/app/operators/llm.py:271
msgid "The prompt template for the conversation."
msgstr "对话的提示模板。"
#: ../dbgpt/app/operators/llm.py:274
msgid "Model Name"
msgstr "模型名称"
#: ../dbgpt/app/operators/llm.py:279
msgid "The model name."
msgstr "模型名称。"
#: ../dbgpt/app/operators/llm.py:283
msgid "LLM Client"
msgstr "LLM 客户端"
#: ../dbgpt/app/operators/llm.py:289
msgid ""
"The LLM Client, how to connect to the LLM model, if not provided, it will "
"use the default client deployed by DB-GPT."
msgstr "LLM 客户端,如何连接到 LLM 模型,如果未提供,将使用 DB-GPT 部署的默认客户端。"
#: ../dbgpt/app/operators/llm.py:294
msgid "History Message Merge Mode"
msgstr "历史消息合并模式"
#: ../dbgpt/app/operators/llm.py:305
msgid ""
"The history merge mode, supports 'none', 'window' and 'token'. 'none': no "
"history merge, 'window': merge by conversation window, 'token': merge by "
"token length."
msgstr "历史合并模式,支持 'none''window' 和 'token'。'none':不合并历史,'window':按对话窗口合并,'token':按 Token 长度合并。"
#: ../dbgpt/app/operators/llm.py:312
msgid "User Message Key"
msgstr "用户消息键"
#: ../dbgpt/app/operators/llm.py:318
msgid "The key of the user message in your prompt, default is 'user_input'."
msgstr "提示中用户消息的键,默认为 'user_input'。"
#: ../dbgpt/app/operators/llm.py:322
msgid "History Key"
msgstr "历史键"
#: ../dbgpt/app/operators/llm.py:328
msgid ""
"The chat history key, with chat history message pass to prompt template, if "
"not provided, it will parse the prompt template to get the key."
msgstr "聊天历史键,将聊天历史消息传递给提示模板,如果未提供,它将解析提示模板以获取键。"
#: ../dbgpt/app/operators/llm.py:333
msgid "Keep Start Rounds"
msgstr "保留起始轮数"
#: ../dbgpt/app/operators/llm.py:338
msgid "The start rounds to keep in the chat history."
msgstr "在聊天历史中保留的起始轮数。"
#: ../dbgpt/app/operators/llm.py:341
msgid "Keep End Rounds"
msgstr "保留结束轮数"
#: ../dbgpt/app/operators/llm.py:346
msgid "The end rounds to keep in the chat history."
msgstr "在聊天历史中保留的结束轮数。"
#: ../dbgpt/app/operators/llm.py:349
msgid "Max Token Limit"
msgstr "最大 Token 限制"
#: ../dbgpt/app/operators/llm.py:354
msgid "The max token limit to keep in the chat history."
msgstr "在聊天历史中保留的最大 Token 限制。"
#: ../dbgpt/app/operators/llm.py:358
msgid "Common LLM Request Body"
msgstr "通用 LLM 请求体"
#: ../dbgpt/app/operators/llm.py:361
msgid "The common LLM request body."
msgstr "通用 LLM 请求体。"
#: ../dbgpt/app/operators/llm.py:364
msgid "Extra Context"
msgstr "额外上下文"
#: ../dbgpt/app/operators/llm.py:368
msgid ""
"Extra context for building prompt(Knowledge context, database schema, etc), "
"you can add multiple context."
msgstr "用于构建提示的额外上下文(知识上下文、数据库架构等),您可以添加多个上下文。"
#: ../dbgpt/app/operators/llm.py:374
msgid "Model Output"
msgstr "模型输出"
#: ../dbgpt/app/operators/llm.py:377
msgid "The model output."
msgstr "模型输出。"
#: ../dbgpt/app/operators/llm.py:380
msgid "Streaming Model Output"
msgstr "流式模型输出"
#: ../dbgpt/app/operators/llm.py:384
msgid "The streaming model output."
msgstr "流式模型输出。"
#: ../dbgpt/app/operators/llm.py:390
msgid "LLM Operator"
msgstr "LLM 算子"
#: ../dbgpt/app/operators/llm.py:394
msgid ""
"High-level LLM operator, supports multi-round conversation (conversation "
"window, token length and no multi-round)."
msgstr "高级 LLM 算子支持多轮对话对话窗口、Token 长度和无多轮)。"
#: ../dbgpt/app/operators/llm.py:424
msgid "Streaming LLM Operator"
msgstr "流式 LLM 算子"
#: ../dbgpt/app/operators/llm.py:428
msgid ""
"High-level streaming LLM operator, supports multi-round conversation "
"(conversation window, token length and no multi-round)."
msgstr "高级流式 LLM 算子支持多轮对话对话窗口、Token 长度和无多轮)。"
#: ../dbgpt/app/operators/datasource.py:102
msgid "Datasource"
msgstr "数据源"
#: ../dbgpt/app/operators/datasource.py:105
msgid "The datasource to retrieve the context"
msgstr "用于检索上下文的数据源"
#: ../dbgpt/app/operators/datasource.py:113
msgid "The prompt template to build a database prompt"
msgstr "用于构建数据库提示的提示模板"
#: ../dbgpt/app/operators/datasource.py:117
msgid "Display Type"
msgstr "显示类型"
#: ../dbgpt/app/operators/datasource.py:122
msgid "The display type for the data"
msgstr "数据的显示类型"
#: ../dbgpt/app/operators/datasource.py:126
msgid "Max Number of Results"
msgstr "最大结果数"
#: ../dbgpt/app/operators/datasource.py:131
msgid "The maximum number of results to return"
msgstr "返回的最大结果数"
#: ../dbgpt/app/operators/datasource.py:134
msgid "Response Format"
msgstr "响应格式"
#: ../dbgpt/app/operators/datasource.py:139
msgid "The response format, default is a JSON format"
msgstr "响应格式,默认为 JSON 格式"
#: ../dbgpt/app/operators/datasource.py:144 ../dbgpt/app/operators/rag.py:35
msgid "Context Key"
msgstr "上下文键"
#: ../dbgpt/app/operators/datasource.py:149 ../dbgpt/app/operators/rag.py:40
msgid "The key of the context, it will be used in building the prompt"
msgstr "上下文的键,将用于构建提示"
#: ../dbgpt/app/operators/datasource.py:152 ../dbgpt/app/operators/rag.py:83
msgid "User question"
msgstr "用户问题"
#: ../dbgpt/app/operators/datasource.py:155
msgid "The user question to retrieve table schemas from the datasource"
msgstr "用于从数据源检索表架构的用户问题"
#: ../dbgpt/app/operators/datasource.py:158 ../dbgpt/app/operators/rag.py:89
msgid "Retrieved context"
msgstr "检索到的上下文"
#: ../dbgpt/app/operators/datasource.py:161
msgid "The retrieved context from the datasource"
msgstr "从数据源检索到的上下文"
#: ../dbgpt/app/operators/datasource.py:165
msgid "SQL dict"
msgstr "SQL 字典"
#: ../dbgpt/app/operators/datasource.py:168
msgid "The SQL to be executed wrapped in a dictionary, generated by LLM"
msgstr "由 LLM 生成的包装在字典中的要执行的 SQL"
#: ../dbgpt/app/operators/datasource.py:171
msgid "SQL result"
msgstr "SQL 结果"
#: ../dbgpt/app/operators/datasource.py:174
msgid "The result of the SQL execution"
msgstr "SQL 执行结果"
#: ../dbgpt/app/operators/datasource.py:178
msgid "SQL dict list"
msgstr "SQL 字典列表"
#: ../dbgpt/app/operators/datasource.py:182
msgid "The SQL list to be executed wrapped in a dictionary, generated by LLM"
msgstr "由 LLM 生成的包装在字典中的要执行的 SQL 列表"
#: ../dbgpt/app/operators/datasource.py:211
msgid "Datasource Retriever Operator"
msgstr "数据源检索算子"
#: ../dbgpt/app/operators/datasource.py:213
msgid "Retrieve the table schemas from the datasource."
msgstr "从数据源检索表架构。"
#: ../dbgpt/app/operators/datasource.py:227
msgid "Retrieved schema chunks"
msgstr "检索到的架构块"
#: ../dbgpt/app/operators/datasource.py:231
msgid "The retrieved schema chunks from the datasource"
msgstr "从数据源检索到的架构块"
#: ../dbgpt/app/operators/datasource.py:289
msgid "Datasource Executor Operator"
msgstr "数据源执行算子"
#: ../dbgpt/app/operators/datasource.py:291
#: ../dbgpt/app/operators/datasource.py:328
msgid "Execute the context from the datasource."
msgstr "执行来自数据源的上下文。"
#: ../dbgpt/app/operators/datasource.py:326
msgid "Datasource Dashboard Operator"
msgstr "数据源仪表板算子"
#: ../dbgpt/app/operators/rag.py:43
msgid "Top K"
msgstr "前 K"
#: ../dbgpt/app/operators/rag.py:48
msgid "The number of chunks to retrieve"
msgstr "要检索的块数"
#: ../dbgpt/app/operators/rag.py:51
msgid "Minimum Match Score"
msgstr "最低匹配分数"
#: ../dbgpt/app/operators/rag.py:58
msgid ""
"The minimum match score for the retrieved chunks, it will be dropped if the "
"match score is less than the threshold"
msgstr "检索到的块的最低匹配分数,如果匹配分数低于阈值,将被丢弃"
#: ../dbgpt/app/operators/rag.py:66
msgid "Reranker Enabled"
msgstr "启用重新排序器"
#: ../dbgpt/app/operators/rag.py:71
msgid "Whether to enable the reranker"
msgstr "是否启用重新排序器"
#: ../dbgpt/app/operators/rag.py:74
msgid "Reranker Top K"
msgstr "重新排序器前 K"
#: ../dbgpt/app/operators/rag.py:79
msgid "The top k for the reranker"
msgstr "重新排序器的前 K"
#: ../dbgpt/app/operators/rag.py:86
msgid "The user question to retrieve the knowledge"
msgstr "用于检索知识的用户问题"
#: ../dbgpt/app/operators/rag.py:92
msgid "The retrieved context from the knowledge space"
msgstr "从知识空间检索到的上下文"
#: ../dbgpt/app/operators/rag.py:107
msgid "Knowledge Operator"
msgstr "知识算子"
#: ../dbgpt/app/operators/rag.py:112
msgid ""
"Knowledge Operator, retrieve your knowledge(documents) from knowledge space"
msgstr "知识算子,从知识空间检索您的知识(文档)"
#: ../dbgpt/app/operators/rag.py:118
msgid "Knowledge Space Name"
msgstr "知识空间名称"
#: ../dbgpt/app/operators/rag.py:122
msgid "The name of the knowledge space"
msgstr "知识空间的名称"
#: ../dbgpt/app/operators/rag.py:136
msgid "Chunks"
msgstr "块"
#: ../dbgpt/app/operators/rag.py:140
msgid "The retrieved chunks from the knowledge space"
msgstr "从知识空间检索到的块"
#: ../dbgpt/app/dbgpt_server.py:56 ../dbgpt/app/dbgpt_server.py:57
msgid "DB-GPT Open API" msgid "DB-GPT Open API"
msgstr "DB-GPT 开放 API" msgstr "DB-GPT 开放 API"
#: ../dbgpt/app/knowledge/api.py:266
msgid "Vector Store"
msgstr "向量存储"
#: ../dbgpt/app/knowledge/api.py:274
msgid "Knowledge Graph"
msgstr "知识图谱"
#: ../dbgpt/app/knowledge/api.py:282
msgid "Full Text"
msgstr "全文"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-06-17 00:05+0800\n" "POT-Creation-Date: 2024-09-06 16:14+0800\n"
"PO-Revision-Date: 2024-03-23 16:45+0800\n" "PO-Revision-Date: 2024-03-23 16:45+0800\n"
"Last-Translator: Automatically generated\n" "Last-Translator: Automatically generated\n"
"Language-Team: none\n" "Language-Team: none\n"
@ -17,19 +17,19 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: ../dbgpt/core/interface/operators/prompt_operator.py:39 #: ../dbgpt/core/interface/operators/prompt_operator.py:37
msgid "Common Chat Prompt Template" msgid "Common Chat Prompt Template"
msgstr "常见聊天提示模板" msgstr "常见聊天提示模板"
#: ../dbgpt/core/interface/operators/prompt_operator.py:42 #: ../dbgpt/core/interface/operators/prompt_operator.py:40
msgid "The operator to build the prompt with static prompt." msgid "The operator to build the prompt with static prompt."
msgstr "用静态提示构建提示的操作员。" msgstr "用静态提示构建提示的原子。"
#: ../dbgpt/core/interface/operators/prompt_operator.py:45 #: ../dbgpt/core/interface/operators/prompt_operator.py:44
msgid "System Message" msgid "System Message"
msgstr "系统消息" msgstr "系统消息"
#: ../dbgpt/core/interface/operators/prompt_operator.py:50 #: ../dbgpt/core/interface/operators/prompt_operator.py:49
msgid "The system message." msgid "The system message."
msgstr "系统消息。" msgstr "系统消息。"
@ -43,80 +43,80 @@ msgstr "聊天历史消息占位符。"
#: ../dbgpt/core/interface/operators/prompt_operator.py:61 #: ../dbgpt/core/interface/operators/prompt_operator.py:61
msgid "Human Message" msgid "Human Message"
msgstr "人类消息" msgstr "用户消息"
#: ../dbgpt/core/interface/operators/prompt_operator.py:67 #: ../dbgpt/core/interface/operators/prompt_operator.py:67
msgid "The human message." msgid "The human message."
msgstr "人类消息。" msgstr "用户消息。"
#: ../dbgpt/core/interface/operators/prompt_operator.py:258 #: ../dbgpt/core/interface/operators/prompt_operator.py:257
msgid "Prompt Builder Operator" msgid "Prompt Builder Operator"
msgstr "提示构建器操作员" msgstr "提示构建器算子"
#: ../dbgpt/core/interface/operators/prompt_operator.py:260 #: ../dbgpt/core/interface/operators/prompt_operator.py:259
msgid "Build messages from prompt template." msgid "Build messages from prompt template."
msgstr "从提示模板构建消息。" msgstr "从提示模板构建消息。"
#: ../dbgpt/core/interface/operators/prompt_operator.py:264 #: ../dbgpt/core/interface/operators/prompt_operator.py:263
#: ../dbgpt/core/interface/operators/prompt_operator.py:351 #: ../dbgpt/core/interface/operators/prompt_operator.py:350
msgid "Chat Prompt Template" msgid "Chat Prompt Template"
msgstr "聊天提示模板" msgstr "聊天提示模板"
#: ../dbgpt/core/interface/operators/prompt_operator.py:267 #: ../dbgpt/core/interface/operators/prompt_operator.py:266
#: ../dbgpt/core/interface/operators/prompt_operator.py:354 #: ../dbgpt/core/interface/operators/prompt_operator.py:353
msgid "The chat prompt template." msgid "The chat prompt template."
msgstr "聊天提示模板。" msgstr "聊天提示模板。"
#: ../dbgpt/core/interface/operators/prompt_operator.py:272 #: ../dbgpt/core/interface/operators/prompt_operator.py:271
#: ../dbgpt/core/interface/operators/prompt_operator.py:382 #: ../dbgpt/core/interface/operators/prompt_operator.py:381
msgid "Prompt Input Dict" msgid "Prompt Input Dict"
msgstr "提示输入字典" msgstr "提示输入字典"
#: ../dbgpt/core/interface/operators/prompt_operator.py:275 #: ../dbgpt/core/interface/operators/prompt_operator.py:274
#: ../dbgpt/core/interface/operators/prompt_operator.py:385 #: ../dbgpt/core/interface/operators/prompt_operator.py:384
msgid "The prompt dict." msgid "The prompt dict."
msgstr "提示字典。" msgstr "提示字典。"
#: ../dbgpt/core/interface/operators/prompt_operator.py:280 #: ../dbgpt/core/interface/operators/prompt_operator.py:279
#: ../dbgpt/core/interface/operators/prompt_operator.py:390 #: ../dbgpt/core/interface/operators/prompt_operator.py:389
msgid "Formatted Messages" msgid "Formatted Messages"
msgstr "格式化消息" msgstr "格式化消息"
#: ../dbgpt/core/interface/operators/prompt_operator.py:284 #: ../dbgpt/core/interface/operators/prompt_operator.py:283
#: ../dbgpt/core/interface/operators/prompt_operator.py:394 #: ../dbgpt/core/interface/operators/prompt_operator.py:393
msgid "The formatted messages." msgid "The formatted messages."
msgstr "格式化的消息。" msgstr "格式化的消息。"
#: ../dbgpt/core/interface/operators/prompt_operator.py:344 #: ../dbgpt/core/interface/operators/prompt_operator.py:343
msgid "History Prompt Builder Operator" msgid "History Prompt Builder Operator"
msgstr "历史提示构建器操作员" msgstr "历史提示构建器算子"
#: ../dbgpt/core/interface/operators/prompt_operator.py:346 #: ../dbgpt/core/interface/operators/prompt_operator.py:345
msgid "Build messages from prompt template and chat history." msgid "Build messages from prompt template and chat history."
msgstr "从提示模板和聊天历史构建消息。" msgstr "从提示模板和聊天历史构建消息。"
#: ../dbgpt/core/interface/operators/prompt_operator.py:357 #: ../dbgpt/core/interface/operators/prompt_operator.py:356
#: ../dbgpt/core/operators/flow/composer_operator.py:65 #: ../dbgpt/core/operators/flow/composer_operator.py:65
msgid "History Key" msgid "History Key"
msgstr "历史关键字" msgstr "历史关键字"
#: ../dbgpt/core/interface/operators/prompt_operator.py:362 #: ../dbgpt/core/interface/operators/prompt_operator.py:361
msgid "The key of history in prompt dict." msgid "The key of history in prompt dict."
msgstr "提示字典中的历史关键字。" msgstr "提示字典中的历史关键字。"
#: ../dbgpt/core/interface/operators/prompt_operator.py:365 #: ../dbgpt/core/interface/operators/prompt_operator.py:364
msgid "String History" msgid "String History"
msgstr "字符串历史" msgstr "字符串历史"
#: ../dbgpt/core/interface/operators/prompt_operator.py:370 #: ../dbgpt/core/interface/operators/prompt_operator.py:369
msgid "Whether to convert the history to string." msgid "Whether to convert the history to string."
msgstr "是否将历史转换为字符串。" msgstr "是否将历史转换为字符串。"
#: ../dbgpt/core/interface/operators/prompt_operator.py:375 #: ../dbgpt/core/interface/operators/prompt_operator.py:374
msgid "History" msgid "History"
msgstr "历史" msgstr "历史"
#: ../dbgpt/core/interface/operators/prompt_operator.py:379 #: ../dbgpt/core/interface/operators/prompt_operator.py:378
msgid "The history." msgid "The history."
msgstr "历史。" msgstr "历史。"
@ -151,10 +151,10 @@ msgid ""
msgstr "" msgstr ""
#: ../dbgpt/core/interface/operators/message_operator.py:152 #: ../dbgpt/core/interface/operators/message_operator.py:152
#: ../dbgpt/core/interface/operators/llm_operator.py:100 #: ../dbgpt/core/interface/operators/llm_operator.py:105
#: ../dbgpt/core/interface/operators/llm_operator.py:203 #: ../dbgpt/core/interface/operators/llm_operator.py:208
#: ../dbgpt/core/interface/operators/llm_operator.py:218 #: ../dbgpt/core/interface/operators/llm_operator.py:223
#: ../dbgpt/core/interface/operators/llm_operator.py:364 #: ../dbgpt/core/interface/operators/llm_operator.py:369
#: ../dbgpt/core/operators/flow/composer_operator.py:118 #: ../dbgpt/core/operators/flow/composer_operator.py:118
msgid "Model Request" msgid "Model Request"
msgstr "模型请求" msgstr "模型请求"
@ -171,260 +171,281 @@ msgstr "存储的消息"
msgid "The messages stored in the storage." msgid "The messages stored in the storage."
msgstr "存储在存储中的消息。" msgstr "存储在存储中的消息。"
#: ../dbgpt/core/interface/operators/llm_operator.py:52 #: ../dbgpt/core/interface/operators/llm_operator.py:53
msgid "Build Model Request" msgid "Build Model Request"
msgstr "构建模型请求" msgstr "构建模型请求"
#: ../dbgpt/core/interface/operators/llm_operator.py:55 #: ../dbgpt/core/interface/operators/llm_operator.py:56
msgid "Build the model request from the http request body." msgid "Build the model request from the http request body."
msgstr "从 HTTP 请求体构建模型请求。" msgstr "从 HTTP 请求体构建模型请求。"
#: ../dbgpt/core/interface/operators/llm_operator.py:58 #: ../dbgpt/core/interface/operators/llm_operator.py:59
msgid "Default Model Name" msgid "Default Model Name"
msgstr "默认模型名称" msgstr "默认模型名称"
#: ../dbgpt/core/interface/operators/llm_operator.py:63 #: ../dbgpt/core/interface/operators/llm_operator.py:64
msgid "The model name of the model request." msgid "The model name of the model request."
msgstr "模型请求的模型名称。" msgstr "模型请求的模型名称。"
#: ../dbgpt/core/interface/operators/llm_operator.py:66 #: ../dbgpt/core/interface/operators/llm_operator.py:67
msgid "Temperature" msgid "Temperature"
msgstr "" msgstr ""
#: ../dbgpt/core/interface/operators/llm_operator.py:71 #: ../dbgpt/core/interface/operators/llm_operator.py:72
msgid "The temperature of the model request." msgid "The temperature of the model request."
msgstr "模型请求的温度。" msgstr "模型请求的温度。"
#: ../dbgpt/core/interface/operators/llm_operator.py:74 #: ../dbgpt/core/interface/operators/llm_operator.py:79
msgid "Max New Tokens" msgid "Max New Tokens"
msgstr "" msgstr ""
#: ../dbgpt/core/interface/operators/llm_operator.py:79 #: ../dbgpt/core/interface/operators/llm_operator.py:84
msgid "The max new tokens of the model request." msgid "The max new tokens of the model request."
msgstr "最大新令牌数(token)。" msgstr "最大新令牌数(token)。"
#: ../dbgpt/core/interface/operators/llm_operator.py:82 #: ../dbgpt/core/interface/operators/llm_operator.py:87
msgid "Context Length" msgid "Context Length"
msgstr "上下文长度" msgstr "上下文长度"
#: ../dbgpt/core/interface/operators/llm_operator.py:87 #: ../dbgpt/core/interface/operators/llm_operator.py:92
msgid "The context length of the model request." msgid "The context length of the model request."
msgstr "模型请求的上下文长度。" msgstr "模型请求的上下文长度。"
#: ../dbgpt/core/interface/operators/llm_operator.py:92 #: ../dbgpt/core/interface/operators/llm_operator.py:97
#: ../dbgpt/core/awel/trigger/ext_http_trigger.py:41 #: ../dbgpt/core/awel/trigger/ext_http_trigger.py:41
#: ../dbgpt/core/awel/trigger/ext_http_trigger.py:98 #: ../dbgpt/core/awel/trigger/ext_http_trigger.py:98
#: ../dbgpt/core/awel/trigger/http_trigger.py:766 #: ../dbgpt/core/awel/trigger/http_trigger.py:840
#: ../dbgpt/core/awel/trigger/http_trigger.py:825 #: ../dbgpt/core/awel/trigger/http_trigger.py:899
#: ../dbgpt/core/awel/trigger/http_trigger.py:886 #: ../dbgpt/core/awel/trigger/http_trigger.py:970
#: ../dbgpt/core/awel/trigger/http_trigger.py:1017 #: ../dbgpt/core/awel/trigger/http_trigger.py:1119
#: ../dbgpt/core/awel/trigger/http_trigger.py:1074 #: ../dbgpt/core/awel/trigger/http_trigger.py:1176
#: ../dbgpt/core/awel/trigger/http_trigger.py:1123 #: ../dbgpt/core/awel/trigger/http_trigger.py:1225
msgid "Request Body" msgid "Request Body"
msgstr "请求体" msgstr "请求体"
#: ../dbgpt/core/interface/operators/llm_operator.py:95 #: ../dbgpt/core/interface/operators/llm_operator.py:100
#: ../dbgpt/core/interface/operators/llm_operator.py:367 #: ../dbgpt/core/interface/operators/llm_operator.py:372
#: ../dbgpt/core/interface/operators/llm_operator.py:441 #: ../dbgpt/core/interface/operators/llm_operator.py:458
#: ../dbgpt/core/interface/operators/llm_operator.py:534 #: ../dbgpt/core/interface/operators/llm_operator.py:551
#: ../dbgpt/core/interface/operators/llm_operator.py:542 #: ../dbgpt/core/interface/operators/llm_operator.py:559
msgid "The input value of the operator." msgid "The input value of the operator."
msgstr "操作员的输入值。" msgstr "算子的输入值。"
#: ../dbgpt/core/interface/operators/llm_operator.py:103 #: ../dbgpt/core/interface/operators/llm_operator.py:108
#: ../dbgpt/core/interface/operators/llm_operator.py:221 #: ../dbgpt/core/interface/operators/llm_operator.py:226
#: ../dbgpt/core/interface/operators/llm_operator.py:449 #: ../dbgpt/core/interface/operators/llm_operator.py:466
#: ../dbgpt/core/interface/operators/llm_operator.py:594 #: ../dbgpt/core/interface/operators/llm_operator.py:611
#: ../dbgpt/core/interface/operators/llm_operator.py:639 #: ../dbgpt/core/interface/operators/llm_operator.py:656
msgid "The output value of the operator." msgid "The output value of the operator."
msgstr "算子的输出值。" msgstr "算子的输出值。"
#: ../dbgpt/core/interface/operators/llm_operator.py:196 #: ../dbgpt/core/interface/operators/llm_operator.py:201
msgid "Merge Model Request Messages" msgid "Merge Model Request Messages"
msgstr "合并模型请求消息" msgstr "合并模型请求消息"
#: ../dbgpt/core/interface/operators/llm_operator.py:199 #: ../dbgpt/core/interface/operators/llm_operator.py:204
msgid "Merge the model request from the input value." msgid "Merge the model request from the input value."
msgstr "从输入值中合并模型请求。" msgstr "从输入值中合并模型请求。"
#: ../dbgpt/core/interface/operators/llm_operator.py:206 #: ../dbgpt/core/interface/operators/llm_operator.py:211
msgid "The model request of upstream." msgid "The model request of upstream."
msgstr "上游的模型请求。" msgstr "上游的模型请求。"
#: ../dbgpt/core/interface/operators/llm_operator.py:209 #: ../dbgpt/core/interface/operators/llm_operator.py:214
msgid "Model messages" msgid "Model messages"
msgstr "模型消息" msgstr "模型消息"
#: ../dbgpt/core/interface/operators/llm_operator.py:212 #: ../dbgpt/core/interface/operators/llm_operator.py:217
msgid "The model messages of upstream." msgid "The model messages of upstream."
msgstr "上游的模型消息。" msgstr "上游的模型消息。"
#: ../dbgpt/core/interface/operators/llm_operator.py:339 #: ../dbgpt/core/interface/operators/llm_operator.py:361
msgid "LLM Branch Operator" msgid "LLM Branch Operator"
msgstr "LLM 分支算子" msgstr "LLM 分支算子"
#: ../dbgpt/core/interface/operators/llm_operator.py:343 #: ../dbgpt/core/interface/operators/llm_operator.py:365
msgid "Branch the workflow based on the stream flag of the request." msgid "Branch the workflow based on the stream flag of the request."
msgstr "根据请求的流标志分支工作流。" msgstr "根据请求的流标志分支工作流。"
#: ../dbgpt/core/interface/operators/llm_operator.py:346 #: ../dbgpt/core/interface/operators/llm_operator.py:377
msgid "Streaming Task Name"
msgstr "流式任务名称"
#: ../dbgpt/core/interface/operators/llm_operator.py:351
msgid "The name of the streaming task."
msgstr "流式任务的名称。"
#: ../dbgpt/core/interface/operators/llm_operator.py:354
msgid "Non-Streaming Task Name"
msgstr "非流式任务名称"
#: ../dbgpt/core/interface/operators/llm_operator.py:359
msgid "The name of the non-streaming task."
msgstr "非流式任务的名称。"
#: ../dbgpt/core/interface/operators/llm_operator.py:372
msgid "Streaming Model Request" msgid "Streaming Model Request"
msgstr "流式模型请求" msgstr "流式模型请求"
#: ../dbgpt/core/interface/operators/llm_operator.py:375 #: ../dbgpt/core/interface/operators/llm_operator.py:380
msgid "The streaming request, to streaming Operator." msgid "The streaming request, to streaming Operator."
msgstr "流式请求,发送至流式算子。" msgstr "流式请求,发送至流式算子。"
#: ../dbgpt/core/interface/operators/llm_operator.py:378 #: ../dbgpt/core/interface/operators/llm_operator.py:383
msgid "Non-Streaming Model Request" msgid "Non-Streaming Model Request"
msgstr "非流式模型请求" msgstr "非流式模型请求"
#: ../dbgpt/core/interface/operators/llm_operator.py:381 #: ../dbgpt/core/interface/operators/llm_operator.py:386
msgid "The non-streaming request, to non-streaming Operator." msgid "The non-streaming request, to non-streaming Operator."
msgstr "非流式请求,发送至非流式算子。" msgstr "非流式请求,发送至非流式算子。"
#: ../dbgpt/core/interface/operators/llm_operator.py:431 #: ../dbgpt/core/interface/operators/llm_operator.py:448
msgid "Map Model Output to Common Response Body" msgid "Map Model Output to Common Response Body"
msgstr "将模型输出映射到通用响应体" msgstr "将模型输出映射到通用响应体"
#: ../dbgpt/core/interface/operators/llm_operator.py:434 #: ../dbgpt/core/interface/operators/llm_operator.py:451
msgid "Map the model output to the common response body." msgid "Map the model output to the common response body."
msgstr "将模型输出映射到通用响应体。" msgstr "将模型输出映射到通用响应体。"
#: ../dbgpt/core/interface/operators/llm_operator.py:438 #: ../dbgpt/core/interface/operators/llm_operator.py:455
#: ../dbgpt/core/interface/operators/llm_operator.py:494 #: ../dbgpt/core/interface/operators/llm_operator.py:511
#: ../dbgpt/core/interface/operators/llm_operator.py:539 #: ../dbgpt/core/interface/operators/llm_operator.py:556
#: ../dbgpt/core/interface/operators/llm_operator.py:590 #: ../dbgpt/core/interface/operators/llm_operator.py:607
#: ../dbgpt/core/interface/output_parser.py:40 #: ../dbgpt/core/interface/output_parser.py:46
#: ../dbgpt/core/interface/output_parser.py:49 #: ../dbgpt/core/interface/output_parser.py:55
#: ../dbgpt/core/interface/output_parser.py:310
#: ../dbgpt/core/interface/output_parser.py:351
msgid "Model Output" msgid "Model Output"
msgstr "模型输出" msgstr "模型输出"
#: ../dbgpt/core/interface/operators/llm_operator.py:446 #: ../dbgpt/core/interface/operators/llm_operator.py:463
msgid "Common Response Body" msgid "Common Response Body"
msgstr "通用响应体" msgstr "通用响应体"
#: ../dbgpt/core/interface/operators/llm_operator.py:477 #: ../dbgpt/core/interface/operators/llm_operator.py:494
msgid "Common Streaming Output Operator" msgid "Common Streaming Output Operator"
msgstr "通用流式输出算子" msgstr "通用流式输出算子"
#: ../dbgpt/core/interface/operators/llm_operator.py:481 #: ../dbgpt/core/interface/operators/llm_operator.py:498
msgid "The common streaming LLM operator, for chat flow." msgid "The common streaming LLM operator, for chat flow."
msgstr "用于聊天流程的通用流式 LLM 算子。" msgstr "用于聊天流程的通用流式 LLM 算子。"
#: ../dbgpt/core/interface/operators/llm_operator.py:485 #: ../dbgpt/core/interface/operators/llm_operator.py:502
msgid "Upstream Model Output" msgid "Upstream Model Output"
msgstr "上游模型输出" msgstr "上游模型输出"
#: ../dbgpt/core/interface/operators/llm_operator.py:489 #: ../dbgpt/core/interface/operators/llm_operator.py:506
#: ../dbgpt/core/interface/output_parser.py:44 #: ../dbgpt/core/interface/output_parser.py:50
#: ../dbgpt/core/interface/output_parser.py:313
#: ../dbgpt/core/interface/output_parser.py:354
msgid "The model output of upstream." msgid "The model output of upstream."
msgstr "上游的模型输出。" msgstr "上游的模型输出。"
#: ../dbgpt/core/interface/operators/llm_operator.py:499 #: ../dbgpt/core/interface/operators/llm_operator.py:516
msgid "The model output after transform to common stream format" msgid "The model output after transform to common stream format"
msgstr "转换为通用流格式后的模型输出" msgstr "转换为通用流格式后的模型输出"
#: ../dbgpt/core/interface/operators/llm_operator.py:524 #: ../dbgpt/core/interface/operators/llm_operator.py:541
msgid "Map String to ModelOutput" msgid "Map String to ModelOutput"
msgstr "将字符串映射到模型输出" msgstr "将字符串映射到模型输出"
#: ../dbgpt/core/interface/operators/llm_operator.py:527 #: ../dbgpt/core/interface/operators/llm_operator.py:544
msgid "Map String to ModelOutput." msgid "Map String to ModelOutput."
msgstr "将字符串映射到模型输出。" msgstr "将字符串映射到模型输出。"
#: ../dbgpt/core/interface/operators/llm_operator.py:531 #: ../dbgpt/core/interface/operators/llm_operator.py:548
msgid "String" msgid "String"
msgstr "字符串" msgstr "字符串"
#: ../dbgpt/core/interface/operators/llm_operator.py:567 #: ../dbgpt/core/interface/operators/llm_operator.py:584
msgid "LLM Branch Join Operator" msgid "LLM Branch Join Operator"
msgstr "LLM 分支算子" msgstr "LLM 分支算子"
#: ../dbgpt/core/interface/operators/llm_operator.py:571 #: ../dbgpt/core/interface/operators/llm_operator.py:588
#: ../dbgpt/core/interface/operators/llm_operator.py:616 #: ../dbgpt/core/interface/operators/llm_operator.py:633
msgid "Just keep the first non-empty output." msgid "Just keep the first non-empty output."
msgstr "" msgstr "仅保留第一个非空输出。"
#: ../dbgpt/core/interface/operators/llm_operator.py:575 #: ../dbgpt/core/interface/operators/llm_operator.py:592
msgid "Streaming Model Output" msgid "Streaming Model Output"
msgstr "模型流式输出" msgstr "模型流式输出"
#: ../dbgpt/core/interface/operators/llm_operator.py:579 #: ../dbgpt/core/interface/operators/llm_operator.py:596
#: ../dbgpt/core/interface/operators/llm_operator.py:624 #: ../dbgpt/core/interface/operators/llm_operator.py:641
msgid "The streaming output." msgid "The streaming output."
msgstr "上游模型流式输出" msgstr "上游模型流式输出"
#: ../dbgpt/core/interface/operators/llm_operator.py:582 #: ../dbgpt/core/interface/operators/llm_operator.py:599
msgid "Non-Streaming Model Output" msgid "Non-Streaming Model Output"
msgstr "非流式模型请求" msgstr "非流式模型请求"
#: ../dbgpt/core/interface/operators/llm_operator.py:585 #: ../dbgpt/core/interface/operators/llm_operator.py:602
#: ../dbgpt/core/interface/operators/llm_operator.py:630 #: ../dbgpt/core/interface/operators/llm_operator.py:647
msgid "The non-streaming output." msgid "The non-streaming output."
msgstr "非流式任务的名称。" msgstr "非流式任务的名称。"
#: ../dbgpt/core/interface/operators/llm_operator.py:612 #: ../dbgpt/core/interface/operators/llm_operator.py:629
msgid "String Branch Join Operator" msgid "String Branch Join Operator"
msgstr "LLM 分支算子" msgstr "LLM 分支算子"
#: ../dbgpt/core/interface/operators/llm_operator.py:620 #: ../dbgpt/core/interface/operators/llm_operator.py:637
msgid "Streaming String Output" msgid "Streaming String Output"
msgstr "将字符串映射到模型输出" msgstr "将字符串映射到模型输出"
#: ../dbgpt/core/interface/operators/llm_operator.py:627 #: ../dbgpt/core/interface/operators/llm_operator.py:644
msgid "Non-Streaming String Output" msgid "Non-Streaming String Output"
msgstr "非流式模型请求" msgstr "非流式模型请求"
#: ../dbgpt/core/interface/operators/llm_operator.py:635 #: ../dbgpt/core/interface/operators/llm_operator.py:652
msgid "String Output" msgid "String Output"
msgstr "将字符串映射到模型输出" msgstr "将字符串映射到模型输出"
#: ../dbgpt/core/interface/output_parser.py:32 #: ../dbgpt/core/interface/output_parser.py:38
msgid "Base Output Operator" msgid "Base Output Operator"
msgstr "通用流式输出算子" msgstr "通用流式输出算子"
#: ../dbgpt/core/interface/output_parser.py:36 #: ../dbgpt/core/interface/output_parser.py:42
msgid "The base LLM out parse." msgid "The base LLM out parse."
msgstr "" msgstr "基础 LLM 输出解析。"
#: ../dbgpt/core/interface/output_parser.py:53 #: ../dbgpt/core/interface/output_parser.py:59
msgid "The model output after parsing." msgid "The model output after parsing."
msgstr "上游的模型输出。" msgstr "上游的模型输出。"
#: ../dbgpt/core/interface/storage.py:390 #: ../dbgpt/core/interface/output_parser.py:303
msgid "SQL Output Parser"
msgstr "SQL 输出解析器"
#: ../dbgpt/core/interface/output_parser.py:306
msgid "Parse the SQL output of an LLM call."
msgstr "解析 LLM 调用的 SQL 输出。"
#: ../dbgpt/core/interface/output_parser.py:318
msgid "Dict SQL Output"
msgstr "SQL 字典输出"
#: ../dbgpt/core/interface/output_parser.py:321
#, fuzzy
msgid "The dict output after parsing."
msgstr "上游的模型输出。"
#: ../dbgpt/core/interface/output_parser.py:342
msgid "SQL List Output Parser"
msgstr "SQL 列表输出解析器"
#: ../dbgpt/core/interface/output_parser.py:346
msgid "Parse the SQL list output of an LLM call, mostly used for dashboard."
msgstr "解析 LLM 调用的 SQL 列表输出,主要用于 dashboard。"
#: ../dbgpt/core/interface/output_parser.py:359
msgid "List SQL Output"
msgstr "SQL 列表输出"
#: ../dbgpt/core/interface/output_parser.py:363
msgid "The list output after parsing."
msgstr "上游的模型输出。"
#: ../dbgpt/core/interface/storage.py:391
msgid "Memory Storage" msgid "Memory Storage"
msgstr "消息存储" msgstr "消息存储"
#: ../dbgpt/core/interface/storage.py:393 #: ../dbgpt/core/interface/storage.py:394
msgid "Save your data in memory." msgid "Save your data in memory."
msgstr "" msgstr "将数据保存在内存中。"
#: ../dbgpt/core/interface/storage.py:396 #: ../dbgpt/core/interface/storage.py:397
msgid "Serializer" msgid "Serializer"
msgstr "" msgstr "序列化器"
#: ../dbgpt/core/interface/storage.py:402 #: ../dbgpt/core/interface/storage.py:403
msgid "" msgid ""
"The serializer for serializing the data. If not set, the default JSON " "The serializer for serializing the data. If not set, the default JSON "
"serializer will be used." "serializer will be used."
msgstr "" msgstr "用于序列化数据的序列化器。如果未设置,将使用默认的 JSON 序列化器。"
#: ../dbgpt/core/operators/flow/composer_operator.py:42 #: ../dbgpt/core/operators/flow/composer_operator.py:42
msgid "Conversation Composer Operator" msgid "Conversation Composer Operator"
@ -488,7 +509,7 @@ msgstr "消息存储。"
#: ../dbgpt/core/operators/flow/composer_operator.py:110 #: ../dbgpt/core/operators/flow/composer_operator.py:110
#: ../dbgpt/core/operators/flow/composer_operator.py:226 #: ../dbgpt/core/operators/flow/composer_operator.py:226
#: ../dbgpt/core/awel/trigger/http_trigger.py:209 #: ../dbgpt/core/awel/trigger/http_trigger.py:227
msgid "Common LLM Http Request Body" msgid "Common LLM Http Request Body"
msgstr "通用LLM HTTP请求体" msgstr "通用LLM HTTP请求体"
@ -598,8 +619,8 @@ msgid "The request body to send"
msgstr "API 端点的请求主体" msgstr "API 端点的请求主体"
#: ../dbgpt/core/awel/trigger/ext_http_trigger.py:106 #: ../dbgpt/core/awel/trigger/ext_http_trigger.py:106
#: ../dbgpt/core/awel/trigger/http_trigger.py:974 #: ../dbgpt/core/awel/trigger/http_trigger.py:1076
#: ../dbgpt/core/awel/trigger/http_trigger.py:1025 #: ../dbgpt/core/awel/trigger/http_trigger.py:1127
msgid "Response Body" msgid "Response Body"
msgstr "响应主体" msgstr "响应主体"
@ -643,227 +664,253 @@ msgstr ""
msgid "The cookies to use for the HTTP request" msgid "The cookies to use for the HTTP request"
msgstr "发送 HTTP 请求的 cookies。" msgstr "发送 HTTP 请求的 cookies。"
#: ../dbgpt/core/awel/trigger/http_trigger.py:117 #: ../dbgpt/core/awel/trigger/http_trigger.py:135
msgid "Dict Http Body" msgid "Dict Http Body"
msgstr "字典 HTTP 主体" msgstr "字典 HTTP 主体"
#: ../dbgpt/core/awel/trigger/http_trigger.py:121 #: ../dbgpt/core/awel/trigger/http_trigger.py:139
msgid "Parse the request body as a dict or response body as a dict" msgid "Parse the request body as a dict or response body as a dict"
msgstr "将请求主体解析为字典或响应主体解析为字典" msgstr "将请求主体解析为字典或响应主体解析为字典"
#: ../dbgpt/core/awel/trigger/http_trigger.py:147 #: ../dbgpt/core/awel/trigger/http_trigger.py:165
msgid "String Http Body" msgid "String Http Body"
msgstr "字符串 HTTP 主体" msgstr "字符串 HTTP 主体"
#: ../dbgpt/core/awel/trigger/http_trigger.py:151 #: ../dbgpt/core/awel/trigger/http_trigger.py:169
msgid "Parse the request body as a string or response body as string" msgid "Parse the request body as a string or response body as string"
msgstr "将请求主体解析为字符串或响应主体解析为字符串" msgstr "将请求主体解析为字符串或响应主体解析为字符串"
#: ../dbgpt/core/awel/trigger/http_trigger.py:177 #: ../dbgpt/core/awel/trigger/http_trigger.py:195
msgid "Request Http Body" msgid "Request Http Body"
msgstr "请求 HTTP 主体" msgstr "请求 HTTP 主体"
#: ../dbgpt/core/awel/trigger/http_trigger.py:181 #: ../dbgpt/core/awel/trigger/http_trigger.py:199
msgid "Parse the request body as a starlette Request" msgid "Parse the request body as a starlette Request"
msgstr "将请求主体解析为 starlette 请求" msgstr "将请求主体解析为 starlette 请求"
#: ../dbgpt/core/awel/trigger/http_trigger.py:213 #: ../dbgpt/core/awel/trigger/http_trigger.py:231
msgid "Parse the request body as a common LLM http body" msgid "Parse the request body as a common LLM http body"
msgstr "将请求主体解析为通用 LLM HTTP 主体" msgstr "将请求主体解析为通用 LLM HTTP 主体"
#: ../dbgpt/core/awel/trigger/http_trigger.py:289 #: ../dbgpt/core/awel/trigger/http_trigger.py:307
msgid "Common LLM Http Response Body" msgid "Common LLM Http Response Body"
msgstr "通用 LLM HTTP 响应主体" msgstr "通用 LLM HTTP 响应主体"
#: ../dbgpt/core/awel/trigger/http_trigger.py:293 #: ../dbgpt/core/awel/trigger/http_trigger.py:311
msgid "Parse the response body as a common LLM http body" msgid "Parse the response body as a common LLM http body"
msgstr "将响应主体解析为通用 LLM HTTP 主体" msgstr "将响应主体解析为通用 LLM HTTP 主体"
#: ../dbgpt/core/awel/trigger/http_trigger.py:685 #: ../dbgpt/core/awel/trigger/http_trigger.py:759
#: ../dbgpt/core/awel/trigger/http_trigger.py:991
msgid "API Endpoint" msgid "API Endpoint"
msgstr "API 端点" msgstr "API 端点"
#: ../dbgpt/core/awel/trigger/http_trigger.py:685 #: ../dbgpt/core/awel/trigger/http_trigger.py:759
#: ../dbgpt/core/awel/trigger/http_trigger.py:996
msgid "The API endpoint" msgid "The API endpoint"
msgstr "API 端点" msgstr "API 端点"
#: ../dbgpt/core/awel/trigger/http_trigger.py:688 #: ../dbgpt/core/awel/trigger/http_trigger.py:762
#: ../dbgpt/core/awel/trigger/http_trigger.py:700 #: ../dbgpt/core/awel/trigger/http_trigger.py:774
msgid "Http Methods" msgid "Http Methods"
msgstr "HTTP 方法" msgstr "HTTP 方法"
#: ../dbgpt/core/awel/trigger/http_trigger.py:693 #: ../dbgpt/core/awel/trigger/http_trigger.py:767
#: ../dbgpt/core/awel/trigger/http_trigger.py:705 #: ../dbgpt/core/awel/trigger/http_trigger.py:779
msgid "The methods of the API endpoint" msgid "The methods of the API endpoint"
msgstr "API 端点的方法" msgstr "API 端点的方法"
#: ../dbgpt/core/awel/trigger/http_trigger.py:695 #: ../dbgpt/core/awel/trigger/http_trigger.py:769
#: ../dbgpt/core/awel/trigger/http_trigger.py:709 #: ../dbgpt/core/awel/trigger/http_trigger.py:783
msgid "HTTP Method PUT" msgid "HTTP Method PUT"
msgstr "HTTP PUT 方法" msgstr "HTTP PUT 方法"
#: ../dbgpt/core/awel/trigger/http_trigger.py:696 #: ../dbgpt/core/awel/trigger/http_trigger.py:770
#: ../dbgpt/core/awel/trigger/http_trigger.py:710 #: ../dbgpt/core/awel/trigger/http_trigger.py:784
msgid "HTTP Method POST" msgid "HTTP Method POST"
msgstr "HTTP POST 方法" msgstr "HTTP POST 方法"
#: ../dbgpt/core/awel/trigger/http_trigger.py:707 #: ../dbgpt/core/awel/trigger/http_trigger.py:781
msgid "HTTP Method GET" msgid "HTTP Method GET"
msgstr "HTTP GET 方法" msgstr "HTTP GET 方法"
#: ../dbgpt/core/awel/trigger/http_trigger.py:708 #: ../dbgpt/core/awel/trigger/http_trigger.py:782
msgid "HTTP Method DELETE" msgid "HTTP Method DELETE"
msgstr "HTTP DELETE 方法" msgstr "HTTP DELETE 方法"
#: ../dbgpt/core/awel/trigger/http_trigger.py:714 #: ../dbgpt/core/awel/trigger/http_trigger.py:788
msgid "Streaming Response" msgid "Streaming Response"
msgstr "流式响应" msgstr "流式响应"
#: ../dbgpt/core/awel/trigger/http_trigger.py:719 #: ../dbgpt/core/awel/trigger/http_trigger.py:793
msgid "Whether the response is streaming" msgid "Whether the response is streaming"
msgstr "响应是否为流式传输" msgstr "响应是否为流式传输"
#: ../dbgpt/core/awel/trigger/http_trigger.py:722 #: ../dbgpt/core/awel/trigger/http_trigger.py:796
msgid "Http Response Body" msgid "Http Response Body"
msgstr "HTTP 响应主体" msgstr "HTTP 响应主体"
#: ../dbgpt/core/awel/trigger/http_trigger.py:727 #: ../dbgpt/core/awel/trigger/http_trigger.py:801
#: ../dbgpt/core/awel/trigger/http_trigger.py:977 #: ../dbgpt/core/awel/trigger/http_trigger.py:1079
#: ../dbgpt/core/awel/trigger/http_trigger.py:1028 #: ../dbgpt/core/awel/trigger/http_trigger.py:1130
msgid "The response body of the API endpoint" msgid "The response body of the API endpoint"
msgstr "API 端点的响应主体" msgstr "API 端点的响应主体"
#: ../dbgpt/core/awel/trigger/http_trigger.py:731 #: ../dbgpt/core/awel/trigger/http_trigger.py:805
msgid "Response Media Type" msgid "Response Media Type"
msgstr "响应媒体类型" msgstr "响应媒体类型"
#: ../dbgpt/core/awel/trigger/http_trigger.py:736 #: ../dbgpt/core/awel/trigger/http_trigger.py:810
msgid "The response media type" msgid "The response media type"
msgstr "响应的媒体类型" msgstr "响应的媒体类型"
#: ../dbgpt/core/awel/trigger/http_trigger.py:739 #: ../dbgpt/core/awel/trigger/http_trigger.py:813
msgid "Http Status Code" msgid "Http Status Code"
msgstr "HTTP 状态码" msgstr "HTTP 状态码"
#: ../dbgpt/core/awel/trigger/http_trigger.py:744 #: ../dbgpt/core/awel/trigger/http_trigger.py:818
msgid "The http status code" msgid "The http status code"
msgstr "HTTP 状态码" msgstr "HTTP 状态码"
#: ../dbgpt/core/awel/trigger/http_trigger.py:755 #: ../dbgpt/core/awel/trigger/http_trigger.py:829
msgid "Dict Http Trigger" msgid "Dict Http Trigger"
msgstr "字典 HTTP 触发器" msgstr "字典 HTTP 触发器"
#: ../dbgpt/core/awel/trigger/http_trigger.py:760 #: ../dbgpt/core/awel/trigger/http_trigger.py:834
msgid "" msgid ""
"Trigger your workflow by http request, and parse the request body as a dict" "Trigger your workflow by http request, and parse the request body as a dict"
msgstr "通过 HTTP 请求触发您的工作流,并将请求主体解析为字典" msgstr "通过 HTTP 请求触发您的工作流,并将请求主体解析为字典"
#: ../dbgpt/core/awel/trigger/http_trigger.py:769 #: ../dbgpt/core/awel/trigger/http_trigger.py:843
#: ../dbgpt/core/awel/trigger/http_trigger.py:1020 #: ../dbgpt/core/awel/trigger/http_trigger.py:1122
#: ../dbgpt/core/awel/trigger/http_trigger.py:1077 #: ../dbgpt/core/awel/trigger/http_trigger.py:1179
#: ../dbgpt/core/awel/trigger/http_trigger.py:1126 #: ../dbgpt/core/awel/trigger/http_trigger.py:1228
msgid "The request body of the API endpoint" msgid "The request body of the API endpoint"
msgstr "API 端点的请求主体" msgstr "API 端点的请求主体"
#: ../dbgpt/core/awel/trigger/http_trigger.py:814 #: ../dbgpt/core/awel/trigger/http_trigger.py:888
msgid "String Http Trigger" msgid "String Http Trigger"
msgstr "字符串 HTTP 触发器" msgstr "字符串 HTTP 触发器"
#: ../dbgpt/core/awel/trigger/http_trigger.py:819 #: ../dbgpt/core/awel/trigger/http_trigger.py:893
msgid "" msgid ""
"Trigger your workflow by http request, and parse the request body as a string" "Trigger your workflow by http request, and parse the request body as a string"
msgstr "通过 HTTP 请求触发您的工作流,并将请求主体解析为字符串" msgstr "通过 HTTP 请求触发您的工作流,并将请求主体解析为字符串"
#: ../dbgpt/core/awel/trigger/http_trigger.py:829 #: ../dbgpt/core/awel/trigger/http_trigger.py:903
msgid "The request body of the API endpoint, parse as a json string" msgid "The request body of the API endpoint, parse as a json string"
msgstr "API 端点的请求主体,解析为 JSON 字符串" msgstr "API 端点的请求主体,解析为 JSON 字符串"
#: ../dbgpt/core/awel/trigger/http_trigger.py:875 #: ../dbgpt/core/awel/trigger/http_trigger.py:959
msgid "Common LLM Http Trigger" msgid "Common LLM Http Trigger"
msgstr "常见 LLM Http 触发器" msgstr "常见 LLM Http 触发器"
#: ../dbgpt/core/awel/trigger/http_trigger.py:880 #: ../dbgpt/core/awel/trigger/http_trigger.py:964
msgid "" msgid ""
"Trigger your workflow by http request, and parse the request body as a " "Trigger your workflow by http request, and parse the request body as a "
"common LLM http body" "common LLM http body"
msgstr "通过 HTTP 请求触发您的工作流,并将请求主体解析为常见的 LLM HTTP 主体" msgstr "通过 HTTP 请求触发您的工作流,并将请求主体解析为常见的 LLM HTTP 主体"
#: ../dbgpt/core/awel/trigger/http_trigger.py:890 #: ../dbgpt/core/awel/trigger/http_trigger.py:974
msgid "The request body of the API endpoint, parse as a common LLM http body" msgid "The request body of the API endpoint, parse as a common LLM http body"
msgstr "API 端点的请求主体,解析为常见的 LLM HTTP 主体" msgstr "API 端点的请求主体,解析为常见的 LLM HTTP 主体"
#: ../dbgpt/core/awel/trigger/http_trigger.py:934 #: ../dbgpt/core/awel/trigger/http_trigger.py:979
#, fuzzy
msgid "Request String Messages"
msgstr "请求HTTP触发器"
#: ../dbgpt/core/awel/trigger/http_trigger.py:983
#, fuzzy
msgid ""
"The request string messages of the API endpoint, parsed from 'messages' "
"field of the request body"
msgstr "API 端点的请求主体,解析为 starlette 请求"
#: ../dbgpt/core/awel/trigger/http_trigger.py:1036
msgid "Example Http Response" msgid "Example Http Response"
msgstr "示例 HTTP 响应" msgstr "示例 HTTP 响应"
#: ../dbgpt/core/awel/trigger/http_trigger.py:938 #: ../dbgpt/core/awel/trigger/http_trigger.py:1040
msgid "Example Http Request" msgid "Example Http Request"
msgstr "示例 HTTP 请求" msgstr "示例 HTTP 请求"
#: ../dbgpt/core/awel/trigger/http_trigger.py:960 #: ../dbgpt/core/awel/trigger/http_trigger.py:1062
#: ../dbgpt/core/awel/trigger/http_trigger.py:980 #: ../dbgpt/core/awel/trigger/http_trigger.py:1082
msgid "Example Http Hello Operator" msgid "Example Http Hello Operator"
msgstr "示例 HTTP Hello 算子" msgstr "示例 HTTP Hello 算子"
#: ../dbgpt/core/awel/trigger/http_trigger.py:966 #: ../dbgpt/core/awel/trigger/http_trigger.py:1068
msgid "Http Request Body" msgid "Http Request Body"
msgstr "HTTP 请求主体" msgstr "HTTP 请求主体"
#: ../dbgpt/core/awel/trigger/http_trigger.py:969 #: ../dbgpt/core/awel/trigger/http_trigger.py:1071
msgid "The request body of the API endpoint(Dict[str, Any])" msgid "The request body of the API endpoint(Dict[str, Any])"
msgstr "API 端点的请求主体(字典[str, Any]" msgstr "API 端点的请求主体(字典[str, Any]"
#: ../dbgpt/core/awel/trigger/http_trigger.py:1000 #: ../dbgpt/core/awel/trigger/http_trigger.py:1102
msgid "Request Body To Dict Operator" msgid "Request Body To Dict Operator"
msgstr "请求主体转换为字典算子" msgstr "请求主体转换为字典算子"
#: ../dbgpt/core/awel/trigger/http_trigger.py:1005 #: ../dbgpt/core/awel/trigger/http_trigger.py:1107
msgid "Prefix Key" msgid "Prefix Key"
msgstr "前缀键" msgstr "前缀键"
#: ../dbgpt/core/awel/trigger/http_trigger.py:1011 #: ../dbgpt/core/awel/trigger/http_trigger.py:1113
msgid "The prefix key of the dict, link 'message' or 'extra.info'" msgid "The prefix key of the dict, link 'message' or 'extra.info'"
msgstr "字典的前缀键,链接 'message' 或 'extra.info'" msgstr "字典的前缀键,链接 'message' 或 'extra.info'"
#: ../dbgpt/core/awel/trigger/http_trigger.py:1059 #: ../dbgpt/core/awel/trigger/http_trigger.py:1161
msgid "User Input Parsed Operator" msgid "User Input Parsed Operator"
msgstr "用户输入解析算子" msgstr "用户输入解析算子"
#: ../dbgpt/core/awel/trigger/http_trigger.py:1064 #: ../dbgpt/core/awel/trigger/http_trigger.py:1166
#: ../dbgpt/core/awel/trigger/http_trigger.py:1113 #: ../dbgpt/core/awel/trigger/http_trigger.py:1215
msgid "Key" msgid "Key"
msgstr "键" msgstr "键"
#: ../dbgpt/core/awel/trigger/http_trigger.py:1069 #: ../dbgpt/core/awel/trigger/http_trigger.py:1171
#: ../dbgpt/core/awel/trigger/http_trigger.py:1118 #: ../dbgpt/core/awel/trigger/http_trigger.py:1220
msgid "The key of the dict, link 'user_input'" msgid "The key of the dict, link 'user_input'"
msgstr "字典的键,链接 'user_input'" msgstr "字典的键,链接 'user_input'"
#: ../dbgpt/core/awel/trigger/http_trigger.py:1082 #: ../dbgpt/core/awel/trigger/http_trigger.py:1184
msgid "User Input Dict" msgid "User Input Dict"
msgstr "用户输入字典" msgstr "用户输入字典"
#: ../dbgpt/core/awel/trigger/http_trigger.py:1085 #: ../dbgpt/core/awel/trigger/http_trigger.py:1187
#: ../dbgpt/core/awel/trigger/http_trigger.py:1134 #: ../dbgpt/core/awel/trigger/http_trigger.py:1236
msgid "The user input dict of the API endpoint" msgid "The user input dict of the API endpoint"
msgstr "API 端点的用户输入字典" msgstr "API 端点的用户输入字典"
#: ../dbgpt/core/awel/trigger/http_trigger.py:1089 #: ../dbgpt/core/awel/trigger/http_trigger.py:1191
msgid "" msgid ""
"User input parsed operator, parse the user input from request body and " "User input parsed operator, parse the user input from request body and "
"return as a dict" "return as a dict"
msgstr "用户输入解析算子,从请求主体解析用户输入并返回为字典" msgstr "用户输入解析算子,从请求主体解析用户输入并返回为字典"
#: ../dbgpt/core/awel/trigger/http_trigger.py:1108 #: ../dbgpt/core/awel/trigger/http_trigger.py:1210
msgid "Request Body Parsed To String Operator" msgid "Request Body Parsed To String Operator"
msgstr "请求主体解析为字符串算子" msgstr "请求主体解析为字符串算子"
#: ../dbgpt/core/awel/trigger/http_trigger.py:1131 #: ../dbgpt/core/awel/trigger/http_trigger.py:1233
msgid "User Input String" msgid "User Input String"
msgstr "用户输入字符串" msgstr "用户输入字符串"
#: ../dbgpt/core/awel/trigger/http_trigger.py:1138 #: ../dbgpt/core/awel/trigger/http_trigger.py:1240
msgid "" msgid ""
"User input parsed operator, parse the user input from request body and " "User input parsed operator, parse the user input from request body and "
"return as a string" "return as a string"
msgstr "用户输入解析算子,从请求主体解析用户输入并返回为字符串" msgstr "用户输入解析算子,从请求主体解析用户输入并返回为字符串"
#~ msgid "Streaming Task Name"
#~ msgstr "流式任务名称"
#~ msgid "The name of the streaming task."
#~ msgstr "流式任务的名称。"
#~ msgid "Non-Streaming Task Name"
#~ msgstr "非流式任务名称"
#~ msgid "The name of the non-streaming task."
#~ msgstr "非流式任务的名称。"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-06-17 00:05+0800\n" "POT-Creation-Date: 2024-09-06 16:14+0800\n"
"PO-Revision-Date: 2024-03-24 11:24+0800\n" "PO-Revision-Date: 2024-03-24 11:24+0800\n"
"Last-Translator: Automatically generated\n" "Last-Translator: Automatically generated\n"
"Language-Team: none\n" "Language-Team: none\n"
@ -17,6 +17,42 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: ../dbgpt/serve/agent/resource/datasource.py:88
msgid "Datasource Resource"
msgstr "数据源资源"
#: ../dbgpt/serve/agent/resource/datasource.py:92
msgid ""
"Connect to a datasource(retrieve table schemas and execute SQL to fetch "
"data)."
msgstr "连接到数据源(检索表模式并执行 SQL 以获取数据)。"
#: ../dbgpt/serve/agent/resource/datasource.py:97
#, fuzzy
msgid "Datasource Name"
msgstr "数据源名称"
#: ../dbgpt/serve/agent/resource/datasource.py:102
msgid "The name of the datasource, default is 'datasource'."
msgstr "数据源的名称,默认是 'datasource'。"
#: ../dbgpt/serve/agent/resource/datasource.py:105
msgid "DB Name"
msgstr "数据库名称"
#: ../dbgpt/serve/agent/resource/datasource.py:108
msgid "The name of the database."
msgstr "数据库的名称。"
#: ../dbgpt/serve/agent/resource/datasource.py:112
#, fuzzy
msgid "Prompt Template"
msgstr "提示模板"
#: ../dbgpt/serve/agent/resource/datasource.py:121
msgid "The prompt template to build a database prompt."
msgstr "用于构建数据库提示的提示模板。"
#: ../dbgpt/serve/rag/operators/knowledge_space.py:47 #: ../dbgpt/serve/rag/operators/knowledge_space.py:47
msgid "Knowledge Space Operator" msgid "Knowledge Space Operator"
msgstr "知识空间算子" msgstr "知识空间算子"
@ -107,23 +143,23 @@ msgstr "格式化消息"
msgid "The formatted messages." msgid "The formatted messages."
msgstr "格式化的消息。" msgstr "格式化的消息。"
#: ../dbgpt/serve/rag/connector.py:39 #: ../dbgpt/serve/rag/connector.py:40
msgid "Vector Store Connector" msgid "Vector Store Connector"
msgstr "向量存储连接器" msgstr "向量存储连接器"
#: ../dbgpt/serve/rag/connector.py:44 #: ../dbgpt/serve/rag/connector.py:45
msgid "Vector Store Type" msgid "Vector Store Type"
msgstr "向量存储类型" msgstr "向量存储类型"
#: ../dbgpt/serve/rag/connector.py:47 #: ../dbgpt/serve/rag/connector.py:48
msgid "The type of vector store." msgid "The type of vector store."
msgstr "向量存储的类型。" msgstr "向量存储的类型。"
#: ../dbgpt/serve/rag/connector.py:51 #: ../dbgpt/serve/rag/connector.py:52
msgid "Vector Store Implementation" msgid "Vector Store Implementation"
msgstr "向量存储实现" msgstr "向量存储实现"
#: ../dbgpt/serve/rag/connector.py:54 #: ../dbgpt/serve/rag/connector.py:55
msgid "The vector store implementation." msgid "The vector store implementation."
msgstr "向量存储的实现。" msgstr "向量存储的实现。"
@ -135,7 +171,7 @@ msgstr "默认聊天历史加载算子"
msgid "" msgid ""
"Load chat history from the storage of the serve component.It is the default " "Load chat history from the storage of the serve component.It is the default "
"storage of DB-GPT" "storage of DB-GPT"
msgstr "从 serve 组件的存储中加载聊天记录,这是 DB-GPT 的默认存储" msgstr "从 serve 组件的存储中加载聊天记录,这是 DB-GPT 的默认存储"
#: ../dbgpt/serve/conversation/operators.py:97 #: ../dbgpt/serve/conversation/operators.py:97
msgid "Model Request" msgid "Model Request"
@ -143,7 +179,7 @@ msgstr "模型请求"
#: ../dbgpt/serve/conversation/operators.py:100 #: ../dbgpt/serve/conversation/operators.py:100
msgid "The model request." msgid "The model request."
msgstr "这是模型请求。" msgstr "模型请求。"
#: ../dbgpt/serve/conversation/operators.py:105 #: ../dbgpt/serve/conversation/operators.py:105
msgid "Stored Messages" msgid "Stored Messages"
@ -152,3 +188,84 @@ msgstr "存储的消息"
#: ../dbgpt/serve/conversation/operators.py:108 #: ../dbgpt/serve/conversation/operators.py:108
msgid "The messages stored in the storage." msgid "The messages stored in the storage."
msgstr "存储在存储中的消息。" msgstr "存储在存储中的消息。"
#: ../dbgpt/serve/flow/service/variables_service.py:33
msgid "All AWEL Flows"
msgstr "所有 AWEL 工作流"
#: ../dbgpt/serve/flow/service/variables_service.py:34
msgid "Fetch all AWEL flows in the system"
msgstr "获取系统中所有 AWEL 工作流"
#: ../dbgpt/serve/flow/service/variables_service.py:41
msgid "All AWEL Flow Nodes"
msgstr "所有 AWEL 工作流节点"
#: ../dbgpt/serve/flow/service/variables_service.py:42
msgid "Fetch all AWEL flow nodes in the system"
msgstr "获取系统中所有 AWEL 工作流节点"
#: ../dbgpt/serve/flow/service/variables_service.py:49
msgid "All Variables"
msgstr "所有变量"
#: ../dbgpt/serve/flow/service/variables_service.py:50
msgid "Fetch all variables in the system"
msgstr "获取系统中所有变量"
#: ../dbgpt/serve/flow/service/variables_service.py:57
msgid "All Secrets"
msgstr "所有密钥"
#: ../dbgpt/serve/flow/service/variables_service.py:58
msgid "Fetch all secrets in the system"
msgstr "获取系统中所有密钥"
#: ../dbgpt/serve/flow/service/variables_service.py:65
msgid "All LLMs"
msgstr "所有大语言模型"
#: ../dbgpt/serve/flow/service/variables_service.py:66
msgid "Fetch all LLMs in the system"
msgstr "获取系统中所有大语言模型"
#: ../dbgpt/serve/flow/service/variables_service.py:73
msgid "All Embeddings"
msgstr "所有嵌入模型"
#: ../dbgpt/serve/flow/service/variables_service.py:74
msgid "Fetch all embeddings models in the system"
msgstr "获取系统中所有嵌入模型"
#: ../dbgpt/serve/flow/service/variables_service.py:81
msgid "All Rerankers"
msgstr "所有重排序器"
#: ../dbgpt/serve/flow/service/variables_service.py:82
msgid "Fetch all rerankers in the system"
msgstr "获取系统中所有重排序器"
#: ../dbgpt/serve/flow/service/variables_service.py:89
msgid "All Data Sources"
msgstr "所有数据源"
#: ../dbgpt/serve/flow/service/variables_service.py:90
msgid "Fetch all data sources in the system"
msgstr "获取系统中所有数据源"
#: ../dbgpt/serve/flow/service/variables_service.py:97
msgid "All Agents"
msgstr "所有智能体"
#: ../dbgpt/serve/flow/service/variables_service.py:98
msgid "Fetch all agents in the system"
msgstr "获取系统中所有智能体"
#: ../dbgpt/serve/flow/service/variables_service.py:105
#, fuzzy
msgid "All Knowledge Spaces"
msgstr "所有知识空间"
#: ../dbgpt/serve/flow/service/variables_service.py:106
msgid "Fetch all knowledge spaces in the system"
msgstr "获取系统中所有知识空间"

View File

@ -1,4 +1,5 @@
"""Translate the po file content to Chinese using LLM.""" """Translate the po file content to Chinese using LLM."""
from typing import List, Dict, Any from typing import List, Dict, Any
import asyncio import asyncio
import os import os
@ -147,6 +148,8 @@ vocabulary_map = {
"RAG": "RAG", "RAG": "RAG",
"DB-GPT": "DB-GPT", "DB-GPT": "DB-GPT",
"AWEL flow": "AWEL 工作流", "AWEL flow": "AWEL 工作流",
"Agent": "智能体",
"Agents": "智能体",
}, },
"default": { "default": {
"Transformer": "Transformer", "Transformer": "Transformer",
@ -159,6 +162,8 @@ vocabulary_map = {
"RAG": "RAG", "RAG": "RAG",
"DB-GPT": "DB-GPT", "DB-GPT": "DB-GPT",
"AWEL flow": "AWEL flow", "AWEL flow": "AWEL flow",
"Agent": "Agent",
"Agents": "Agents",
}, },
} }

View File

@ -190,6 +190,11 @@ def get_cpu_avx_support() -> Tuple[OSType, AVXType]:
print("Current platform is windows, use avx2 as default cpu architecture") print("Current platform is windows, use avx2 as default cpu architecture")
elif system == "Linux": elif system == "Linux":
os_type = OSType.LINUX os_type = OSType.LINUX
if os.path.exists("/etc/alpine-release"):
# For Alpine, we'll check /proc/cpuinfo directly
with open("/proc/cpuinfo", "r") as f:
output = f.read()
else:
result = subprocess.run( result = subprocess.run(
["lscpu"], stdout=subprocess.PIPE, stderr=subprocess.PIPE ["lscpu"], stdout=subprocess.PIPE, stderr=subprocess.PIPE
) )
@ -443,6 +448,7 @@ def core_requires():
"termcolor", "termcolor",
# https://github.com/eosphoros-ai/DB-GPT/issues/551 # https://github.com/eosphoros-ai/DB-GPT/issues/551
# TODO: remove pandas dependency # TODO: remove pandas dependency
# alpine can't install pandas by default
"pandas==2.0.3", "pandas==2.0.3",
# numpy should less than 2.0.0 # numpy should less than 2.0.0
"numpy>=1.21.0,<2.0.0", "numpy>=1.21.0,<2.0.0",
@ -459,6 +465,8 @@ def core_requires():
"SQLAlchemy>=2.0.25,<2.0.29", "SQLAlchemy>=2.0.25,<2.0.29",
# for cache # for cache
"msgpack", "msgpack",
# for AWEL operator serialization
"cloudpickle",
# for cache # for cache
# TODO: pympler has not been updated for a long time and needs to # TODO: pympler has not been updated for a long time and needs to
# find a new toolkit. # find a new toolkit.
@ -500,6 +508,22 @@ def core_requires():
"graphviz", "graphviz",
# For security # For security
"cryptography", "cryptography",
# For high performance RPC communication in code execution
"pyzmq",
]
def code_execution_requires():
"""
pip install "dbgpt[code]"
Code execution dependencies. For building a docker image.
"""
setup_spec.extras["code"] = setup_spec.extras["core"] + [
"pyzmq",
"msgpack",
# for AWEL operator serialization
"cloudpickle",
] ]
@ -720,6 +744,7 @@ def init_install_requires():
core_requires() core_requires()
code_execution_requires()
torch_requires() torch_requires()
llama_cpp_requires() llama_cpp_requires()
quantization_requires() quantization_requires()