Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions python/dify_plugin/entities/model/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class LLMResultChunkDelta(BaseModel):

index: int
message: AssistantPromptMessage
reasoning_content: str | None = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve code clarity and maintainability, it's good practice to add a description for new model fields. This is especially helpful when the field's purpose, like with reasoning_content, is part of a larger architectural change. Using pydantic.Field to add a description will make the model's intent clearer for future developers and will be included in any generated schemas.

Suggested change
reasoning_content: str | None = None
reasoning_content: str | None = Field(default=None, description="The reasoning/thinking content from the LLM, separate from the main message content.")

usage: LLMUsage | None = None
finish_reason: str | None = None

Expand Down