diff --git a/misc/update-sdk-schema.sh b/misc/update-sdk-schema.sh new file mode 100755 index 0000000..25ea5d0 --- /dev/null +++ b/misc/update-sdk-schema.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# See http://redsymbol.net/articles/unofficial-bash-strict-mode/ for benefit of these options +set -euo pipefail +IFS=$'\n\t' + +# Note: `readlink -f` (long available in GNU coreutils) is available on macOS 12.3 and later +script_dir="$(cd -- "$(dirname -- "$(readlink -f "${BASH_SOURCE[0]}")")" &> /dev/null && pwd)" + +# Update submodule to tip of the lmstudio-js main branch and regenerate the exported schema +# (to incorporate Python data model template changes, just run `tox -e sync-sdk-schema`) + +pushd "$script_dir/../sdk-schema/lmstudio-js" || exit 1 +git switch main +git pull +git submodule update --init --recursive +popd || exit 1 +tox -e sync-sdk-schema -- --regen-schema diff --git a/sdk-schema/lms-with-inferred-unions.json b/sdk-schema/lms-with-inferred-unions.json index 5d05b4a..57af0e8 100644 --- a/sdk-schema/lms-with-inferred-unions.json +++ b/sdk-schema/lms-with-inferred-unions.json @@ -445,6 +445,21 @@ "propertyName": "type" } }, + "toolCallResult": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "toolCallId": { + "type": "string" + } + }, + "required": [ + "content" + ], + "additionalProperties": false + }, "citationSource": { "type": "object", "properties": { @@ -1992,35 +2007,6 @@ "propertyName": "type" } }, - "preprocessorUpdate": { - "anyOf": [ - { - "$ref": "#/definitions/processingUpdateStatusCreate" - }, - { - "$ref": "#/definitions/processingUpdateStatusUpdate" - }, - { - "$ref": "#/definitions/processingUpdateStatusRemove" - }, - { - "$ref": "#/definitions/processingUpdateCitationBlockCreate" - }, - { - "$ref": "#/definitions/processingUpdateDebugInfoBlockCreate" - } - ], - "discriminator": { - "mapping": { - "status.create": "#/definitions/processingUpdateStatusCreate", - "status.update": "#/definitions/processingUpdateStatusUpdate", - "status.remove": "#/definitions/processingUpdateStatusRemove", - "citationBlock.create": "#/definitions/processingUpdateCitationBlockCreate", - "debugInfoBlock.create": "#/definitions/processingUpdateDebugInfoBlockCreate" - }, - "propertyName": "type" - } - }, "processingRequestConfirmToolCall": { "type": "object", "properties": { @@ -2895,6 +2881,35 @@ }, "additionalProperties": false }, + "promptPreprocessorUpdate": { + "anyOf": [ + { + "$ref": "#/definitions/processingUpdateStatusCreate" + }, + { + "$ref": "#/definitions/processingUpdateStatusUpdate" + }, + { + "$ref": "#/definitions/processingUpdateStatusRemove" + }, + { + "$ref": "#/definitions/processingUpdateCitationBlockCreate" + }, + { + "$ref": "#/definitions/processingUpdateDebugInfoBlockCreate" + } + ], + "discriminator": { + "mapping": { + "status.create": "#/definitions/processingUpdateStatusCreate", + "status.update": "#/definitions/processingUpdateStatusUpdate", + "status.remove": "#/definitions/processingUpdateStatusRemove", + "citationBlock.create": "#/definitions/processingUpdateCitationBlockCreate", + "debugInfoBlock.create": "#/definitions/processingUpdateDebugInfoBlockCreate" + }, + "propertyName": "type" + } + }, "modelCompatibilityType": { "type": "string", "enum": [ @@ -6064,52 +6079,52 @@ ], "additionalProperties": false }, - "plugins/channel/setPreprocessor/toClientPacket": { + "plugins/channel/setPromptPreprocessor/toClientPacket": { "anyOf": [ { - "$ref": "#/definitions/plugins/channel/setPreprocessor/toClientPacketPreprocess" + "$ref": "#/definitions/plugins/channel/setPromptPreprocessor/toClientPacketPreprocess" }, { - "$ref": "#/definitions/plugins/channel/setPreprocessor/toClientPacketAbort" + "$ref": "#/definitions/plugins/channel/setPromptPreprocessor/toClientPacketAbort" } ], "discriminator": { "mapping": { - "preprocess": "#/definitions/plugins/channel/setPreprocessor/toClientPacketPreprocess", - "abort": "#/definitions/plugins/channel/setPreprocessor/toClientPacketAbort" + "preprocess": "#/definitions/plugins/channel/setPromptPreprocessor/toClientPacketPreprocess", + "abort": "#/definitions/plugins/channel/setPromptPreprocessor/toClientPacketAbort" }, "propertyName": "type" } }, - "plugins/channel/setPreprocessor/toServerPacket": { + "plugins/channel/setPromptPreprocessor/toServerPacket": { "anyOf": [ { - "$ref": "#/definitions/plugins/channel/setPreprocessor/toServerPacketComplete" + "$ref": "#/definitions/plugins/channel/setPromptPreprocessor/toServerPacketComplete" }, { - "$ref": "#/definitions/plugins/channel/setPreprocessor/toServerPacketAborted" + "$ref": "#/definitions/plugins/channel/setPromptPreprocessor/toServerPacketAborted" }, { - "$ref": "#/definitions/plugins/channel/setPreprocessor/toServerPacketError" + "$ref": "#/definitions/plugins/channel/setPromptPreprocessor/toServerPacketError" } ], "discriminator": { "mapping": { - "complete": "#/definitions/plugins/channel/setPreprocessor/toServerPacketComplete", - "aborted": "#/definitions/plugins/channel/setPreprocessor/toServerPacketAborted", - "error": "#/definitions/plugins/channel/setPreprocessor/toServerPacketError" + "complete": "#/definitions/plugins/channel/setPromptPreprocessor/toServerPacketComplete", + "aborted": "#/definitions/plugins/channel/setPromptPreprocessor/toServerPacketAborted", + "error": "#/definitions/plugins/channel/setPromptPreprocessor/toServerPacketError" }, "propertyName": "type" } }, - "pseudo/plugins/channel/setPreprocessor": { + "pseudo/plugins/channel/setPromptPreprocessor": { "type": "object", "properties": { "toClientPacket": { - "$ref": "#/definitions/plugins/channel/setPreprocessor/toClientPacket" + "$ref": "#/definitions/plugins/channel/setPromptPreprocessor/toClientPacket" }, "toServerPacket": { - "$ref": "#/definitions/plugins/channel/setPreprocessor/toServerPacket" + "$ref": "#/definitions/plugins/channel/setPromptPreprocessor/toServerPacket" } }, "required": [ @@ -6366,8 +6381,8 @@ "channelRegisterDevelopmentPlugin": { "$ref": "#/definitions/pseudo/plugins/channel/registerDevelopmentPlugin" }, - "channelSetPreprocessor": { - "$ref": "#/definitions/pseudo/plugins/channel/setPreprocessor" + "channelSetPromptPreprocessor": { + "$ref": "#/definitions/pseudo/plugins/channel/setPromptPreprocessor" }, "channelSetPredictionLoopHandler": { "$ref": "#/definitions/pseudo/plugins/channel/setPredictionLoopHandler" @@ -6393,7 +6408,7 @@ "rpcSetGlobalConfigSchematics", "rpcPluginInitCompleted", "channelRegisterDevelopmentPlugin", - "channelSetPreprocessor", + "channelSetPromptPreprocessor", "channelSetPredictionLoopHandler", "channelSetToolsProvider", "channelSetGenerator" @@ -9299,7 +9314,7 @@ ], "additionalProperties": false }, - "plugins/channel/setPreprocessor/toClientPacketPreprocess": { + "plugins/channel/setPromptPreprocessor/toClientPacketPreprocess": { "type": "object", "properties": { "type": { @@ -9349,7 +9364,7 @@ ], "additionalProperties": false }, - "plugins/channel/setPreprocessor/toClientPacketAbort": { + "plugins/channel/setPromptPreprocessor/toClientPacketAbort": { "type": "object", "properties": { "type": { @@ -9368,7 +9383,7 @@ ], "additionalProperties": false }, - "plugins/channel/setPreprocessor/toServerPacketComplete": { + "plugins/channel/setPromptPreprocessor/toServerPacketComplete": { "type": "object", "properties": { "type": { @@ -9391,7 +9406,7 @@ ], "additionalProperties": false }, - "plugins/channel/setPreprocessor/toServerPacketAborted": { + "plugins/channel/setPromptPreprocessor/toServerPacketAborted": { "type": "object", "properties": { "type": { @@ -9410,7 +9425,7 @@ ], "additionalProperties": false }, - "plugins/channel/setPreprocessor/toServerPacketError": { + "plugins/channel/setPromptPreprocessor/toServerPacketError": { "type": "object", "properties": { "type": { diff --git a/sdk-schema/lms.json b/sdk-schema/lms.json index 33d5924..789cce1 100644 --- a/sdk-schema/lms.json +++ b/sdk-schema/lms.json @@ -484,6 +484,21 @@ } ] }, + "toolCallResult": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "toolCallId": { + "type": "string" + } + }, + "required": [ + "content" + ], + "additionalProperties": false + }, "citationSource": { "type": "object", "properties": { @@ -2421,25 +2436,6 @@ } ] }, - "preprocessorUpdate": { - "anyOf": [ - { - "$ref": "#/definitions/processingUpdateStatusCreate" - }, - { - "$ref": "#/definitions/processingUpdateStatusUpdate" - }, - { - "$ref": "#/definitions/processingUpdateStatusRemove" - }, - { - "$ref": "#/definitions/processingUpdateCitationBlockCreate" - }, - { - "$ref": "#/definitions/processingUpdateDebugInfoBlockCreate" - } - ] - }, "processingRequestConfirmToolCall": { "type": "object", "properties": { @@ -3379,6 +3375,25 @@ }, "additionalProperties": false }, + "promptPreprocessorUpdate": { + "anyOf": [ + { + "$ref": "#/definitions/processingUpdateStatusCreate" + }, + { + "$ref": "#/definitions/processingUpdateStatusUpdate" + }, + { + "$ref": "#/definitions/processingUpdateStatusRemove" + }, + { + "$ref": "#/definitions/processingUpdateCitationBlockCreate" + }, + { + "$ref": "#/definitions/processingUpdateDebugInfoBlockCreate" + } + ] + }, "modelCompatibilityType": { "type": "string", "enum": [ @@ -7268,7 +7283,7 @@ ], "additionalProperties": false }, - "plugins/channel/setPreprocessor/toClientPacket": { + "plugins/channel/setPromptPreprocessor/toClientPacket": { "anyOf": [ { "type": "object", @@ -7337,7 +7352,7 @@ } ] }, - "plugins/channel/setPreprocessor/toServerPacket": { + "plugins/channel/setPromptPreprocessor/toServerPacket": { "anyOf": [ { "type": "object", @@ -7400,14 +7415,14 @@ } ] }, - "pseudo/plugins/channel/setPreprocessor": { + "pseudo/plugins/channel/setPromptPreprocessor": { "type": "object", "properties": { "toClientPacket": { - "$ref": "#/definitions/plugins/channel/setPreprocessor/toClientPacket" + "$ref": "#/definitions/plugins/channel/setPromptPreprocessor/toClientPacket" }, "toServerPacket": { - "$ref": "#/definitions/plugins/channel/setPreprocessor/toServerPacket" + "$ref": "#/definitions/plugins/channel/setPromptPreprocessor/toServerPacket" } }, "required": [ @@ -8131,8 +8146,8 @@ "channelRegisterDevelopmentPlugin": { "$ref": "#/definitions/pseudo/plugins/channel/registerDevelopmentPlugin" }, - "channelSetPreprocessor": { - "$ref": "#/definitions/pseudo/plugins/channel/setPreprocessor" + "channelSetPromptPreprocessor": { + "$ref": "#/definitions/pseudo/plugins/channel/setPromptPreprocessor" }, "channelSetPredictionLoopHandler": { "$ref": "#/definitions/pseudo/plugins/channel/setPredictionLoopHandler" @@ -8158,7 +8173,7 @@ "rpcSetGlobalConfigSchematics", "rpcPluginInitCompleted", "channelRegisterDevelopmentPlugin", - "channelSetPreprocessor", + "channelSetPromptPreprocessor", "channelSetPredictionLoopHandler", "channelSetToolsProvider", "channelSetGenerator" diff --git a/sdk-schema/lmstudio-js b/sdk-schema/lmstudio-js index 4c594aa..6ee22fa 160000 --- a/sdk-schema/lmstudio-js +++ b/sdk-schema/lmstudio-js @@ -1 +1 @@ -Subproject commit 4c594aa6f27bd3e7c53c9173ffada7b6f3c8148a +Subproject commit 6ee22fa6013d5c1f5c9ccde07ce5696f1328b80c diff --git a/src/lmstudio/_sdk_models/__init__.py b/src/lmstudio/_sdk_models/__init__.py index 96b9824..bd4e319 100644 --- a/src/lmstudio/_sdk_models/__init__.py +++ b/src/lmstudio/_sdk_models/__init__.py @@ -420,16 +420,16 @@ "PluginsChannelSetPredictionLoopHandlerToServerPacketCompleteDict", "PluginsChannelSetPredictionLoopHandlerToServerPacketError", "PluginsChannelSetPredictionLoopHandlerToServerPacketErrorDict", - "PluginsChannelSetPreprocessorToClientPacketAbort", - "PluginsChannelSetPreprocessorToClientPacketAbortDict", - "PluginsChannelSetPreprocessorToClientPacketPreprocess", - "PluginsChannelSetPreprocessorToClientPacketPreprocessDict", - "PluginsChannelSetPreprocessorToServerPacketAborted", - "PluginsChannelSetPreprocessorToServerPacketAbortedDict", - "PluginsChannelSetPreprocessorToServerPacketComplete", - "PluginsChannelSetPreprocessorToServerPacketCompleteDict", - "PluginsChannelSetPreprocessorToServerPacketError", - "PluginsChannelSetPreprocessorToServerPacketErrorDict", + "PluginsChannelSetPromptPreprocessorToClientPacketAbort", + "PluginsChannelSetPromptPreprocessorToClientPacketAbortDict", + "PluginsChannelSetPromptPreprocessorToClientPacketPreprocess", + "PluginsChannelSetPromptPreprocessorToClientPacketPreprocessDict", + "PluginsChannelSetPromptPreprocessorToServerPacketAborted", + "PluginsChannelSetPromptPreprocessorToServerPacketAbortedDict", + "PluginsChannelSetPromptPreprocessorToServerPacketComplete", + "PluginsChannelSetPromptPreprocessorToServerPacketCompleteDict", + "PluginsChannelSetPromptPreprocessorToServerPacketError", + "PluginsChannelSetPromptPreprocessorToServerPacketErrorDict", "PluginsChannelSetToolsProviderToClientPacketAbortToolCall", "PluginsChannelSetToolsProviderToClientPacketAbortToolCallDict", "PluginsChannelSetToolsProviderToClientPacketCallTool", @@ -599,8 +599,8 @@ "PseudoPluginsChannelSetGeneratorDict", "PseudoPluginsChannelSetPredictionLoopHandler", "PseudoPluginsChannelSetPredictionLoopHandlerDict", - "PseudoPluginsChannelSetPreprocessor", - "PseudoPluginsChannelSetPreprocessorDict", + "PseudoPluginsChannelSetPromptPreprocessor", + "PseudoPluginsChannelSetPromptPreprocessorDict", "PseudoPluginsChannelSetToolsProvider", "PseudoPluginsChannelSetToolsProviderDict", "PseudoPluginsDict", @@ -749,8 +749,10 @@ "ToolCallRequestData", "ToolCallRequestDataDict", "ToolCallRequestDict", + "ToolCallResult", "ToolCallResultData", "ToolCallResultDataDict", + "ToolCallResultDict", "ToolResultMessage", "ToolResultMessageDict", "ToolStatusStepState", @@ -860,6 +862,24 @@ class ToolCallResultDataDict(TypedDict): ChatMessageRoleData = Literal["assistant", "user", "system", "tool"] + + +class ToolCallResult(LMStudioStruct["ToolCallResultDict"], kw_only=True): + content: str + tool_call_id: str | None = field(name="toolCallId", default=None) + + +class ToolCallResultDict(TypedDict): + """Corresponding typed dictionary definition for ToolCallResult. + + NOTE: Multi-word keys are defined using their camelCase form, + as that is what `to_dict()` emits, and what `_from_api_dict()` accepts. + """ + + content: str + toolCallId: NotRequired[str | None] + + PageNumber = Sequence[int] LineNumber = Sequence[int] @@ -5020,8 +5040,8 @@ class PluginsChannelRegisterDevelopmentPluginToServerPacketEndDict(TypedDict): type: Annotated[Literal["end"], Meta(title="Type")] -class PluginsChannelSetPreprocessorToClientPacketAbort( - LMStudioStruct["PluginsChannelSetPreprocessorToClientPacketAbortDict"], +class PluginsChannelSetPromptPreprocessorToClientPacketAbort( + LMStudioStruct["PluginsChannelSetPromptPreprocessorToClientPacketAbortDict"], kw_only=True, tag_field="type", tag="abort", @@ -5030,8 +5050,8 @@ class PluginsChannelSetPreprocessorToClientPacketAbort( task_id: str = field(name="taskId") -class PluginsChannelSetPreprocessorToClientPacketAbortDict(TypedDict): - """Corresponding typed dictionary definition for PluginsChannelSetPreprocessorToClientPacketAbort. +class PluginsChannelSetPromptPreprocessorToClientPacketAbortDict(TypedDict): + """Corresponding typed dictionary definition for PluginsChannelSetPromptPreprocessorToClientPacketAbort. NOTE: Multi-word keys are defined using their camelCase form, as that is what `to_dict()` emits, and what `_from_api_dict()` accepts. @@ -5041,8 +5061,8 @@ class PluginsChannelSetPreprocessorToClientPacketAbortDict(TypedDict): taskId: str -class PluginsChannelSetPreprocessorToServerPacketAborted( - LMStudioStruct["PluginsChannelSetPreprocessorToServerPacketAbortedDict"], +class PluginsChannelSetPromptPreprocessorToServerPacketAborted( + LMStudioStruct["PluginsChannelSetPromptPreprocessorToServerPacketAbortedDict"], kw_only=True, tag_field="type", tag="aborted", @@ -5051,8 +5071,8 @@ class PluginsChannelSetPreprocessorToServerPacketAborted( task_id: str = field(name="taskId") -class PluginsChannelSetPreprocessorToServerPacketAbortedDict(TypedDict): - """Corresponding typed dictionary definition for PluginsChannelSetPreprocessorToServerPacketAborted. +class PluginsChannelSetPromptPreprocessorToServerPacketAbortedDict(TypedDict): + """Corresponding typed dictionary definition for PluginsChannelSetPromptPreprocessorToServerPacketAborted. NOTE: Multi-word keys are defined using their camelCase form, as that is what `to_dict()` emits, and what `_from_api_dict()` accepts. @@ -5062,8 +5082,8 @@ class PluginsChannelSetPreprocessorToServerPacketAbortedDict(TypedDict): taskId: str -class PluginsChannelSetPreprocessorToServerPacketError( - LMStudioStruct["PluginsChannelSetPreprocessorToServerPacketErrorDict"], +class PluginsChannelSetPromptPreprocessorToServerPacketError( + LMStudioStruct["PluginsChannelSetPromptPreprocessorToServerPacketErrorDict"], kw_only=True, tag_field="type", tag="error", @@ -5073,8 +5093,8 @@ class PluginsChannelSetPreprocessorToServerPacketError( error: SerializedLMSExtendedError -class PluginsChannelSetPreprocessorToServerPacketErrorDict(TypedDict): - """Corresponding typed dictionary definition for PluginsChannelSetPreprocessorToServerPacketError. +class PluginsChannelSetPromptPreprocessorToServerPacketErrorDict(TypedDict): + """Corresponding typed dictionary definition for PluginsChannelSetPromptPreprocessorToServerPacketError. NOTE: Multi-word keys are defined using their camelCase form, as that is what `to_dict()` emits, and what `_from_api_dict()` accepts. @@ -8330,6 +8350,20 @@ class ToolStatusStepStateDict(TypedDict): customWarnings: Sequence[str] +PromptPreprocessorUpdate = ( + ProcessingUpdateStatusCreate + | ProcessingUpdateStatusUpdate + | ProcessingUpdateStatusRemove + | ProcessingUpdateCitationBlockCreate + | ProcessingUpdateDebugInfoBlockCreate +) +PromptPreprocessorUpdateDict = ( + ProcessingUpdateDebugInfoBlockCreateDict + | ProcessingUpdateCitationBlockCreateDict + | ProcessingUpdateStatusRemoveDict + | ProcessingUpdateStatusCreateDict + | ProcessingUpdateStatusUpdateDict +) ModelSpecifier = ModelSpecifierQuery | ModelSpecifierInstanceReference ModelSpecifierDict = ModelSpecifierQueryDict | ModelSpecifierInstanceReferenceDict @@ -9397,20 +9431,6 @@ class LlmApplyPromptTemplateOptsDict(TypedDict): LlmToolArray = Sequence[LlmTool] LlmToolUseSetting = LlmToolUseSettingNone | LlmToolUseSettingToolArray LlmToolUseSettingDict = LlmToolUseSettingNoneDict | LlmToolUseSettingToolArrayDict -PreprocessorUpdate = ( - ProcessingUpdateStatusCreate - | ProcessingUpdateStatusUpdate - | ProcessingUpdateStatusRemove - | ProcessingUpdateCitationBlockCreate - | ProcessingUpdateDebugInfoBlockCreate -) -PreprocessorUpdateDict = ( - ProcessingUpdateDebugInfoBlockCreateDict - | ProcessingUpdateCitationBlockCreateDict - | ProcessingUpdateStatusRemoveDict - | ProcessingUpdateStatusCreateDict - | ProcessingUpdateStatusUpdateDict -) class ProcessingUpdateToolStatusCreate( @@ -9505,8 +9525,8 @@ class PseudoPluginsChannelSetToolsProviderDict(TypedDict): toServerPacket: PluginsChannelSetToolsProviderToServerPacketDict -class PluginsChannelSetPreprocessorToClientPacketPreprocess( - LMStudioStruct["PluginsChannelSetPreprocessorToClientPacketPreprocessDict"], +class PluginsChannelSetPromptPreprocessorToClientPacketPreprocess( + LMStudioStruct["PluginsChannelSetPromptPreprocessorToClientPacketPreprocessDict"], kw_only=True, tag_field="type", tag="preprocess", @@ -9522,8 +9542,8 @@ class PluginsChannelSetPreprocessorToClientPacketPreprocess( token: str -class PluginsChannelSetPreprocessorToClientPacketPreprocessDict(TypedDict): - """Corresponding typed dictionary definition for PluginsChannelSetPreprocessorToClientPacketPreprocess. +class PluginsChannelSetPromptPreprocessorToClientPacketPreprocessDict(TypedDict): + """Corresponding typed dictionary definition for PluginsChannelSetPromptPreprocessorToClientPacketPreprocess. NOTE: Multi-word keys are defined using their camelCase form, as that is what `to_dict()` emits, and what `_from_api_dict()` accepts. @@ -9540,8 +9560,8 @@ class PluginsChannelSetPreprocessorToClientPacketPreprocessDict(TypedDict): token: str -class PluginsChannelSetPreprocessorToServerPacketComplete( - LMStudioStruct["PluginsChannelSetPreprocessorToServerPacketCompleteDict"], +class PluginsChannelSetPromptPreprocessorToServerPacketComplete( + LMStudioStruct["PluginsChannelSetPromptPreprocessorToServerPacketCompleteDict"], kw_only=True, tag_field="type", tag="complete", @@ -9551,8 +9571,8 @@ class PluginsChannelSetPreprocessorToServerPacketComplete( processed: AnyChatMessage -class PluginsChannelSetPreprocessorToServerPacketCompleteDict(TypedDict): - """Corresponding typed dictionary definition for PluginsChannelSetPreprocessorToServerPacketComplete. +class PluginsChannelSetPromptPreprocessorToServerPacketCompleteDict(TypedDict): + """Corresponding typed dictionary definition for PluginsChannelSetPromptPreprocessorToServerPacketComplete. NOTE: Multi-word keys are defined using their camelCase form, as that is what `to_dict()` emits, and what `_from_api_dict()` accepts. @@ -10171,46 +10191,46 @@ class PseudoPluginsChannelRegisterDevelopmentPluginDict(TypedDict): toServerPacket: PluginsChannelRegisterDevelopmentPluginToServerPacketEndDict -PluginsChannelSetPreprocessorToClientPacket = ( - PluginsChannelSetPreprocessorToClientPacketPreprocess - | PluginsChannelSetPreprocessorToClientPacketAbort +PluginsChannelSetPromptPreprocessorToClientPacket = ( + PluginsChannelSetPromptPreprocessorToClientPacketPreprocess + | PluginsChannelSetPromptPreprocessorToClientPacketAbort ) -PluginsChannelSetPreprocessorToClientPacketDict = ( - PluginsChannelSetPreprocessorToClientPacketPreprocessDict - | PluginsChannelSetPreprocessorToClientPacketAbortDict +PluginsChannelSetPromptPreprocessorToClientPacketDict = ( + PluginsChannelSetPromptPreprocessorToClientPacketPreprocessDict + | PluginsChannelSetPromptPreprocessorToClientPacketAbortDict ) -PluginsChannelSetPreprocessorToServerPacket = ( - PluginsChannelSetPreprocessorToServerPacketComplete - | PluginsChannelSetPreprocessorToServerPacketAborted - | PluginsChannelSetPreprocessorToServerPacketError +PluginsChannelSetPromptPreprocessorToServerPacket = ( + PluginsChannelSetPromptPreprocessorToServerPacketComplete + | PluginsChannelSetPromptPreprocessorToServerPacketAborted + | PluginsChannelSetPromptPreprocessorToServerPacketError ) -PluginsChannelSetPreprocessorToServerPacketDict = ( - PluginsChannelSetPreprocessorToServerPacketErrorDict - | PluginsChannelSetPreprocessorToServerPacketCompleteDict - | PluginsChannelSetPreprocessorToServerPacketAbortedDict +PluginsChannelSetPromptPreprocessorToServerPacketDict = ( + PluginsChannelSetPromptPreprocessorToServerPacketErrorDict + | PluginsChannelSetPromptPreprocessorToServerPacketCompleteDict + | PluginsChannelSetPromptPreprocessorToServerPacketAbortedDict ) -class PseudoPluginsChannelSetPreprocessor( - LMStudioStruct["PseudoPluginsChannelSetPreprocessorDict"], kw_only=True +class PseudoPluginsChannelSetPromptPreprocessor( + LMStudioStruct["PseudoPluginsChannelSetPromptPreprocessorDict"], kw_only=True ): - to_client_packet: PluginsChannelSetPreprocessorToClientPacket = field( + to_client_packet: PluginsChannelSetPromptPreprocessorToClientPacket = field( name="toClientPacket" ) - to_server_packet: PluginsChannelSetPreprocessorToServerPacket = field( + to_server_packet: PluginsChannelSetPromptPreprocessorToServerPacket = field( name="toServerPacket" ) -class PseudoPluginsChannelSetPreprocessorDict(TypedDict): - """Corresponding typed dictionary definition for PseudoPluginsChannelSetPreprocessor. +class PseudoPluginsChannelSetPromptPreprocessorDict(TypedDict): + """Corresponding typed dictionary definition for PseudoPluginsChannelSetPromptPreprocessor. NOTE: Multi-word keys are defined using their camelCase form, as that is what `to_dict()` emits, and what `_from_api_dict()` accepts. """ - toClientPacket: PluginsChannelSetPreprocessorToClientPacketDict - toServerPacket: PluginsChannelSetPreprocessorToServerPacketDict + toClientPacket: PluginsChannelSetPromptPreprocessorToClientPacketDict + toServerPacket: PluginsChannelSetPromptPreprocessorToServerPacketDict class PluginsChannelSetGeneratorToClientPacketGenerate( @@ -10318,8 +10338,8 @@ class PseudoPlugins(LMStudioStruct["PseudoPluginsDict"], kw_only=True): channel_register_development_plugin: PseudoPluginsChannelRegisterDevelopmentPlugin = field( name="channelRegisterDevelopmentPlugin" ) - channel_set_preprocessor: PseudoPluginsChannelSetPreprocessor = field( - name="channelSetPreprocessor" + channel_set_prompt_preprocessor: PseudoPluginsChannelSetPromptPreprocessor = field( + name="channelSetPromptPreprocessor" ) channel_set_prediction_loop_handler: PseudoPluginsChannelSetPredictionLoopHandler = field( name="channelSetPredictionLoopHandler" @@ -10352,7 +10372,7 @@ class PseudoPluginsDict(TypedDict): rpcSetGlobalConfigSchematics: PseudoPluginsRpcSetGlobalConfigSchematicsDict rpcPluginInitCompleted: PseudoPluginsRpcPluginInitCompleted channelRegisterDevelopmentPlugin: PseudoPluginsChannelRegisterDevelopmentPluginDict - channelSetPreprocessor: PseudoPluginsChannelSetPreprocessorDict + channelSetPromptPreprocessor: PseudoPluginsChannelSetPromptPreprocessorDict channelSetPredictionLoopHandler: PseudoPluginsChannelSetPredictionLoopHandlerDict channelSetToolsProvider: PseudoPluginsChannelSetToolsProviderDict channelSetGenerator: PseudoPluginsChannelSetGeneratorDict