unique_toolkit 0.7.23__tar.gz → 0.7.25__tar.gz

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.
Files changed (66) hide show
  1. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/CHANGELOG.md +6 -0
  2. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/PKG-INFO +7 -1
  3. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/pyproject.toml +1 -1
  4. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/content/service.py +2 -1
  5. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/language_model/infos.py +96 -0
  6. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/LICENSE +0 -0
  7. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/README.md +0 -0
  8. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/__init__.py +0 -0
  9. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/_common/_base_service.py +0 -0
  10. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/_common/_time_utils.py +0 -0
  11. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/_common/exception.py +0 -0
  12. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/_common/validate_required_values.py +0 -0
  13. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/_common/validators.py +0 -0
  14. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/app/__init__.py +0 -0
  15. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/app/init_logging.py +0 -0
  16. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/app/init_sdk.py +0 -0
  17. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/app/performance/async_tasks.py +0 -0
  18. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/app/performance/async_wrapper.py +0 -0
  19. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/app/schemas.py +0 -0
  20. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/app/verification.py +0 -0
  21. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/chat/__init__.py +0 -0
  22. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/chat/constants.py +0 -0
  23. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/chat/functions.py +0 -0
  24. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/chat/schemas.py +0 -0
  25. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/chat/service.py +0 -0
  26. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/chat/state.py +0 -0
  27. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/chat/utils.py +0 -0
  28. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/content/__init__.py +0 -0
  29. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/content/constants.py +0 -0
  30. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/content/functions.py +0 -0
  31. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/content/schemas.py +0 -0
  32. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/content/utils.py +0 -0
  33. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/embedding/__init__.py +0 -0
  34. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/embedding/constants.py +0 -0
  35. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/embedding/functions.py +0 -0
  36. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/embedding/schemas.py +0 -0
  37. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/embedding/service.py +0 -0
  38. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/embedding/utils.py +0 -0
  39. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/evaluators/__init__.py +0 -0
  40. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/evaluators/config.py +0 -0
  41. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/evaluators/constants.py +0 -0
  42. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/evaluators/context_relevancy/constants.py +0 -0
  43. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/evaluators/context_relevancy/prompts.py +0 -0
  44. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/evaluators/context_relevancy/service.py +0 -0
  45. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/evaluators/context_relevancy/utils.py +0 -0
  46. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/evaluators/exception.py +0 -0
  47. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/evaluators/hallucination/constants.py +0 -0
  48. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/evaluators/hallucination/prompts.py +0 -0
  49. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/evaluators/hallucination/service.py +0 -0
  50. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/evaluators/hallucination/utils.py +0 -0
  51. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/evaluators/output_parser.py +0 -0
  52. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/evaluators/schemas.py +0 -0
  53. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/language_model/__init__.py +0 -0
  54. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/language_model/builder.py +0 -0
  55. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/language_model/constants.py +0 -0
  56. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/language_model/functions.py +0 -0
  57. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/language_model/prompt.py +0 -0
  58. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/language_model/schemas.py +0 -0
  59. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/language_model/service.py +0 -0
  60. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/language_model/utils.py +0 -0
  61. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/protocols/support.py +0 -0
  62. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/short_term_memory/__init__.py +0 -0
  63. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/short_term_memory/constants.py +0 -0
  64. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/short_term_memory/functions.py +0 -0
  65. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/short_term_memory/schemas.py +0 -0
  66. {unique_toolkit-0.7.23 → unique_toolkit-0.7.25}/unique_toolkit/short_term_memory/service.py +0 -0
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.7.25] - 2025-06-05
9
+ - Adding models `AZURE_GPT_41_MINI_2025_0414`, `AZURE_GPT_41_NANO_2025_0414`
10
+
11
+ ## [0.7.24] - 2025-05-30
12
+ - Adding litellm model `gemini-2-5-flash-preview-05-20`, `anthropic-claude-sonnet-4` and `anthropic-claude-opus-4`
13
+
8
14
  ## [0.7.23] - 2025-05-22
9
15
  - add encoder for `AZURE_GPT_4o_2024_1120` to be part of the encoder function returns.
10
16
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_toolkit
3
- Version: 0.7.23
3
+ Version: 0.7.25
4
4
  Summary:
5
5
  License: Proprietary
6
6
  Author: Martin Fadler
@@ -111,6 +111,12 @@ All notable changes to this project will be documented in this file.
111
111
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
112
112
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
113
113
 
