Several of the types published for type hinting purposes are runtime aliases of their underlying API schema types:
>>> from lmstudio import UserMessage, FileHandle, TextData
>>> UserMessage
<class 'lmstudio._sdk_models.ChatMessageDataUser'>
>>> FileHandle
<class 'lmstudio._sdk_models.ChatMessagePartFileData'>
>>> TextData
<class 'lmstudio._sdk_models.ChatMessagePartTextData'>
This mismatch can be confusing when trying to determine which names to import, since they don't match what is reported when displaying API results.
If these aliases are instead implemented as part of generating the API data types from the exported schema, the reported name at runtime will line up with the name that needs to be imported from the public API for type hinting purposes.
Several of the types published for type hinting purposes are runtime aliases of their underlying API schema types:
This mismatch can be confusing when trying to determine which names to import, since they don't match what is reported when displaying API results.
If these aliases are instead implemented as part of generating the API data types from the exported schema, the reported name at runtime will line up with the name that needs to be imported from the public API for type hinting purposes.