Fix/plugin race condition (#14253)

This commit is contained in:
Yeuoly 2025-02-25 12:20:47 +08:00 committed by GitHub
commit 490b6d092e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 116 additions and 41 deletions

View file

@ -1,7 +1,7 @@
from enum import StrEnum
from typing import Any, Optional, Union
from pydantic import BaseModel
from pydantic import BaseModel, Field
from core.tools.entities.tool_entities import ToolInvokeMessage, ToolProviderType
@ -14,7 +14,7 @@ class AgentToolEntity(BaseModel):
provider_type: ToolProviderType
provider_id: str
tool_name: str
tool_parameters: dict[str, Any] = {}
tool_parameters: dict[str, Any] = Field(default_factory=dict)
plugin_unique_identifier: str | None = None