mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
Mark LLMs that support streaming as such (#145405)
This commit is contained in:
parent
088cfc3576
commit
12376a2338
@ -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."""
|
||||
|
@ -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."""
|
||||
|
@ -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."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user