Skip to content

Commit 6258826

Browse files
mturk24huiwengoh
andauthored
Update TLMOptions links (#56)
Co-authored-by: Hui Wen <[email protected]>
1 parent aaa21bf commit 6258826

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.1.1] - 2025-04-23
11+
1012
### Changed
1113

12-
- Improved validation + error messages for TLM's `custom_eval_criteria`
14+
- Improved validation + error messages for TLM's `custom_eval_criteria`.
15+
- Changed TLMOptions text in docs to have link to TLMOptions class
1316

1417
## [1.1.0] - 2025-04-21
1518

@@ -138,7 +141,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
138141

139142
- Release of the Cleanlab TLM Python client.
140143

141-
[Unreleased]: https://github.com/cleanlab/cleanlab-tlm/compare/v1.1.0...HEAD
144+
[Unreleased]: https://github.com/cleanlab/cleanlab-tlm/compare/v1.1.1...HEAD
145+
[1.1.1]: https://github.com/cleanlab/cleanlab-tlm/compare/v1.1.0...v1.1.1
142146
[1.1.0]: https://github.com/cleanlab/cleanlab-tlm/compare/v1.0.23...v1.1.0
143147
[1.0.23]: https://github.com/cleanlab/cleanlab-tlm/compare/v1.0.22...v1.0.23
144148
[1.0.22]: https://github.com/cleanlab/cleanlab-tlm/compare/v1.0.21...v1.0.22

src/cleanlab_tlm/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# SPDX-License-Identifier: MIT
2-
__version__ = "1.1.0"
2+
__version__ = "1.1.1"

src/cleanlab_tlm/tlm.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ class TLM(BaseTLM):
8080
When using this task type, `constrain_outputs` must be provided in the `prompt()` and `get_trustworthiness_score()` methods.
8181
- "code_generation": use for code generation tasks.
8282
83-
options (TLMOptions, optional): a typed dict of advanced configurations you can optionally specify.
83+
options ([TLMOptions](#class-tlmoptions), optional): a typed dict of advanced configurations you can optionally specify.
8484
Available options (keys in this dict) include "model", "max_tokens", "num_candidate_responses", "num_consistency_samples", "use_self_reflection",
8585
"similarity_measure", "reasoning_effort", "log", "custom_eval_criteria".
8686
See detailed documentation under [TLMOptions](#class-tlmoptions).
8787
If specified, these override any settings from the choice of `quality_preset`
88-
(each `quality_preset` is just a certain TLMOptions configuration).
88+
(each `quality_preset` is just a certain [TLMOptions](#class-tlmoptions) configuration).
8989
9090
timeout (float, optional): timeout (in seconds) to apply to each TLM prompt.
9191
If a batch of data is passed in, the timeout will be applied to each individual item in the batch.
@@ -557,7 +557,7 @@ class TLMResponse(TypedDict):
557557
trustworthiness_score (float, optional): score between 0-1 corresponding to the trustworthiness of the response.
558558
A higher score indicates a higher confidence that the response is correct/good.
559559
560-
log (dict, optional): additional logs and metadata returned from the LLM call, only if the `log` key was specified in TLMOptions.
560+
log (dict, optional): additional logs and metadata returned from the LLM call, only if the `log` key was specified in [TLMOptions](#class-tlmoptions).
561561
"""
562562

563563
response: Optional[str]
@@ -572,7 +572,7 @@ class TLMScore(TypedDict):
572572
trustworthiness_score (float, optional): score between 0-1 corresponding to the trustworthiness of the response.
573573
A higher score indicates a higher confidence that the response is correct/good.
574574
575-
log (dict, optional): additional logs and metadata returned from the LLM call, only if the `log` key was specified in TLMOptions.
575+
log (dict, optional): additional logs and metadata returned from the LLM call, only if the `log` key was specified in [TLMOptions](#class-tlmoptions).
576576
"""
577577

578578
trustworthiness_score: Optional[float]

src/cleanlab_tlm/utils/rag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class TrustworthyRAG(BaseTLM):
7373
api_key (str, optional): API key for accessing TLM. If not provided, this client will
7474
attempt to use the CLEANLAB_TLM_API_KEY environment variable.
7575
76-
options (TLMOptions, optional): a typed dict of advanced configurations you can optionally specify.
76+
options ([TLMOptions](../tlm/#class-tlmoptions), optional): a typed dict of advanced configurations you can optionally specify.
7777
The "custom_eval_criteria" key for [TLM](../tlm/#class-tlm) is not supported for `TrustworthyRAG`, you can instead specify `evals`.
7878
7979
timeout (float, optional): timeout (in seconds) to apply to each request.
@@ -706,7 +706,7 @@ class EvalMetric(TypedDict):
706706
score (float, optional): score between 0-1 corresponding to the evaluation metric.
707707
A higher score indicates a higher rating for the specific evaluation criteria being measured.
708708
709-
log (dict, optional): additional logs and metadata, reported only if the `log` key was specified in `TLMOptions`.
709+
log (dict, optional): additional logs and metadata, reported only if the `log` key was specified in [TLMOptions](../tlm/#class-tlmoptions).
710710
"""
711711

712712
score: Optional[float]

src/cleanlab_tlm/utils/tlm_lite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ class TLMLite:
3434
Args:
3535
response_model (str): LLM used to produce the response to the given prompt.
3636
Do not specify the model to use for scoring trustworthiness here, instead specify that model in the `options` argument.
37-
The list of supported model strings can be found in the TLMOptions documentation, by default, the model is "gpt-4o".
37+
The list of supported model strings can be found in the [TLMOptions](../tlm/#class-tlmoptions) documentation, by default, the model is "gpt-4o".
3838
3939
quality_preset (TLMQualityPreset, default = "medium"): preset configuration to control the quality of TLM trustworthiness scores vs. runtimes/costs.
4040
This preset only applies to the model computing the trustworthiness score.
4141
Supported options are only "medium" or "low", because TLMLite is not intended to improve response accuracy
4242
(use the regular [TLM](../tlm) for that).
4343
44-
options (TLMOptions, optional): a typed dict of advanced configuration options.
44+
options ([TLMOptions](../tlm/#class-tlmoptions), optional): a typed dict of advanced configuration options.
4545
Most of these options only apply to the model scoring trustworthiness, except for "max_tokens", which applies to the response model as well.
4646
Specify which model to use for scoring trustworthiness in these options.
4747
For more details about the options, see the documentation for [TLMOptions](../tlm/#class-tlmoptions).

0 commit comments

Comments
 (0)