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
3 changes: 1 addition & 2 deletions src/lmstudio/sync_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1339,9 +1339,8 @@ def get_info(self) -> ModelInstanceInfo:
"""Get the model info for this model."""
return self._session.get_model_info(self.identifier)

# Private until this API can emit the client config types
@sdk_public_api()
def _get_load_config(self) -> AnyLoadConfig:
def get_load_config(self) -> AnyLoadConfig:
"""Get the model load config for this model."""
return self._session._get_load_config(self.identifier)

Expand Down
3 changes: 2 additions & 1 deletion tests/async/test_embedding_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ async def test_context_length_async(model_id: str, caplog: LogCap) -> None:
async def test_get_load_config_async(model_id: str, caplog: LogCap) -> None:
caplog.set_level(logging.DEBUG)
async with AsyncClient() as client:
response = await client.embedding._get_load_config(model_id)
model = await client.embedding.model(model_id)
response = await model.get_load_config()
logging.info(f"Load config response: {response}")
assert response
assert isinstance(response, EmbeddingLoadModelConfig)
Expand Down
3 changes: 2 additions & 1 deletion tests/async/test_llm_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ async def test_context_length_async(model_id: str, caplog: LogCap) -> None:
async def test_get_load_config_async(model_id: str, caplog: LogCap) -> None:
caplog.set_level(logging.DEBUG)
async with AsyncClient() as client:
response = await client.llm._get_load_config(model_id)
model = await client.llm.model(model_id)
response = await model.get_load_config()
logging.info(f"Load config response: {response}")
assert response
assert isinstance(response, LlmLoadModelConfig)
Expand Down
3 changes: 2 additions & 1 deletion tests/sync/test_embedding_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ def test_context_length_sync(model_id: str, caplog: LogCap) -> None:
def test_get_load_config_sync(model_id: str, caplog: LogCap) -> None:
caplog.set_level(logging.DEBUG)
with Client() as client:
response = client.embedding._get_load_config(model_id)
model = client.embedding.model(model_id)
response = model.get_load_config()
logging.info(f"Load config response: {response}")
assert response
assert isinstance(response, EmbeddingLoadModelConfig)
Expand Down
3 changes: 2 additions & 1 deletion tests/sync/test_llm_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ def test_context_length_sync(model_id: str, caplog: LogCap) -> None:
def test_get_load_config_sync(model_id: str, caplog: LogCap) -> None:
caplog.set_level(logging.DEBUG)
with Client() as client:
response = client.llm._get_load_config(model_id)
model = client.llm.model(model_id)
response = model.get_load_config()
logging.info(f"Load config response: {response}")
assert response
assert isinstance(response, LlmLoadModelConfig)
Expand Down
Loading