unique_toolkit 1.17.1__py3-none-any.whl → 1.17.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of unique_toolkit might be problematic. Click here for more details.
- unique_toolkit/agentic/evaluation/hallucination/hallucination_evaluation.py +8 -2
- unique_toolkit/language_model/infos.py +46 -0
- {unique_toolkit-1.17.1.dist-info → unique_toolkit-1.17.3.dist-info}/METADATA +9 -1
- {unique_toolkit-1.17.1.dist-info → unique_toolkit-1.17.3.dist-info}/RECORD +6 -6
- {unique_toolkit-1.17.1.dist-info → unique_toolkit-1.17.3.dist-info}/LICENSE +0 -0
- {unique_toolkit-1.17.1.dist-info → unique_toolkit-1.17.3.dist-info}/WHEEL +0 -0
|
@@ -20,6 +20,7 @@ from unique_toolkit.chat.schemas import (
|
|
|
20
20
|
ChatMessageAssessmentStatus,
|
|
21
21
|
ChatMessageAssessmentType,
|
|
22
22
|
)
|
|
23
|
+
from unique_toolkit.language_model.reference import _preprocess_message
|
|
23
24
|
from unique_toolkit.language_model.schemas import (
|
|
24
25
|
LanguageModelStreamResponse,
|
|
25
26
|
)
|
|
@@ -43,10 +44,15 @@ class HallucinationEvaluation(Evaluation):
|
|
|
43
44
|
self, loop_response: LanguageModelStreamResponse
|
|
44
45
|
) -> EvaluationMetricResult: # type: ignore
|
|
45
46
|
all_chunks = self._reference_manager.get_chunks()
|
|
47
|
+
|
|
46
48
|
# source numbers from original text
|
|
47
|
-
ref_pattern = r"\[
|
|
49
|
+
ref_pattern = r"\[(\d+)\]"
|
|
48
50
|
original_text = loop_response.message.original_text
|
|
49
|
-
|
|
51
|
+
|
|
52
|
+
# preprocess original text to deal with different source patterns
|
|
53
|
+
original_text_preprocessed = _preprocess_message(original_text)
|
|
54
|
+
|
|
55
|
+
source_number_matches = re.findall(ref_pattern, original_text_preprocessed)
|
|
50
56
|
source_numbers = {int(num) for num in source_number_matches}
|
|
51
57
|
|
|
52
58
|
referenced_chunks = [all_chunks[idx] for idx in source_numbers]
|
|
@@ -19,6 +19,7 @@ class LanguageModelName(StrEnum):
|
|
|
19
19
|
AZURE_GPT_5_MINI_2025_0807 = "AZURE_GPT_5_MINI_2025_0807"
|
|
20
20
|
AZURE_GPT_5_NANO_2025_0807 = "AZURE_GPT_5_NANO_2025_0807"
|
|
21
21
|
AZURE_GPT_5_CHAT_2025_0807 = "AZURE_GPT_5_CHAT_2025_0807"
|
|
22
|
+
AZURE_GPT_5_PRO_2025_1006 = "AZURE_GPT_5_PRO_2025_1006"
|
|
22
23
|
AZURE_GPT_4o_2024_0513 = "AZURE_GPT_4o_2024_0513"
|
|
23
24
|
AZURE_GPT_4o_2024_0806 = "AZURE_GPT_4o_2024_0806"
|
|
24
25
|
AZURE_GPT_4o_2024_1120 = "AZURE_GPT_4o_2024_1120"
|
|
@@ -52,6 +53,7 @@ class LanguageModelName(StrEnum):
|
|
|
52
53
|
LITELLM_OPENAI_GPT_5_MINI = "litellm:openai-gpt-5-mini"
|
|
53
54
|
LITELLM_OPENAI_GPT_5_NANO = "litellm:openai-gpt-5-nano"
|
|
54
55
|
LITELLM_OPENAI_GPT_5_CHAT = "litellm:openai-gpt-5-chat"
|
|
56
|
+
LITELLM_OPENAI_GPT_5_PRO = "litellm:openai-gpt-5-pro"
|
|
55
57
|
LITELLM_OPENAI_O1 = "litellm:openai-o1"
|
|
56
58
|
LITELLM_OPENAI_O3 = "litellm:openai-o3"
|
|
57
59
|
LITELLM_OPENAI_O3_DEEP_RESEARCH = "litellm:openai-o3-deep-research"
|
|
@@ -91,10 +93,12 @@ def get_encoder_name(model_name: LanguageModelName) -> EncoderName:
|
|
|
91
93
|
| LMN.AZURE_GPT_5_MINI_2025_0807
|
|
92
94
|
| LMN.AZURE_GPT_5_NANO_2025_0807
|
|
93
95
|
| LMN.AZURE_GPT_5_CHAT_2025_0807
|
|
96
|
+
| LMN.AZURE_GPT_5_PRO_2025_1006
|
|
94
97
|
| LMN.LITELLM_OPENAI_GPT_5
|
|
95
98
|
| LMN.LITELLM_OPENAI_GPT_5_MINI
|
|
96
99
|
| LMN.LITELLM_OPENAI_GPT_5_NANO
|
|
97
100
|
| LMN.LITELLM_OPENAI_GPT_5_CHAT
|
|
101
|
+
| LMN.LITELLM_OPENAI_GPT_5_PRO
|
|
98
102
|
| LMN.LITELLM_OPENAI_O1
|
|
99
103
|
| LMN.LITELLM_OPENAI_O3
|
|
100
104
|
| LMN.LITELLM_OPENAI_O3_DEEP_RESEARCH
|
|
@@ -334,6 +338,27 @@ class LanguageModelInfo(BaseModel):
|
|
|
334
338
|
deprecated_at=date(2026, 8, 7),
|
|
335
339
|
retirement_at=date(2026, 8, 7),
|
|
336
340
|
)
|
|
341
|
+
case LanguageModelName.AZURE_GPT_5_PRO_2025_1006:
|
|
342
|
+
return cls(
|
|
343
|
+
name=model_name,
|
|
344
|
+
provider=LanguageModelProvider.AZURE,
|
|
345
|
+
version="2025-10-06",
|
|
346
|
+
encoder_name=EncoderName.O200K_BASE,
|
|
347
|
+
capabilities=[
|
|
348
|
+
ModelCapabilities.FUNCTION_CALLING,
|
|
349
|
+
ModelCapabilities.REASONING,
|
|
350
|
+
ModelCapabilities.VISION,
|
|
351
|
+
ModelCapabilities.STRUCTURED_OUTPUT,
|
|
352
|
+
],
|
|
353
|
+
token_limits=LanguageModelTokenLimits(
|
|
354
|
+
token_limit_input=272000, token_limit_output=128000
|
|
355
|
+
),
|
|
356
|
+
info_cutoff_at=date(2024, 10, 30),
|
|
357
|
+
published_at=date(2025, 10, 6),
|
|
358
|
+
temperature_bounds=TemperatureBounds(
|
|
359
|
+
min_temperature=1.0, max_temperature=1.0
|
|
360
|
+
),
|
|
361
|
+
)
|
|
337
362
|
case LanguageModelName.AZURE_GPT_4_TURBO_2024_0409:
|
|
338
363
|
return cls(
|
|
339
364
|
name=model_name,
|
|
@@ -981,6 +1006,27 @@ class LanguageModelInfo(BaseModel):
|
|
|
981
1006
|
deprecated_at=date(2026, 8, 7),
|
|
982
1007
|
retirement_at=date(2026, 8, 7),
|
|
983
1008
|
)
|
|
1009
|
+
case LanguageModelName.LITELLM_OPENAI_GPT_5_PRO:
|
|
1010
|
+
return cls(
|
|
1011
|
+
name=model_name,
|
|
1012
|
+
provider=LanguageModelProvider.LITELLM,
|
|
1013
|
+
version="2025-10-06",
|
|
1014
|
+
encoder_name=EncoderName.O200K_BASE,
|
|
1015
|
+
capabilities=[
|
|
1016
|
+
ModelCapabilities.FUNCTION_CALLING,
|
|
1017
|
+
ModelCapabilities.REASONING,
|
|
1018
|
+
ModelCapabilities.VISION,
|
|
1019
|
+
ModelCapabilities.STRUCTURED_OUTPUT,
|
|
1020
|
+
],
|
|
1021
|
+
token_limits=LanguageModelTokenLimits(
|
|
1022
|
+
token_limit_input=272000, token_limit_output=128000
|
|
1023
|
+
),
|
|
1024
|
+
info_cutoff_at=date(2024, 10, 30),
|
|
1025
|
+
published_at=date(2025, 10, 6),
|
|
1026
|
+
temperature_bounds=TemperatureBounds(
|
|
1027
|
+
min_temperature=1.0, max_temperature=1.0
|
|
1028
|
+
),
|
|
1029
|
+
)
|
|
984
1030
|
case LanguageModelName.LITELLM_OPENAI_O1:
|
|
985
1031
|
return cls(
|
|
986
1032
|
name=model_name,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: unique_toolkit
|
|
3
|
-
Version: 1.17.
|
|
3
|
+
Version: 1.17.3
|
|
4
4
|
Summary:
|
|
5
5
|
License: Proprietary
|
|
6
6
|
Author: Cedric Klinkert
|
|
@@ -118,8 +118,16 @@ All notable changes to this project will be documented in this file.
|
|
|
118
118
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
119
119
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
120
120
|
|
|
121
|
+
|
|
122
|
+
## [1.17.3] - 2025-10-27
|
|
123
|
+
- Update Hallucination check citation regex parsing pattern
|
|
124
|
+
|
|
125
|
+
## [1.17.2] - 2025-10-23
|
|
126
|
+
- Adding model `AZURE_GPT_5_PRO_2025_1006` and `litellm:openai-gpt-5-pro` to `language_model/info.py`
|
|
127
|
+
|
|
121
128
|
## [1.17.1] - 2025-10-23
|
|
122
129
|
- Fix hallucination check input with all cited reference chunks.
|
|
130
|
+
|
|
123
131
|
## [1.17.0] - 2025-10-22
|
|
124
132
|
- Add more options to display sub agent answers in the chat.
|
|
125
133
|
|
|
@@ -35,7 +35,7 @@ unique_toolkit/agentic/evaluation/context_relevancy/service.py,sha256=2NM1_PCP6f
|
|
|
35
35
|
unique_toolkit/agentic/evaluation/evaluation_manager.py,sha256=IPx4BVUgkjFOP1BGLi0BlB6UujpXlZ0KGuSXDRemQhY,8143
|
|
36
36
|
unique_toolkit/agentic/evaluation/exception.py,sha256=7lcVbCyoN4Md1chNJDFxpUYyWbVrcr9dcc3TxWykJTc,115
|
|
37
37
|
unique_toolkit/agentic/evaluation/hallucination/constants.py,sha256=SoGmoYti2J33tSmmOC1BSF6Pkh8DQvbQAU9xIZFQZRs,2070
|
|
38
|
-
unique_toolkit/agentic/evaluation/hallucination/hallucination_evaluation.py,sha256=
|
|
38
|
+
unique_toolkit/agentic/evaluation/hallucination/hallucination_evaluation.py,sha256=6ZLbQWW5vmI0btoSjgUhQT7pADNc_-dUDFlexD31drU,4057
|
|
39
39
|
unique_toolkit/agentic/evaluation/hallucination/prompts.py,sha256=O3Hi_rOzZlujvnO2wn2jhoPmrYLjzVtRWwxn5Q81m9Y,3405
|
|
40
40
|
unique_toolkit/agentic/evaluation/hallucination/service.py,sha256=Ut-f768HY4E9zEhfMoKYnGTFRZVkxWGiSTGOpgfZWYM,2447
|
|
41
41
|
unique_toolkit/agentic/evaluation/hallucination/utils.py,sha256=QLsYvgAyQ5XnKEzn7ko7bXfzePD4De99TWnMKglMpds,8178
|
|
@@ -147,7 +147,7 @@ unique_toolkit/language_model/builder.py,sha256=4OKfwJfj3TrgO1ezc_ewIue6W7BCQ2ZY
|
|
|
147
147
|
unique_toolkit/language_model/constants.py,sha256=B-topqW0r83dkC_25DeQfnPk3n53qzIHUCBS7YJ0-1U,119
|
|
148
148
|
unique_toolkit/language_model/default_language_model.py,sha256=-_DBsJhLCsFdaU4ynAkyW0jYIl2lhrPybZm1K-GgVJs,125
|
|
149
149
|
unique_toolkit/language_model/functions.py,sha256=LGX3rR-XjkB-R520jp4w_Azgqf7BsIAo7E_VWoqA5xY,17260
|
|
150
|
-
unique_toolkit/language_model/infos.py,sha256=
|
|
150
|
+
unique_toolkit/language_model/infos.py,sha256=oGbI9kA1jW9SdUUsWuSISD9O5Zm09PIzDIWXDyAnhzA,62649
|
|
151
151
|
unique_toolkit/language_model/prompt.py,sha256=JSawaLjQg3VR-E2fK8engFyJnNdk21zaO8pPIodzN4Q,3991
|
|
152
152
|
unique_toolkit/language_model/reference.py,sha256=nkX2VFz-IrUz8yqyc3G5jUMNwrNpxITBrMEKkbqqYoI,8583
|
|
153
153
|
unique_toolkit/language_model/schemas.py,sha256=oHcJgmNSGpGW6ygjWvEB9iYaHgx250-Mtm-olSSJ-Ek,23760
|
|
@@ -165,7 +165,7 @@ unique_toolkit/short_term_memory/service.py,sha256=5PeVBu1ZCAfyDb2HLVvlmqSbyzBBu
|
|
|
165
165
|
unique_toolkit/smart_rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
166
166
|
unique_toolkit/smart_rules/compile.py,sha256=Ozhh70qCn2yOzRWr9d8WmJeTo7AQurwd3tStgBMPFLA,1246
|
|
167
167
|
unique_toolkit/test_utilities/events.py,sha256=_mwV2bs5iLjxS1ynDCjaIq-gjjKhXYCK-iy3dRfvO3g,6410
|
|
168
|
-
unique_toolkit-1.17.
|
|
169
|
-
unique_toolkit-1.17.
|
|
170
|
-
unique_toolkit-1.17.
|
|
171
|
-
unique_toolkit-1.17.
|
|
168
|
+
unique_toolkit-1.17.3.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
|
|
169
|
+
unique_toolkit-1.17.3.dist-info/METADATA,sha256=WpWG0ZZEMzpUBMiEOmvdBoGE-q0mfGKX_2RkyQXxwW4,38235
|
|
170
|
+
unique_toolkit-1.17.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
171
|
+
unique_toolkit-1.17.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|