114
+ ## [0.7.25] - 2025-06-05
115
+ - Adding models `AZURE_GPT_41_MINI_2025_0414`, `AZURE_GPT_41_NANO_2025_0414`
116
+
117
+ ## [0.7.24] - 2025-05-30
118
+ - Adding litellm model `gemini-2-5-flash-preview-05-20`, `anthropic-claude-sonnet-4` and `anthropic-claude-opus-4`
119
+
114
120
  ## [0.7.23] - 2025-05-22
115
121
  - add encoder for `AZURE_GPT_4o_2024_1120` to be part of the encoder function returns.
116
122
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "unique_toolkit"
3
- version = "0.7.23"
3
+ version = "0.7.25"
4
4
  description = ""
5
5
  authors = [
6
6
  "Martin Fadler <martin.fadler@unique.ch>",
@@ -1,5 +1,6 @@
1
1
  import logging
2
2
  from pathlib import Path
3
+ from typing import Any
3
4
 
4
5
  import unique_sdk
5
6
  from requests import Response
@@ -408,7 +409,7 @@ class ContentService:
408
409
  chat_id: str | None = None,
409
410
  skip_ingestion: bool = False,
410
411
  ingestion_config: unique_sdk.Content.IngestionConfig | None = None,
411
- metadata: dict[str, any] | None = None,
412
+ metadata: dict[str, Any] | None = None,
412
413
  ):
