mirror of
https://github.com/langgenius/dify.git
synced 2026-01-14 02:27:00 +00:00
Compare commits
1 Commits
fix/reset-
...
feat/agent
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
096661b874 |
@@ -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
|
||||
|
||||
|
||||
@@ -2127,7 +2127,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
|
||||
|
||||
@@ -2144,14 +2144,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
|
||||
|
||||
Reference in New Issue
Block a user