mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 23:57:06 +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_has_entity_name = True
|
||||||
_attr_name = None
|
_attr_name = None
|
||||||
|
_attr_supports_streaming = True
|
||||||
|
|
||||||
def __init__(self, entry: AnthropicConfigEntry) -> None:
|
def __init__(self, entry: AnthropicConfigEntry) -> None:
|
||||||
"""Initialize the agent."""
|
"""Initialize the agent."""
|
||||||
|
@ -89,9 +89,11 @@ def _parse_tool_args(arguments: dict[str, Any]) -> dict[str, Any]:
|
|||||||
|
|
||||||
|
|
||||||
def _convert_content(
|
def _convert_content(
|
||||||
chat_content: conversation.Content
|
chat_content: (
|
||||||
| conversation.ToolResultContent
|
conversation.Content
|
||||||
| conversation.AssistantContent,
|
| conversation.ToolResultContent
|
||||||
|
| conversation.AssistantContent
|
||||||
|
),
|
||||||
) -> ollama.Message:
|
) -> ollama.Message:
|
||||||
"""Create tool response content."""
|
"""Create tool response content."""
|
||||||
if isinstance(chat_content, conversation.ToolResultContent):
|
if isinstance(chat_content, conversation.ToolResultContent):
|
||||||
@ -172,6 +174,7 @@ class OllamaConversationEntity(
|
|||||||
"""Ollama conversation agent."""
|
"""Ollama conversation agent."""
|
||||||
|
|
||||||
_attr_has_entity_name = True
|
_attr_has_entity_name = True
|
||||||
|
_attr_supports_streaming = True
|
||||||
|
|
||||||
def __init__(self, entry: ConfigEntry) -> None:
|
def __init__(self, entry: ConfigEntry) -> None:
|
||||||
"""Initialize the agent."""
|
"""Initialize the agent."""
|
||||||
|
@ -231,6 +231,7 @@ class OpenAIConversationEntity(
|
|||||||
|
|
||||||
_attr_has_entity_name = True
|
_attr_has_entity_name = True
|
||||||
_attr_name = None
|
_attr_name = None
|
||||||
|
_attr_supports_streaming = True
|
||||||
|
|
||||||
def __init__(self, entry: OpenAIConfigEntry) -> None:
|
def __init__(self, entry: OpenAIConfigEntry) -> None:
|
||||||
"""Initialize the agent."""
|
"""Initialize the agent."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user