mirror of https://github.com/langgenius/dify.git
fix linter
This commit is contained in:
parent
6d9d2a1079
commit
f4f391ada0
|
|
@ -1529,7 +1529,7 @@ class LLMNode(Node[LLMNodeData]):
|
|||
model_instance: ModelInstance,
|
||||
prompt_messages: Sequence[PromptMessage],
|
||||
stop: Sequence[str] | None,
|
||||
files: Sequence["File"],
|
||||
files: Sequence[File],
|
||||
variable_pool: VariablePool,
|
||||
node_inputs: dict[str, Any],
|
||||
process_data: dict[str, Any],
|
||||
|
|
@ -1636,7 +1636,7 @@ class LLMNode(Node[LLMNodeData]):
|
|||
|
||||
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."""
|
||||
from core.variables import ArrayFileVariable, FileVariable
|
||||
|
||||
|
|
|
|||
|
|
@ -2153,7 +2153,7 @@ class LLMGenerationDetail(Base):
|
|||
|
||||
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."""
|
||||
from core.app.entities.llm_generation_entities import LLMGenerationDetailData
|
||||
|
||||
|
|
@ -2170,14 +2170,14 @@ class LLMGenerationDetail(Base):
|
|||
@classmethod
|
||||
def from_domain_model(
|
||||
cls,
|
||||
data: "LLMGenerationDetailData",
|
||||
data: LLMGenerationDetailData,
|
||||
*,
|
||||
tenant_id: str,
|
||||
app_id: str,
|
||||
message_id: str | None = None,
|
||||
workflow_run_id: str | None = None,
|
||||
node_id: str | None = None,
|
||||
) -> "LLMGenerationDetail":
|
||||
) -> LLMGenerationDetail:
|
||||
"""Create from Pydantic domain model."""
|
||||
# Enforce association mode at object creation time as well.
|
||||
message_mode = message_id is not None
|
||||
|
|
|
|||
Loading…
Reference in New Issue