unique_toolkit 0.5.31__py3-none-any.whl → 0.5.33__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.
- unique_toolkit/language_model/infos.py +17 -1
- unique_toolkit/language_model/schemas.py +5 -0
- {unique_toolkit-0.5.31.dist-info → unique_toolkit-0.5.33.dist-info}/METADATA +7 -1
- {unique_toolkit-0.5.31.dist-info → unique_toolkit-0.5.33.dist-info}/RECORD +6 -6
- {unique_toolkit-0.5.31.dist-info → unique_toolkit-0.5.33.dist-info}/LICENSE +0 -0
- {unique_toolkit-0.5.31.dist-info → unique_toolkit-0.5.33.dist-info}/WHEEL +0 -0
@@ -17,6 +17,7 @@ class LanguageModelName(StrEnum):
|
|
17
17
|
AZURE_GPT_4_32K_0613 = "AZURE_GPT_4_32K_0613"
|
18
18
|
AZURE_GPT_4_TURBO_2024_0409 = "AZURE_GPT_4_TURBO_2024_0409"
|
19
19
|
AZURE_GPT_4o_2024_0513 = "AZURE_GPT_4o_2024_0513"
|
20
|
+
AZURE_GPT_4o_2024_0806 = "AZURE_GPT_4o_2024_0806"
|
20
21
|
AZURE_GPT_4o_MINI_2024_0718 = "AZURE_GPT_4o_MINI_2024_0718"
|
21
22
|
|
22
23
|
|
@@ -42,7 +43,11 @@ def get_encoder_name(model_name: LanguageModelName) -> Optional[EncoderName]:
|
|
42
43
|
| LMN.AZURE_GPT_4_TURBO_2024_0409
|
43
44
|
):
|
44
45
|
return EncoderName.CL100K_BASE
|
45
|
-
case
|
46
|
+
case (
|
47
|
+
LMN.AZURE_GPT_4o_2024_0513
|
48
|
+
| LMN.AZURE_GPT_4o_2024_0806
|
49
|
+
| LMN.AZURE_GPT_4o_MINI_2024_0718
|
50
|
+
):
|
46
51
|
return EncoderName.O200K_BASE
|
47
52
|
case _:
|
48
53
|
print(f"{model_name} is not supported. Please add encoder information.")
|
@@ -369,6 +374,17 @@ AzureGpt4o20240513 = create_language_model(
|
|
369
374
|
published_at=date(2024, 5, 13),
|
370
375
|
)
|
371
376
|
|
377
|
+
AzureGpt4o20240806 = create_language_model(
|
378
|
+
name=LanguageModelName.AZURE_GPT_4o_2024_0806,
|
379
|
+
encoder_name=get_encoder_name(LanguageModelName.AZURE_GPT_4o_2024_0806),
|
380
|
+
provider=LanguageModelProvider.AZURE,
|
381
|
+
version="2024-08-06",
|
382
|
+
token_limit_input=128000,
|
383
|
+
token_limit_output=16384,
|
384
|
+
info_cutoff_at=date(2023, 10, 1),
|
385
|
+
published_at=date(2024, 8, 6),
|
386
|
+
)
|
387
|
+
|
372
388
|
AzureGpt4oMini20240718 = create_language_model(
|
373
389
|
name=LanguageModelName.AZURE_GPT_4o_MINI_2024_0718,
|
374
390
|
provider=LanguageModelProvider.AZURE,
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import json
|
2
2
|
from enum import StrEnum
|
3
3
|
from typing import Any, Optional, Self
|
4
|
+
from uuid import uuid4
|
4
5
|
|
5
6
|
from humps import camelize
|
6
7
|
from pydantic import (
|
@@ -41,6 +42,10 @@ class LanguageModelFunction(BaseModel):
|
|
41
42
|
return json.loads(value)
|
42
43
|
return value
|
43
44
|
|
45
|
+
@field_validator("id", mode="before")
|
46
|
+
def randomize_id(cls, value):
|
47
|
+
return uuid4().hex
|
48
|
+
|
44
49
|
@model_serializer()
|
45
50
|
def serialize_model(self):
|
46
51
|
seralization = {}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: unique_toolkit
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.33
|
4
4
|
Summary:
|
5
5
|
License: Proprietary
|
6
6
|
Author: Martin Fadler
|
@@ -100,6 +100,12 @@ All notable changes to this project will be documented in this file.
|
|
100
100
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
101
101
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
102
102
|
|
103
|
+
## [0.5.33] - 2024-10-30
|
104
|
+
- Force randomizing tool_call_id. This is helpful to better identify the tool_calls.
|
105
|
+
|
106
|
+
## [0.5.32] - 2024-10-30
|
107
|
+
- Extending `LanguageModelName` with GPT-4o-2024-0806. This model is invoked using `AZURE_GPT_4o_2024_0806`.
|
108
|
+
|
103
109
|
## [0.5.31] - 2024-10-29
|
104
110
|
- Adding support for function calling. Assistant message for tool calls can be directly created with `LanguageModelFunctionCall.create_assistant_message_from_tool_calls`. Better separation of schemas for different types of `LanguageModelMessages`.
|
105
111
|
|
@@ -36,11 +36,11 @@ unique_toolkit/evaluators/hallucination/utils.py,sha256=507BsX1mFTEne1-LdRCNMgBj
|
|
36
36
|
unique_toolkit/evaluators/output_parser.py,sha256=eI72qkzK1dZyUvnfP2SOAQCGBj_-PwX5wy_aLPMsJMY,883
|
37
37
|
unique_toolkit/evaluators/schemas.py,sha256=Jaue6Uhx75X1CyHKWj8sT3RE1JZXTqoLtfLt2xQNCX8,2507
|
38
38
|
unique_toolkit/language_model/__init__.py,sha256=YuhyczGPj6w9xX-sOVUhmozvzIFxcckHFEkeMBecr5s,1784
|
39
|
-
unique_toolkit/language_model/infos.py,sha256=
|
40
|
-
unique_toolkit/language_model/schemas.py,sha256=
|
39
|
+
unique_toolkit/language_model/infos.py,sha256=kQK6F3r8xTN7oT6b39J7rxW-Y4iPXjx_Fr9bCOVQdm0,12509
|
40
|
+
unique_toolkit/language_model/schemas.py,sha256=0pMLM1cCplw1OlM-eLqldZtYMObGr7tjHKXSHQP7hwE,6216
|
41
41
|
unique_toolkit/language_model/service.py,sha256=s5X6EStyYumiYqlD9gkW4GANif18d9QZOMysmUSfv8M,13433
|
42
42
|
unique_toolkit/language_model/utils.py,sha256=WBPj1XKkDgxy_-T8HCZvsfkkSzj_1w4UZzNmyvdbBLY,1081
|
43
|
-
unique_toolkit-0.5.
|
44
|
-
unique_toolkit-0.5.
|
45
|
-
unique_toolkit-0.5.
|
46
|
-
unique_toolkit-0.5.
|
43
|
+
unique_toolkit-0.5.33.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
|
44
|
+
unique_toolkit-0.5.33.dist-info/METADATA,sha256=c063R7-la1op6nRW1W2IIFdQrl21NA_P3JmorSbNV8Y,13190
|
45
|
+
unique_toolkit-0.5.33.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
46
|
+
unique_toolkit-0.5.33.dist-info/RECORD,,
|
File without changes
|
File without changes
|