Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "lmstudio"
version = "1.3.3.dev0"
version = "1.4.0.dev0"
description = "LM Studio Python SDK"
authors = [
{name = "LM Studio", email = "team@lmstudio.ai"},
Expand Down
2 changes: 1 addition & 1 deletion src/lmstudio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""LM Studio Python SDK."""

__version__ = "1.3.3.dev0"
__version__ = "1.4.0.dev0"


# In addition to publishing the main SDK client API,
Expand Down
3 changes: 2 additions & 1 deletion src/lmstudio/sync_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,7 @@ def act(
tools: Iterable[ToolDefinition],
*,
max_prediction_rounds: int | None = None,
max_parallel_tool_calls: int | None = 1,
config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
preset: str | None = None,
on_message: Callable[[AssistantResponse | ToolResultMessage], Any]
Expand Down Expand Up @@ -1351,7 +1352,7 @@ def _wrapped_on_prompt_processing_progress(progress: float) -> None:
on_prompt_processing_for_endpoint = _wrapped_on_prompt_processing_progress
# Request predictions until no more tool call requests are received in response
# (or the maximum number of prediction rounds is reached)
with ThreadPoolExecutor() as pool:
with ThreadPoolExecutor(max_parallel_tool_calls) as pool:
for round_index in round_counter:
self._logger.debug(
"Starting .act() prediction round", round_index=round_index
Expand Down