refactor: Refactor for core SDK (#1092)

This commit is contained in:
Fangyin Cheng
2024-01-21 09:57:57 +08:00
committed by GitHub
parent ba7248adbb
commit 2d905191f8
45 changed files with 236 additions and 133 deletions

View File

@@ -70,7 +70,7 @@ class ChatHistoryPromptComposerOperator(MapOperator[ChatComposerInput, ModelRequ
end_node: BaseOperator = cast(BaseOperator, self._sub_compose_dag.leaf_nodes[0])
# Sub dag, use the same dag context in the parent dag
return await end_node.call(
call_data={"data": input_value}, dag_ctx=self.current_dag_context
call_data=input_value, dag_ctx=self.current_dag_context
)
def _build_composer_dag(self) -> DAG:

View File

@@ -150,7 +150,7 @@ class PromptBuilderOperator(
)
)
single_input = {"data": {"dialect": "mysql"}}
single_input = {"dialect": "mysql"}
single_expected_messages = [
ModelMessage(
content="Please write a mysql SQL count the length of a field",