fix: correct typo in agent state transition log message

This commit is contained in:
Soulter
2025-11-24 00:03:22 +08:00
parent 99b061a143
commit 66b3eed273
2 changed files with 4 additions and 2 deletions

View File

@@ -61,5 +61,5 @@ class BaseAgentRunner(T.Generic[TContext]):
def _transition_state(self, new_state: AgentState) -> None:
"""Transition the agent state."""
if self._state != new_state:
logger.debug(f"Dify Agent state transition: {self._state} -> {new_state}")
logger.debug(f"Agent state transition: {self._state} -> {new_state}")
self._state = new_state

View File

@@ -1,4 +1,5 @@
import codecs
import io
import json
from collections.abc import AsyncGenerator
from typing import Any
@@ -108,9 +109,10 @@ class DifyAPIClient:
url = f"{self.api_base}/files/upload"
if file_data is not None:
io_data = io.BytesIO(file_data)
payload = {
"user": user,
"file": file_data,
"file": io_data,
}
async with self.session.post(
url,