mirror of
https://github.com/langgenius/dify.git
synced 2026-01-14 06:07:33 +08:00
[autofix.ci] apply automated fixes
This commit is contained in:
parent
eec57e84e4
commit
096661b874
@ -1529,7 +1529,7 @@ class LLMNode(Node[LLMNodeData]):
|
|||||||
model_instance: ModelInstance,
|
model_instance: ModelInstance,
|
||||||
prompt_messages: Sequence[PromptMessage],
|
prompt_messages: Sequence[PromptMessage],
|
||||||
stop: Sequence[str] | None,
|
stop: Sequence[str] | None,
|
||||||
files: Sequence["File"],
|
files: Sequence[File],
|
||||||
variable_pool: VariablePool,
|
variable_pool: VariablePool,
|
||||||
node_inputs: dict[str, Any],
|
node_inputs: dict[str, Any],
|
||||||
process_data: dict[str, Any],
|
process_data: dict[str, Any],
|
||||||
@ -1636,7 +1636,7 @@ class LLMNode(Node[LLMNodeData]):
|
|||||||
|
|
||||||
return tool_instances
|
return tool_instances
|
||||||
|
|
||||||
def _extract_prompt_files(self, variable_pool: VariablePool) -> list["File"]:
|
def _extract_prompt_files(self, variable_pool: VariablePool) -> list[File]:
|
||||||
"""Extract files from prompt template variables."""
|
"""Extract files from prompt template variables."""
|
||||||
from core.variables import ArrayFileVariable, FileVariable
|
from core.variables import ArrayFileVariable, FileVariable
|
||||||
|
|
||||||
|
|||||||
@ -2127,7 +2127,7 @@ class LLMGenerationDetail(Base):
|
|||||||
|
|
||||||
created_at: Mapped[datetime] = mapped_column(sa.DateTime, nullable=False, server_default=func.current_timestamp())
|
created_at: Mapped[datetime] = mapped_column(sa.DateTime, nullable=False, server_default=func.current_timestamp())
|
||||||
|
|
||||||
def to_domain_model(self) -> "LLMGenerationDetailData":
|
def to_domain_model(self) -> LLMGenerationDetailData:
|
||||||
"""Convert to Pydantic domain model with proper validation."""
|
"""Convert to Pydantic domain model with proper validation."""
|
||||||
from core.app.entities.llm_generation_entities import LLMGenerationDetailData
|
from core.app.entities.llm_generation_entities import LLMGenerationDetailData
|
||||||
|
|
||||||
@ -2144,14 +2144,14 @@ class LLMGenerationDetail(Base):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def from_domain_model(
|
def from_domain_model(
|
||||||
cls,
|
cls,
|
||||||
data: "LLMGenerationDetailData",
|
data: LLMGenerationDetailData,
|
||||||
*,
|
*,
|
||||||
tenant_id: str,
|
tenant_id: str,
|
||||||
app_id: str,
|
app_id: str,
|
||||||
message_id: str | None = None,
|
message_id: str | None = None,
|
||||||
workflow_run_id: str | None = None,
|
workflow_run_id: str | None = None,
|
||||||
node_id: str | None = None,
|
node_id: str | None = None,
|
||||||
) -> "LLMGenerationDetail":
|
) -> LLMGenerationDetail:
|
||||||
"""Create from Pydantic domain model."""
|
"""Create from Pydantic domain model."""
|
||||||
# Enforce association mode at object creation time as well.
|
# Enforce association mode at object creation time as well.
|
||||||
message_mode = message_id is not None
|
message_mode = message_id is not None
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user