Mark LLMs that support streaming as such (#145405)

This commit is contained in:
Paulus Schoutsen 2025-05-21 18:54:29 -04:00 committed by GitHub
parent 088cfc3576
commit 12376a2338
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 3 deletions

View File

@ -326,6 +326,7 @@ class AnthropicConversationEntity(
_attr_has_entity_name = True
_attr_name = None
_attr_supports_streaming = True
def __init__(self, entry: AnthropicConfigEntry) -> None:
"""Initialize the agent."""

View File

@ -89,9 +89,11 @@ def _parse_tool_args(arguments: dict[str, Any]) -> dict[str, Any]:
def _convert_content(
chat_content: conversation.Content
| conversation.ToolResultContent
| conversation.AssistantContent,
chat_content: (
conversation.Content
| conversation.ToolResultContent
| conversation.AssistantContent
),
) -> ollama.Message:
"""Create tool response content."""
if isinstance(chat_content, conversation.ToolResultContent):
@ -172,6 +174,7 @@ class OllamaConversationEntity(
"""Ollama conversation agent."""
_attr_has_entity_name = True
_attr_supports_streaming = True
def __init__(self, entry: ConfigEntry) -> None:
"""Initialize the agent."""

View File

@ -231,6 +231,7 @@ class OpenAIConversationEntity(
_attr_has_entity_name = True
_attr_name = None
_attr_supports_streaming = True
def __init__(self, entry: OpenAIConfigEntry) -> None:
"""Initialize the agent."""