413
414
  """
414
415
  Uploads content to the knowledge base.
@@ -23,14 +23,19 @@ class LanguageModelName(StrEnum):
23
23
  AZURE_o3_MINI_2025_0131 = "AZURE_o3_MINI_2025_0131"
24
24
  AZURE_GPT_45_PREVIEW_2025_0227 = "AZURE_GPT_45_PREVIEW_2025_0227"
25
25
  AZURE_GPT_41_2025_0414 = "AZURE_GPT_41_2025_0414"
26
+ AZURE_GPT_41_MINI_2025_0414 = "AZURE_GPT_41_MINI_2025_0414"
27
+ AZURE_GPT_41_NANO_2025_0414 = "AZURE_GPT_41_NANO_2025_0414"
26
28
  AZURE_o3_2025_0416 = "AZURE_o3_2025_0416"
27
29
  AZURE_o4_MINI_2025_0416 = "AZURE_o4_MINI_2025_0416"
28
30
  ANTHROPIC_CLAUDE_3_7_SONNET = "litellm:anthropic-claude-3-7-sonnet"
29
31
  ANTHROPIC_CLAUDE_3_7_SONNET_THINKING = (
30
32
  "litellm:anthropic-claude-3-7-sonnet-thinking"
31
33
  )
34
+ ANTHROPIC_CLAUDE_SONNET_4 = "litellm:anthropic-claude-sonnet-4"
35
+ ANTHROPIC_CLAUDE_OPUS_4 = "litellm:anthropic-claude-opus-4"
32
36
  GEMINI_2_0_FLASH = "litellm:gemini-2-0-flash"
33
37
  GEMINI_2_5_FLASH_PREVIEW_0417 = "litellm:gemini-2-5-flash-preview-04-17"
38
+ GEMINI_2_5_FLASH_PREVIEW_0520 = "litellm:gemini-2-5-flash-preview-05-20"
34
39
  GEMINI_2_5_PRO_EXP_0325 = "litellm:gemini-2-5-pro-exp-03-25"
35
40
 
36
41
 
@@ -375,6 +380,42 @@ class LanguageModelInfo(BaseModel):
375
380
  info_cutoff_at=date(2024, 5, 31),
376
381
  published_at=date(2025, 4, 14),
377
382
  )
383
+ case LanguageModelName.AZURE_GPT_41_MINI_2025_0414:
384
+ return cls(
385
+ name=model_name,
386
+ capabilities=[
387
+ ModelCapabilities.STRUCTURED_OUTPUT,
388
+ ModelCapabilities.FUNCTION_CALLING,
389
+ ModelCapabilities.STREAMING,
390
+ ModelCapabilities.VISION,
391
+ ],
392
+ provider=LanguageModelProvider.AZURE,
393
+ version="2025-04-14",
394
+ encoder_name=EncoderName.O200K_BASE,
395
+ token_limits=LanguageModelTokenLimits(
396
+ token_limit_input=1_047_576, token_limit_output=32_768
397
+ ),
398
+ info_cutoff_at=date(2024, 5, 31),
399
+ published_at=date(2025, 4, 14),
400
+ )
401
+ case LanguageModelName.AZURE_GPT_41_NANO_2025_0414:
402
+ return cls(
403
+ name=model_name,
404
+ capabilities=[
405
+ ModelCapabilities.STRUCTURED_OUTPUT,
406
+ ModelCapabilities.FUNCTION_CALLING,
407
+ ModelCapabilities.STREAMING,
408
+ ModelCapabilities.VISION,
409
+ ],
410
+ provider=LanguageModelProvider.AZURE,
411
+ version="2025-04-14",
412
+ encoder_name=EncoderName.O200K_BASE,
413
+ token_limits=LanguageModelTokenLimits(
414
+ token_limit_input=1_047_576, token_limit_output=32_768
415
+ ),
416
+ info_cutoff_at=date(2024, 5, 31),
417
+ published_at=date(2025, 4, 14),
418
+ )
378
419
  case LanguageModelName.ANTHROPIC_CLAUDE_3_7_SONNET:
379
420
  return cls(
380
421
  name=model_name,
@@ -410,6 +451,42 @@ class LanguageModelInfo(BaseModel):
410
451
  info_cutoff_at=date(2024, 10, 31),
411
452
  published_at=date(2025, 2, 24),
412
453
  )
454
+ case LanguageModelName.ANTHROPIC_CLAUDE_SONNET_4:
455
+ return cls(
456
+ name=model_name,
457
+ capabilities=[
458
+ ModelCapabilities.FUNCTION_CALLING,
459
+ ModelCapabilities.STREAMING,
460
+ ModelCapabilities.VISION,
461
+ ModelCapabilities.REASONING,
462
+ ],
463
+ provider=LanguageModelProvider.LITELLM,
464
+ version="claude-sonnet-4",
465
+ encoder_name=EncoderName.O200K_BASE, # TODO: Update encoder with litellm
466
+ token_limits=LanguageModelTokenLimits(
467
+ token_limit_input=200_000, token_limit_output=64_000
468
+ ),
469
+ info_cutoff_at=date(2025, 3, 1),
470
+ published_at=date(2025, 5, 1),
471
+ )
472
+ case LanguageModelName.ANTHROPIC_CLAUDE_OPUS_4:
473
+ return cls(
474
+ name=model_name,
475
+ capabilities=[
476
+ ModelCapabilities.FUNCTION_CALLING,
477
+ ModelCapabilities.STREAMING,
478
+ ModelCapabilities.VISION,
479
+ ModelCapabilities.REASONING,
480
+ ],
481
+ provider=LanguageModelProvider.LITELLM,
482
+ version="claude-opus-4",
483
+ encoder_name=EncoderName.O200K_BASE, # TODO: Update encoder with litellm
484
+ token_limits=LanguageModelTokenLimits(
485
+ token_limit_input=200_000, token_limit_output=32_000
486
+ ),
487
+ info_cutoff_at=date(2025, 3, 1),
488
+ published_at=date(2025, 5, 1),
489
+ )
413
490
  case LanguageModelName.GEMINI_2_0_FLASH:
414
491
  return cls(
415
492
  name=model_name,
@@ -448,6 +525,25 @@ class LanguageModelInfo(BaseModel):
448
525
  info_cutoff_at=date(2025, 1, day=1),
449
526
  published_at=date(2025, 4, 1),
450
527
  )
528
+ case LanguageModelName.GEMINI_2_5_FLASH_PREVIEW_0520:
529
+ return cls(
530
+ name=model_name,
531
+ capabilities=[
532
+ ModelCapabilities.FUNCTION_CALLING,
533
+ ModelCapabilities.STREAMING,
534
+ ModelCapabilities.VISION,
535
+ ModelCapabilities.STRUCTURED_OUTPUT,
536
+ ModelCapabilities.REASONING,
537
+ ],
538
+ provider=LanguageModelProvider.LITELLM,
539
+ version="gemini-2-5-flash-preview-05-20",
540
+ encoder_name=EncoderName.O200K_BASE, # TODO:Replace with LLM tokenizer
541
+ token_limits=LanguageModelTokenLimits(
542
+ token_limit_input=1_048_576, token_limit_output=65_536
543
+ ),
544
+ info_cutoff_at=date(2025, 1, day=1),
545
+ published_at=date(2025, 4, 1),
546
+ )
451
547
  case LanguageModelName.GEMINI_2_5_PRO_EXP_0325:
452
548
  return cls(
453
549
  name=model_name,
File without changes