| 1 |
"""LLM package. |
| 2 |
|
| 3 |
This package contains the Cloud LLM handler and related stream event models. |
| 4 |
It replaces the historical `hass_nabucasa.llm` module (now a package). |
| 5 |
""" |
| 6 |
|
| 7 |
from __future__ import annotations |
| 8 |
|
| 9 |
from .errors import ( |
| 10 |
LLMAuthenticationError, |
| 11 |
LLMError, |
| 12 |
LLMRateLimitError, |
| 13 |
LLMRequestError, |
| 14 |
LLMResponseError, |
| 15 |
LLMServiceError, |
| 16 |
LLMStreamEventError, |
| 17 |
LLMStreamEventParseError, |
| 18 |
) |
| 19 |
from .handler import ( |
| 20 |
LLMConnectionDetails, |
| 21 |
LLMGeneratedData, |
| 22 |
LLMGeneratedImage, |
| 23 |
LLMHandler, |
| 24 |
LLMImageAttachment, |
| 25 |
ResponseInputParam, |
| 26 |
) |
| 27 |
from .stream_events import ( |
| 28 |
LLMResponseCompletedEvent, |
| 29 |
LLMResponseErrorEvent, |
| 30 |
LLMResponseFailedEvent, |
| 31 |
LLMResponseFunctionCallArgumentsDeltaEvent, |
| 32 |
LLMResponseFunctionCallArgumentsDoneEvent, |
| 33 |
LLMResponseFunctionCallOutputItem, |
| 34 |
LLMResponseImageOutputItem, |
| 35 |
LLMResponseIncompleteEvent, |
| 36 |
LLMResponseMessageOutputItem, |
| 37 |
LLMResponseOutputItemAddedEvent, |
| 38 |
LLMResponseOutputItemDoneEvent, |
| 39 |
LLMResponseOutputTextDeltaEvent, |
| 40 |
LLMResponseReasoningOutputItem, |
| 41 |
LLMResponseReasoningSummaryTextDeltaEvent, |
| 42 |
LLMResponseWebSearchCallOutputItem, |
| 43 |
LLMResponseWebSearchCallSearchingEvent, |
| 44 |
) |
| 45 |
|
| 46 |
__all__ = [ |
| 47 |
"LLMAuthenticationError", |
| 48 |
"LLMConnectionDetails", |
| 49 |
"LLMError", |
| 50 |
"LLMGeneratedData", |
| 51 |
"LLMGeneratedImage", |
| 52 |
"LLMHandler", |
| 53 |
"LLMImageAttachment", |
| 54 |
"LLMRateLimitError", |
| 55 |
"LLMRequestError", |
| 56 |
"LLMResponseCompletedEvent", |
| 57 |
"LLMResponseError", |
| 58 |
"LLMResponseErrorEvent", |
| 59 |
"LLMResponseFailedEvent", |
| 60 |
"LLMResponseFunctionCallArgumentsDeltaEvent", |
| 61 |
"LLMResponseFunctionCallArgumentsDoneEvent", |
| 62 |
"LLMResponseFunctionCallOutputItem", |
| 63 |
"LLMResponseImageOutputItem", |
| 64 |
"LLMResponseIncompleteEvent", |
| 65 |
"LLMResponseMessageOutputItem", |
| 66 |
"LLMResponseOutputItemAddedEvent", |
| 67 |
"LLMResponseOutputItemDoneEvent", |
| 68 |
"LLMResponseOutputTextDeltaEvent", |
| 69 |
"LLMResponseReasoningOutputItem", |
| 70 |
"LLMResponseReasoningSummaryTextDeltaEvent", |
| 71 |
"LLMResponseWebSearchCallOutputItem", |
| 72 |
"LLMResponseWebSearchCallSearchingEvent", |
| 73 |
"LLMServiceError", |
| 74 |
"LLMStreamEventError", |
| 75 |
"LLMStreamEventParseError", |
| 76 |
"ResponseInputParam", |
| 77 |
] |