chore: avoid implicit optional in type annotations of method (#8727)

This commit is contained in:
Bowen Liang
2024-10-09 14:36:43 +08:00
committed by GitHub
parent b360feb4c1
commit 240b66d737
37 changed files with 91 additions and 71 deletions

View File

@@ -1,3 +1,5 @@
from typing import Optional
from core.model_runtime.entities.llm_entities import LLMResult
from core.model_runtime.entities.message_entities import PromptMessage, SystemPromptMessage, UserPromptMessage
from core.tools.entities.tool_entities import ToolProviderType
@@ -124,7 +126,7 @@ class BuiltinTool(Tool):
return result
def get_url(self, url: str, user_agent: str = None) -> str:
def get_url(self, url: str, user_agent: Optional[str] = None) -> str:
"""
get url
"""