No project description provided
Project description
Unique Toolkit
This package provides highlevel abstractions and methods on top of unique_sdk to ease application development for the Unique Platform.
The Toolkit is structured along the following domains:
unique_toolkit.chatunique_toolkit.contentunique_toolkit.embeddingunique_toolkit.language_modelunique_toolkit.short_term_memory
Each domain comprises a set of functions (in functions.py) and a service class (in service.py) which encapsulates the basic functionalities to interact with the domain entities, the schemas (in schemas.py) used in the service and required for interacting with the service functions, utility functions (in utils.py) which give additional functionality to interact with the domain entities (all domains except embedding) and other domain specific functionalities which are explained in the respective domain documentation.
In addition, the unique_toolkit.app module provides functions to initialize apps that interact with the Unique platform. It also includes some utility functions to run async tasks in parallel (async webserver and app implementation required).
Changelog
See the CHANGELOG.md file for details on changes and version history.
Domains
App
The unique_toolkit.app module encompasses functions for initializing and securing apps that will interact with the Unique platform.
init_logging.pycan be used to initalize the logger either with unique dictConfig or an any other dictConfig.init_sdk.pycan be used to initialize the sdk using the correct env variables and retrieving the endpoint secret.schemas.pycontains the Event schema which can be used to parse and validate the unique.chat.external-module.chosen event.verification.pycan be used to verify the endpoint secret and construct the event.
Chat
The unique_toolkit.chat module encompasses all chat related functionality.
functions.pycomprises the functions to manage and load the chat history and interact with the chat ui, e.g., creating a new assistant message.service.pycomprises the ChatService and provides an interface to manage and load the chat history and interact with the chat ui, e.g., creating a new assistant message and stream complete.schemas.pycomprises all relevant schemas, e.g., ChatMessage, used in the ChatService.utils.pycomprises utility functions to use and convert ChatMessage objects in assistants, e.g., convert_chat_history_to_injectable_string converts the chat history to a string that can be injected into a prompt.
Content
The unique_toolkit.content module encompasses all content related functionality. Content can be any type of textual data that is stored in the Knowledgebase on the Unique platform. During the ingestion of the content, the content is parsed, split in chunks, indexed, and stored in the database.
functions.pycomprises the functions to manage and load the chat history and interact with the chat ui, e.g., creating a new assistant message.service.pycomprises the ContentService and provides an interface to interact with the content, e.g., search content, search content chunks, upload and download content.schemas.pycomprises all relevant schemas, e.g., Content and ContentChunk, used in the ContentService.utils.pycomprise utility functions to manipulate Content and ContentChunk objects, e.g., sort_content_chunks and merge_content_chunks.
Embedding
The unique_toolkit.embedding module encompasses all embedding related functionality. Embeddings are used to represent textual data in a high-dimensional space. The embeddings can be used to calculate the similarity between two texts, for instance.
functions.pycomprises the functions to embed text and calculate the similarity between two texts.service.pyencompasses the EmbeddingService and provides an interface to interact with the embeddings, e.g., embed text and calculate the similarity between two texts.schemas.pycomprises all relevant schemas, e.g., Embeddings, used in the EmbeddingService.
Language Model
The unique_toolkit.language_model module encompasses all language model related functionality and information on the different language models deployed through the
Unique platform.
infos.pycomprises the information on all language models deployed through the Unique platform. We recommend to use the LanguageModel class, initialized with the LanguageModelName, e.g., LanguageModel(LanguageModelName.AZURE_GPT_4o_2024_1120) to get the information on the specific language model like the name, version, token limits or retirement date.functions.pycomprises the functions to complete and stream complete to chat.service.pycomprises the LanguageModelService and provides an interface to interact with the language models, e.g., complete.schemas.pycomprises all relevant schemas, e.g., LanguageModelResponse, used in the LanguageModelService.utils.pycomprises utility functions to parse the output of the language model, e.g., convert_string_to_json finds and parses the last json object in a string.
Short Term Memory
The unique_toolkit.short_term_memory module encompasses all short term memory related functionality.
functions.pycomprises the functions to manage and load the chat history and interact with the chat ui, e.g., creating a new assistant message.service.pycomprises the ShortTermMemoryService and provides an interface to interact with the short term memory, e.g., create memory.schemas.pycomprises all relevant schemas, e.g., ShortTermMemory, used in the ShortTermMemoryService.
Development instructions
-
Install poetry on your system (through
breworpipx). -
Install
pyenvand install python 3.11.pyenvis recommended as otherwise poetry uses the python version used to install itself and not the user preferred python version. -
If you then run
python --versionin your terminal, you should be able to see python version as specified in.python-version. -
Then finally run
poetry installto install the package and all dependencies.
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.28.3] - 2025-11-20
- Add batch upload of files to knowledgebase
- Add create folders utilities
[1.28.2] - 2025-11-20
- Adding model
litellm:gemini-3-pro-previewtolanguage_model/info.py
[1.28.1] - 2025-11-19
- Remove
chat_servicefrom DocXGeneratorService
[1.28.1] - 2025-11-19
- Set review standards in pyright for toolkit
- Refactor type check pipeline
[1.28.0] - 2025-11-19
- Add option to interpret sub agent responses as content chunks.
- Add option to specify a custom JSON schema for sub agent tool input.
[1.27.2] - 2025-11-19
- Add test to token counting
[1.27.1] - 2025-11-18
- Add missing
create_query_params_from_modelin experimental endoint_builder.py
[1.27.0] - 2025-11-18
- Add
session_configfield toChatEventPayloadschema for chat session configuration support - Add
ingestion_statefield toContentmodel for tracking content ingestion status - Add
include_failed_contentparameter to content search functions inKnowledgeBaseService,search_contents, andsearch_contents_async - Experimental:
- Fix HTTP GET requests in
build_request_requestorto use query parameters (params) instead of JSON body build_requestorto properly pass kwargs tobuild_request_requestor
- Fix HTTP GET requests in
[1.26.2] - 2025-11-17
- Adding tool format information for MCP tools
[1.26.1] - 2025-11-17
- Fix bug where forcing a tool still sends builtin tools to the LLM when using the responses api.
[1.26.0] - 2025-11-17
- Adding model
AZURE_GPT_51_2025_1113,AZURE_GPT_51_THINKING_2025_1113,AZURE_GPT_51_CHAT_2025_1113,AZURE_GPT_51_CODEX_2025_1113,AZURE_GPT_51_CODEX_MINI_2025_1113andlitellm:openai-gpt-51andlitellm:openai-gpt-51-thinkingtolanguage_model/info.py
[1.25.2] - 2025-11-12
- Standardize paths in unique toolkit settings
[1.25.1] - 2025-11-12
- Make pipeline steps reusable
- Add pipeline checks for type errors
- Add pipeline checks for coverage
[1.25.0] - 2025-11-10
- Download files generated by code execution in parrallel.
- Better display of files in the chat while loading.
[1.24.5] - 2025-11-10
- Fix bug where images were not properly converted to responses api format.
[1.24.4] - 2025-11-07
- Add
user_idto language service for tracking - Track
user_idin hallucination check
[1.24.3] - 2025-11-07
- Adding litellm models
litellm:gemini-2-5-flash-lite
[1.24.2] - 2025-11-06
- Fix build_requestor typehints
[1.24.1] - 2025-11-06
- Add IconChartBar Icon to ToolIcon
[1.24.0] - 2025-11-04
- Introduce ability to include system reminders in tools to be appended when the response is included in the tool call history
[1.23.0] - 2025-11-04
- Refactor sub agent tools implementation for clarity and testability.
[1.22.2] - 2025-11-03
- Updated
unique_ai_how-it-works.mdandplan_processing.mdto document how new assistant messages are generated when the orchestrator produces output text and triggers tool calls within the same loop iteration.
[1.22.1] - 2025-11-03
- Add missing package required markdown-it-py
[1.22.0] - 2025-10-31
- Add
DocxGeneratorServicefor generating Word documents from markdown with template support - Fix documentation for
update_message_execution,update_message_execution_async,update_assistant_message_execution, andupdate_assistant_message_execution_asyncfunctions to correctly reflect that thestatusparameter is now optional
[1.21.2] - 2025-10-30
- Fixing that system format info is only appended to system prompt if tool is called
[1.21.1] - 2025-10-30
- Improve Spaces 2.0 display of tool progress reporter configuration.
[1.21.0] - 2025-10-30
- Add option to customize the display of tool progress statuses.
[1.20.1] - 2025-10-30
- Fix typing issues in
LanguageModelFunction.
[1.20.0] - 2025-10-30
- Fix bug where async tasks executed with
SafeTaskExecutordid not log exceptions. - Add option to customize sub agent response display title.
- Add option to display sub agent responses after the main agent response.
- Add option to specify postprocessors to run before or after the others in the
PostprocessorManager.
[1.19.3] - 2025-10-29
- More documentation on advanced rendering
[1.19.2] - 2025-10-29
- Removing unused tool specific
get_tool_call_result_for_loop_historyfunction - Removing unused experimental config
full_sources_serialize_dumpinhistory_manager
[1.19.1] - 2025-10-29
- Make api operations more flexible
- Make verification button text adaptable
[1.19.0] - 2025-10-28
- Enable additional headers on openai and langchain client
[1.18.1] - 2025-10-28
- Fix bug where sub agent references were not properly displayed in the main agent response when the sub agent response was hidden.
[1.18.0] - 2025-10-27
- Temporary fix to rendering of sub agent responses.
- Add config option
stop_conditiontoSubAgentToolConfig - Add config option
tool_choicestoSubAgentToolConfig - Make sub agent evaluation use the name of the sub agent name if only one assessment is valid
[1.17.3] - 2025-10-27
- Update Hallucination check citation regex parsing pattern
[1.17.2] - 2025-10-23
- Adding model
AZURE_GPT_5_PRO_2025_1006andlitellm:openai-gpt-5-protolanguage_model/info.py
[1.17.1] - 2025-10-23
- Fix hallucination check input with all cited reference chunks.
[1.17.0] - 2025-10-22
- Add more options to display sub agent answers in the chat.
[1.16.5] - 2025-10-16
- Adding litellm models
litellm:anthropic-claude-haiku-4-5
[1.16.4] - 2025-10-18
- Fix bug with MCP tool parameters schema
[1.16.3] - 2025-10-18
- Add logging of MCP tool schema and constructed parameters
[1.16.2] - 2025-10-16
- Reduce operation dependency on path instead of full url
[1.16.1] - 2025-10-16
- Update debug info for better tool call tracking
[1.16.0] - 2025-10-16
- Add responses api support.
- Add utilities for code execution.
[1.15.0] - 2025-10-15
- Enable to distinguish between environment and modifiable payload parameters in human verification
[1.14.11] - 2025-10-13
- Introduce testing guidelines for AI
- Add AI tests to
tool_configandtool_factory.py
[1.14.10] - 2025-10-13
- Fix token counter if images in history
[1.14.9] - 2025-10-13
- Fix removal of metadata
[1.14.8] - 2025-10-13
- Use default tool icon on validation error
[1.14.7] - 2025-10-13
- Update of token_limit parameters for Claude models
[1.14.6] - 2025-10-10
- Fix circular import appearing in orchestrator
[1.14.5] - 2025-10-09
- Move
DEFAULT_GPT_4oconstant from_common/default_language_model.pytolanguage_model/constants.pyand deprecate old import path
[1.14.4] - 2025-10-09
- Small fixes when deleting content
- Fixes in documentation
[1.14.3] - 2025-10-08
- Reorganizes documentation
- All service interface towards a single folder
- Add main imports to init
[1.14.2] - 2025-10-08
- Add utilities for testing and fix external import issue
[1.14.1] - 2025-10-08
- Add utilities for testing
[1.14.0] - 2025-10-07
- Manipulate Metadata with knowledge base service
[1.13.0] - 2025-10-07
- Delete contents with knowledge base service
[1.12.1] - 2025-10-07
- Fix bug where failed evaluations did not show an error to the user.
[1.12.0] - 2026-10-07
- Add the
OpenAIUserMessageBuilderfor complex user messages with images - More examples with documents/images on the chat
[1.11.4] - 2026-10-07
- Make newer
MessageExecutionandMessageLogmethod keyword only
[1.11.3] - 2026-10-07
- Move smart rules to content
- Add to documentation
[1.11.2] - 2025-10-07
- Fix for empty metadata filter at info retrieval
[1.11.1] - 2025-10-07
- Fix bug where hallucination check was taking all of the chunks as input instead of only the referenced ones.
[1.11.0] - 2025-10-07
- Add sub-agent response referencing.
[1.10.0] - 2025-10-07
- Introduce future proof knowledgebase service decoupled from chat
- Extend chat service to download contents in the chat
- Update documentation
[1.9.1] - 2025-10-06
- Switch default model used in evaluation service from
GPT-3.5-turbo (0125)toGPT-4o (1120)
[1.9.0] - 2026-10-04
- Define the RequestContext and add aihttp/httpx requestors
[1.8.1] - 2026-10-03
- Fix bug where sub agent evaluation config variable
include_evaluationdid not include aliases for previous names.
[1.8.0] - 2026-10-03
- Sub Agents now block when executing the same sub-agent multiple times with
reuse_chatset toTrue. - Sub Agents tool, evaluation and post-processing refactored and tests added.
[1.7.0] - 2025-10-01
- Add functionality to remove text in
get_user_visible_chat_history
[1.6.0] - 2025-10-01
- revert and simplify 1.5.0
[1.5.1] - 2025-10-01
- Fix filtering logic to raise a ConfigurationException if chat event filters are not specified
[1.5.0] - 2025-10-01
- Allow history manager to fetch only ui visible text
[1.4.4] - 2025-09-30
- Fix bugs with display of sub-agent answers and evaluations when multiple sub-agent from the same assistant run concurrently.
[1.4.3] - 2025-09-30
- Fix bug with sub-agent post-processing reference numbers.
[1.4.2] - 2025-09-30
- Adding litellm models
litellm:anthropic-claude-sonnet-4-5andlitellm:anthropic-claude-opus-4-1
[1.4.1] - 2025-09-30
- Handle sub agent failed assessments better in sub agent evaluator.
[1.4.0] - 2025-09-29
- Add ability to consolidate sub agent's assessments.
[1.3.3] - 2025-09-30
- fix bug in exclusive tools not making them selectable
[1.3.2] - 2025-09-29
- Auto-update unique settings on event arrival in SSE client
[1.3.1] - 2025-09-29
- More documentation on referencing
[1.3.0] - 2025-09-28
- Add utilitiy to enhance pydantic model with metadata
- Add capability to collect this metadata with same hierarchy as nested pydantic models
[1.2.1] - 2025-09-28
- Fix bug where camel case arguments were not properly validated.
[1.2.0] - 2025-09-24
- Add ability to display sub agent responses in the chat.
[1.1.9] - 2025-09-24
- Fix bug in
LanguageModelFunctionto extend support mistral tool calling.
[1.1.8] - 2025-09-23
- Revert last to version 1.1.6
[1.1.7] - 2025-09-23
- Introduce keyword only functions in services for better backward compatibility
- Deprecatea functions that are using positional arguments in services
[1.1.6] - 2025-09-23
- Fix model_dump for
ToolBuildConfig
[1.1.5] - 2025-09-23
- Fix a circular import and add tests for
ToolBuildConfig
[1.1.4] - 2025-09-23
- First version human verification on api calls
[1.1.3] - 2025-09-23
- Updated LMI JSON schema input type to include annotated string field with title
[1.1.2] - 2025-09-22
- Fixed bug tool selection for exclusive tools
[1.1.1] - 2025-09-18
- Fixed bug on tool config added icon name
[1.1.0] - 2025-09-18
- Enable chat event filtering in SSE event generator via env variables
[1.0.0] - 2025-09-18
- Bump toolkit version to allow for both patch and minor updates
[0.9.1] - 2025-09-17
- update to python 3.12 due to security
[0.9.0] - 2025-09-14
- Moved agentic code into the
agenticfolder. This breaks imports ofdebug_info_amanagerevalshistory_managerpost_processorreference-managershort_term_memory_managerthinking_managertools
[0.8.57] - 2025-09-14
- Added more utils to commons
[0.8.56] - 2025-09-12
- Fixed token counter in utils
[0.8.55] - 2025-09-10
- Update documentation with agentic managers
[0.8.54] - 2025-09-10
- HistoryManager: compute source numbering offset from prior serialized tool messages using
load_sources_from_string - LoopTokenReducer: serialize reduced tool messages as JSON arrays to keep offsets parsable
[0.8.53] - 2025-09-09
- Add support for skip ingestion for only excel files.
[0.8.52] - 2025-09-06
- Fix import error in token counting
[0.8.51] - 2025-09-06
- Update token counter to latest version of monorepo.
[0.8.50] - 2025-09-08
- Minor fix in documentation
- Updated examples
[0.8.49] - 2025-09-05
- Fixed token reducer now has a safety margin of 10% less did not work.
[0.8.48] - 2025-09-05
- Add documentation on language models to markdown
[0.8.47] - 2025-09-05
- Removed old code
- Fixed small bugs in history manager & set the hallucination to use gpt4o as default.
[0.8.46] - 2025-09-04
- Bugfix for hostname identification inside Unique cluster in
unique_settings.py
[0.8.45] - 2025-09-04
- Introduce handoff capability to tools. with the
takes_control()function.
[0.8.44] - 2025-09-03
- Refine
EndpointClassand createEndpointRequestor
[0.8.43] - 2025-09-03
- Add alias for
UniqueSettingsapi baseAPI_BASE
[0.8.42] - 2025-09-02
- updated schema of
chunk_relevancy_sorter
[0.8.41] - 2025-09-02
- Make A2A tool auto register with tool factory
[0.8.40] - 2025-09-02
- Add frontend compatible type for pydantic BaseModel types in pydantic BaseModels
[0.8.39] - 2025-09-02
- include
get_async_openai_client
[0.8.38] - 2025-09-01
- Sanitize documentation
[0.8.37] - 2025-09-01
- Adapt defaults and json-schema in
LanguageModelInfo
[0.8.36] - 2025-09-01
- Added dependency
PillowandPlatformsdir
[0.8.35] - 2025-09-01
- Initial toolkit documentation (WIP)
[0.8.34] - 2025-09-01
- Automatic initializations of services and event generator
[0.8.33] - 2025-08-31
- fixed tool for
web_search
[0.8.32] - 2025-08-30
- moved over general packages for
web_search
[0.8.31] - 2025-08-29
- Add various openai models to supported model list
- o1
- o3
- o3-deep-research
- o3-pro
- o4-mini
- o4-mini-deep-research
- gpt-4-1-mini
- gpt-4-1-nano
[0.8.30] - 2025-08-28
- Added A2A manager
[0.8.29] - 2025-08-27
- Include
MessageExecutionandMessageLogin toolkit
[0.8.28] - 2025-08-28
- Fix paths for
sdk_urlandopenai_proxyfor localhost
[0.8.27] - 2025-08-28
- Fixed function "create_async" in language_model.functions : "user_id" argument should be optional.
[0.8.26] - 2025-08-27
- Optimized MCP manager
[0.8.26] - 2025-08-27
- Optimized MCP manager
[0.8.25] - 2025-08-27
- Load environment variables automatically from plattform dirs or environment
- General Endpoint definition utility
- Expose
LanguageModelToolDescriptionandLanguageModelNamedirectly - Get initial debug information from chat payload
[0.8.24] - 2025-08-25
- Optimized hallucination manager
[0.8.23] - 2025-08-27
- Add MCP manager that handles MCP related logic
[0.8.22] - 2025-08-25
- Add DeepSeek-R1, DeepSeek-V3.1, Qwen3-235B-A22B and Qwen3-235B-A22B-Thinking-2507 to supported model list
[0.8.21] - 2025-08-26
- Fixed old (not used) function "create_async" in language_model.functions : The function always returns "Unauthorized" --> Added "user_id" argument to fix this.
[0.8.20] - 2025-08-24
- Fixed forced-tool-calls
[0.8.20] - 2025-08-05
- Bump SDK version to support the latest features.
[0.8.19] - 2025-08-24
- Enforce usage of ruff using pipeline
[0.8.18] - 2025-08-22
- moved class variables into instance variables
[0.8.17] - 2025-08-22
- fixed circular dependencies in tools
[0.8.16] - 2025-08-19
- moved Hallucination evaluator into toolkit
[0.8.15] - 2025-08-19
- Added history loading from database for History Manager
[0.8.14] - 2025-08-19
- Including GPT-5 series deployed via LiteLLM into language model info
[0.8.13] - 2025-08-18
- Adding initial versions of
- Evaluation Manager
- History Manager
- Postprocessor Manager
- Thinking Manager
- Updated tool manager
[0.8.12] - 2025-08-18
- Fix no tool call respoonse in ChatMessage -> Open Ai messages translation
- Add simple append method to OpenAIMessageBuilder
[0.8.11] - 2025-08-15
- Fix no tool call respoonse in ChatMessage -> Open Ai messages translation
- Add simple append method to OpenAIMessageBuilder
[0.8.10] - 2025-08-15
- Add min and max temperature to
LanguageModelInfo: temperature will be clamped to the min and max temperature - Add default options to
LanguageModelInfo: These are used by default
[0.8.9] - 2025-08-15
- Reduce input token limits for
ANTHROPIC_CLAUDE_3_7_SONNET_THINKING,ANTHROPIC_CLAUDE_3_7_SONNET,ANTHROPIC_CLAUDE_OPUS_4andANTHROPIC_CLAUDE_SONNET_4to 180_000 from 200_000
[0.8.8] - 2025-08-11
- Make chat service openai stream response openai compatible
- Make
ChatMessageopenai compatible
[0.8.7] - 2025-08-11
- Make chat service openai compatible
- Fix some bugs
- Make OpenAIMessageBuilder more congruent to MessageBuilder
[0.8.6] - 2025-08-11
- Add GPT-5, GPT-5_MINI, GPT-5_NANO, GPT-5_CHAT to supported models list
[0.8.5] - 2025-08-06
- Refactored tools to be in the tool-kit
[0.8.4] - 2025-08-06
- Make unique settings compatible with legacy environment variables
[0.8.3] - 2025-08-05
- Expose threshold field for search.
[0.8.2] - 2025-08-05
- Implement overloads for services for clearer dev experience
- Proper typing for SSE event handling
- Enhanced unique settings. Expose usage of default values in logs
- SDK Initialization from unique settings
- Add utilities for to run llm/agent flows for devs
[0.8.1] - 2025-08-05
- Bump SDK version to support the latest features.
[0.8.0] - 2025-08-04
- Add MCP support
[0.7.42] - 2025-08-01
- Added tool definitions
[0.7.41] - 2025-07-31
- Add new chat event attribute indicating tools disabled on a company level
[0.7.40] - 2025-07-30
- Remove
GEMINI_2_5_FLASH_PREVIEW_0417model
[0.7.39] - 2025-07-28
- Implement utitilites to work with openai client
- Implement utitilites to work with langchain llm
[0.7.38] - 2025-07-25
- Fix issues with secret strings in settings
[0.7.36] - 2025-07-25
- Fix issues with settings
- Add testing to unique settings
[0.7.35] - 2025-07-23
- Bump version of SDK to have access to the latest features and fixes
[0.7.34] - 2025-05-30
- Fix incorrect mapping in
ContentServicefor thesearch_contentfunction when mapping intoContentChunkobject
[0.7.33] - 2025-06-25
- Update reference post-processing
[0.7.32] - 2025-06-24
- Create
classmethodforLanguageModelMessagesto load raw messages to root
[0.7.31] - 2025-06-19
- Add typings to references in payload from
LanguageModelStreamResponseMessage - Add
original_indexto the base reference to reflect updated api
[0.7.30] - 2025-06-20
- Adding litellm models
litellm:gemini-2-5-flash,gemini-2-5-flash-lite-preview-06-17,litellm:gemini-2-5-pro,litellm:gemini-2-5-pro-preview-06-05
[0.7.29] - 2025-06-19
- Fix typehintin in services
- Error on invalid initialization
[0.7.28] - 2025-06-17
- Revert default factory change on
ChatEventPayloadfor attributemetadata_filterdue to error inbackend-ingestionon empty dict
[0.7.27] - 2025-06-16
- Introduce a protocol for
complete_with_referencesto enable testable services - Rename/Create functions
stream_completein chat service and llm service accordingly
[0.7.26] - 2025-06-05
- Add
scope_rulestoChatEventPayload - Added
UniqueQLcompiler and pydantic classes forUniqueQL. Note this is functionally equivalent but not identical toUQLOperatororUQLCombinatorinunique_sdk.
[0.7.25] - 2025-06-05
- Adding models
AZURE_GPT_41_MINI_2025_0414,AZURE_GPT_41_NANO_2025_0414
[0.7.24] - 2025-05-30
- Adding litellm model
gemini-2-5-flash-preview-05-20,anthropic-claude-sonnet-4andanthropic-claude-opus-4
[0.7.23] - 2025-05-22
- add encoder for
AZURE_GPT_4o_2024_1120to be part of the encoder function returns.
[0.7.22] - 2025-05-22
messagesare now always serialized by alias. This affectsLanguageModelService.completeandLanguageModelService.complete_async.
[0.7.21] - 2025-05-21
- Extend the update the
ChatMessageobject to include theReferenceobject introduced in the public api
[0.7.20] - 2025-05-21
- Deprecate
LanguageModelTooland associated models in favor ofLanguageModelToolDescription
[0.7.19] - 2025-05-20
- Extend the
MessageBuilderto allow for appending anyLanguageModelMessage
[0.7.18] - 2025-05-20
- Add the possibility to specify metadata when creating or updating a Content.
[0.7.17] - 2025-05-16
- Change inheritance hierarchy of events for easier deprecation
[0.7.16] - 2025-05-16
- Add classmethods to create LanguageModelAssistatnMessage from functions and stream response
- Add completion like method to chat
- Add protocol for completion like method
[0.7.15] - 2025-05-13
- Add the possibility to specify ingestionConfig when creating or updating a Content.
[0.7.14] - 2025-05-08
- Fix bug not selecting the correct llm
- Add LMI type for flexible init of LanguageModelInfo
- Replace LanguageModel with LanguageModelInfo in hallucination check
[0.7.13] - 2025-05-07
- Adding litellm models
litellm:anthropic-claude-3-7-sonnet,litellm:anthropic-claude-3-7-sonnet-thinking,litellm:gemini-2-0-flash,gemini-2-5-flash-preview-04-17,litellm:gemini-2-5-pro-exp-03-25
[0.7.12] - 2025-05-02
- add
AZURE_o3_2025_0416andAZURE_o4_MINI_2025_0416as part of the models
[0.7.11] - 2025-04-28
- Removing
STRUCTURED_OUTPUTcapability fromAZURE_GPT_35_TURBO_0125,AZURE_GPT_4_TURBO_2024_0409andAZURE_GPT_4o_2024_0513
[0.7.10] - 2025-04-22
- Deprecate internal variables of services
[0.7.9] - 2025-04-17
- add
AZURE_GPT_41_2025_0414as part of the models
[0.7.8] - 2025-04-08
- add
AZURE_GPT_4o_2024_1120as part of the models
[0.7.7] - 2025-04-11
- Add tool choice parameter to chat event payload
[0.7.6] - 2025-04-08
- De provisioning o1-preview
[0.7.5] - 2025-04-07
- Skip None values when serializing to json schema for LanguageModelInfo
[0.7.4] - 2025-03-20
- add
AZURE_GPT_45_PREVIEW_2025_0227as part of the models
[0.7.3] - 2025-03-20
- Enable handling tool calls in message builder
[0.7.2] - 2025-03-17
- HotFix
ContentService.search_content_chunksto usechat_idfrom event if provided.
[0.7.1] - 2025-03-11
- Fix Breaking change:
ContentService.search_content_chunksContentService.search_content_chunksnow acceptschat_idfor the specific to handle chat_only instances
[0.7.0] - 2025-03-11
- Fix the issue with
ShortTermMemoryService.create_memory_asyncaddingself.chat_idandself.message_idas part of the parameter. - Breaking change:
ContentService.search_content_on_chatnow requires you pass in achat_idfor the specific chat instance
[0.6.9] - 2025-03-11
- Add o1-preview as part of the language model info, make the name consistent across board.
[0.6.8] - 2025-03-11
- Add
verify_request_and_construct_eventtoverification.py
[0.6.7] - 2025-03-10
- Extend language model message builder
[0.6.6] - 2025-03-10
- Add o1, o1-mini and o3-mini models
- Remove deprecated gpt4 models
- Make token_limits and encoder a required attribute of LanguageModelInfo
[0.6.5] - 2025-03-04
- Add
upload_content_from_bytestoContentService - Add
download_content_to_bytestoContentService
[0.6.3] - 2025-02-27
- Simplified imports for services.
from unique_toolkit.language_model import LanguageModelService->from unique_toolkit import LanguageModelServiceto reduce number of import lines.
[0.6.3] - 2025-02-26
- Add
buildermethod toLanguageModelMessagesclass
[0.6.2] - 2025-02-25
- Deprecate
LanguageModelin favor ofLanguageModelInfo LanguageModelTokenLimitsproperties become mandatory, initialization allows- init with
token_limitandfraction_inputorinput_token_limitandoutput_token_limit - only
input_token_limitandoutput_token_limitare members of model
- init with
[0.6.1] - 2025-02-25
- [BREAKING]
LanguageModelService.stream_completeandLanguageModelService.stream_complete_asyncare now moved toChatService.stream_completeandChatService.stream_complete_async. Correspondinglyassistant_message_idanduser_message_idare removed fromLanguageModelService. - Add
create_user_messageandcreate_user_message_asynctoChatService(similar tocreate_assistant_messageandcreate_assistant_message_async)
[0.6.0] - 2025-02-21
- make for each domain, its base functionality accessible from
functions.py - make it possible to instantiate the domain services directly from different event types, inhereted from common
BaseEvent - extend the functionalities in the ShortTermMemoryService by adding the
find_latest_memoryandcreate_memoryfunctions for sync and async usage - remove logger dependency from service classes
- marked deprecated:
from_chat_eventin ShortTermMemoryService, useShortTermMemoryService(event=event)insteadcomplete_async_utilin LanguageModelService, usefunctions.complete_asyncinsteadstream_complete_asyncin LanguageModelService, usestream_complete_to_chat_asyncinsteadstream_completein LanguageModelService, usestream_complete_to_chatinsteadEventand nested schemas inapp, useChatEventandChatEventUserMessage,ChatEventAssistantMessageandChatEventToolMessageinstead
[0.5.56] - 2025-02-19
- Add
MessageAssessmenttitle field and change label values
[0.5.55] - 2025-02-18
- Log
contentIdfor better debugging
[0.5.54] - 2025-02-10
- Add
created_at,completed_at,updated_atandgpt_requesttoChatMessageschema.
[0.5.53] - 2025-02-01
- Correct
MessageAssessmentschemas
[0.5.52] - 2025-02-01
- Add
MessageAssessmentschemas and functions toChatServiceto handle message assessments. - Fix
LanguageModelService.complete_async_utilto use the correct async method.
[0.5.51] - 2025-01-30
- Add missing structured output arguments in complete_async
[0.5.50] - 2025-01-30
- Add the possibility to define completion output structure through a pydantic class
[0.5.49] - 2025-01-24
- Add
parsedandrefusaltoLanguageModelAssistantMessageto support structured output
[0.5.48] - 2025-01-19
- Added the possibility define tool parameters with a json schema (Useful when generating tool parameters from a pydantic object)
[0.5.47] - 2025-01-07
- Added a message builder to build language model messages conveniently without importing all different messages.
- Move tool_calls to assistant message as not needed anywhere else.
[0.5.46] - 2025-01-07
- Added
AZURE_GPT_35_TURBO_0125as new model into toolkit.
[0.5.45] - 2025-01-03
- Added
ShortTermMemoryServiceclass to handle short term memory.
[0.5.44] - 2024-12-18
- Add
event_constructortoverify_signature_and_construct_eventto allow for custom event construction.
[0.5.43] - 2024-12-13
- Add
Promptclass to handle templated prompts that can be formatted into LanguageModelSystemMessage and LanguageModelUserMessage.
[0.5.42] - 2024-12-11
- Update
LanguageModelTokenLimitswith fix avoiding floats for token
[0.5.41] - 2024-12-11
- Update
LanguageModelTokenLimitsincludes a fraction_input now to always have input/output token limits available.
[0.5.40] - 2024-12-11
- Add
other_optionstoLanguageModelService.complete,LanguageModelService.complete_async,LanguageModelService.stream_completeandLanguageModelService.stream_complete_async
[0.5.39] - 2024-12-09
- Add
contentIdstoSearch.createandSearch.create_async - Use
metadata_filterfrom event inContentService.search_content_chunksandContentService.async_search_content_chunksas default.
[0.5.38] - 2024-11-26
- Added string representation to
LanguageModelMessageandLanguageModelMessagesclass
[0.5.37] - 2024-11-26
contentparameter inChatService.modify_assistant_messageandChatService.modify_assistant_message_asyncis now optional- Added optional parameter
original_contenttoChatService.modify_assistant_messageandChatService.modify_assistant_message_async - Added optional parameter
original_contenttoChatService.create_assistant_messageandChatService.create_assistant_message_async
[0.5.36] - 2024-11-19
- Add possibility to return the response from the download file from chat request
- Add possibility to not specify a filename and use filename from response headers
[0.5.35] - 2024-11-18
- Add the possibilty to upload files without triggering ingestion by setting
skip_ingestiontoTrueinContentService.upload_content
[0.5.34] - 2024-11-15
- Add
content_id_to_translatetoEventAdditionalParameters
[0.5.33] - 2024-10-30
- Force randomizing tool_call_id. This is helpful to better identify the tool_calls.
[0.5.32] - 2024-10-30
- Extending
LanguageModelNamewith GPT-4o-2024-0806. This model is invoked usingAZURE_GPT_4o_2024_0806.
[0.5.31] - 2024-10-29
- 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 ofLanguageModelMessages.
[0.5.30] - 2024-10-28
- Correctly use
temperatureparameter inLanguageModelService.completeandLanguageModelService.complete_asyncmethods
[0.5.29] - 2024-10-28
- Allow numbers in
LanguageModelToolname
[0.5.28] - 2024-10-23
- Correctly use
temperatureparameter inLanguageModelService.stream_completeandLanguageModelService.stream_complete_asyncmethods
[0.5.27] - 2024-10-22
- Add encoder_name to to language model info
- Verify tool name for
LanguageModelToolto conform with frontent requirements. - Add
search_on_chattoContentService
[0.5.26] - 2024-10-16
- Bump
unique_sdkversion
[0.5.25] - 2024-09-26
- Add
evaluatorsfor hallucination and context relevancy evaluation
[0.5.24] - 2024-09-26
- Add
originalTextto_construct_message_modify_paramsand_construct_message_create_params. This addition makes sure that theoriginalTexton the database is populated with thetext
[0.5.23] - 2024-09-23
- Add
set_completed_atas a boolen parameter to the following functions:modify_user_message,modify_user_message_async,modify_assistant_message,modify_assistant_message_async,create_assistant_messageandcreate_assistant_message. This parameter allows thecompletedAttimestamp on the database to be updated when set to True.
[0.5.22] - 2024-09-17
- Add
LanguageModelToolMessageas additionalLanguageModelMessage
[0.5.21] - 2024-09-16
- Add
toolas new role toChatMessage, as well astool_callsandtool_call_idas additional parameters
[0.5.20] - 2024-09-16
LanguageModelServicenow supports complete_util_async that can be called without instantiating the class, currently being used in the Hallucination service and evaluation API
[0.5.19] - 2024-09-11
LanguageModelMessagenow supports content as a list of dictionary. Useful when adding image_url content along user message.
[0.5.18] - 2024-09-03
- Adds option to use
metadata_filterwith search. - Adds
user_metadata,tool_parametersandmetadata_filtertoEventPayload. - Adds
update_debug_infoandmodify_user_message(and the correspondingasyncvariants) toChatService.
[0.5.17] - 2024-08-30
- Add option to initiate
LanguageModelwith a string. - Add option to call
LanguageModelServicefunctions also with a string instead ofLanguageModelNameenum for parametermodel_name.
[0.5.16] - 2024-08-29
- Fix
ContentService.upload_contentfunction.
[0.5.15] - 2024-08-27
- Possibility to specify root directory in
ContentService.download_content
[0.5.14] - 2024-08-26
- Add AZURE_GPT_4o_MINI_2024_0718 to language model infos
[0.5.13] - 2024-08-19
- Added
itemstoLanguageModelToolParameterPropertyschema to add support for parameters with list types. - Added
returnstoLanguageModelToolschema to describe the return types of tool calls.
[0.5.12] - 2024-08-7
- added
completedAtdatetime tounique_sdk.Message.modifyandunique_sdk.Message.modify_async - added
original_textandlanguagetoEventUserMessage
[0.5.11] - 2024-08-6
- made all domain specific functions and classes directly importable from
unique_toolkit.[DOMAIN_NAME] - renamed
RerankerConfigtoContentRerankerConfig - renamed
get_cosine_similaritytocalculate_cosine_similarityand moved it tounique_toolkit.embedding.utils - moved
calculate_tokensfromunique_toolkit.content.utilstounique_toolkit.embedding.utils - disabled deprecation warning in
LanguageModel - added
additional_parametersto event - removed
ChatStateand useEventinstead
[0.5.10] - 2024-08-6
- fix content schema
[0.5.9] - 2024-08-6
- added
created_atandupdated_atto content schema
[0.5.8] - 2024-08-1
RerankerConfigserialization alias added
[0.5.7] - 2024-07-31
- Replace mocked async service calls with async calls in
unique_sdk - Change async methods name from
async_*to*_async - Remove
chat_onlyandscope_idsattributes fromChatStateclass - Replace
AsyncExecutorby simpler utility functionrun_async_tasks_parallel
[0.5.6] - 2024-07-30
- Bug fix:
ContentService.search_content_chunksand it'sasyncequivalent now acceptNoneas a valid parameter value forscope_ids.
[0.5.5] - 2024-07-30
- Added parameters to
ContentService.search_content_chunksandContentService.async_search_content_chunksreranker_configto optinally rerank the search resultssearch_languageto specify a language for full-text-search
[0.5.4] - 2024-07-26
- correct ChatMessage schema
[0.5.3] - 2024-07-25
- downgrade numpy version to ^1.26.4 to be compatible with langchain libraries (require numpy<2.0)
[0.5.2] - 2024-07-25
- correct event schema
[0.5.1] - 2024-07-23
- correct documentation
[0.5.0] - 2024-07-23
Added
-
Added
unique_toolkit.appmodule with the following components:init_logging.pyfor initializing the logger.init_sdk.pyfor initializing the SDK with environment variables.schemas.pycontaining the Event schema.verification.pyfor verifying the endpoint secret and constructing the event.
-
Added
unique_toolkit.chatmodule with the following components:state.pycontaining theChatStateclass.service.pycontaining theChatServiceclass for managing chat interactions.schemas.pycontaining relevant schemas such asChatMessage.utils.pywith utility functions for chat interactions.
-
Added
unique_toolkit.contentmodule with the following components:service.pycontaining theContentServiceclass for interacting with content.schemas.pycontaining relevant schemas such asContentandContentChunk.utils.pywith utility functions for manipulating content objects.
-
Added
unique_toolkit.embeddingmodule with the following components:service.pycontaining theEmbeddingServiceclass for working with embeddings.schemas.pycontaining relevant schemas such asEmbeddings.
-
Added
unique_toolkit.language_modelmodule with the following components:infos.pycontaining information on language models deployed on the Unique platform.service.pycontaining theLanguageModelServiceclass for interacting with language models.schemas.pycontaining relevant schemas such asLanguageModelResponse.utils.pywith utility functions for parsing language model output.
[0.0.2] - 2024-07-10
- Initial release of
unique_toolkit.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unique_toolkit-1.28.3.tar.gz.
File metadata
- Download URL: unique_toolkit-1.28.3.tar.gz
- Upload date:
- Size: 254.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6c435ce5b6849ec308022a77dcd98f1490f4864ab44f1f64513e58d8eb8bdc4
|
|
| MD5 |
1c32b807e6d27c842967bf0258ae7bd8
|
|
| BLAKE2b-256 |
23593ac531f735ab1eedc458eb81902baaf49e4c740002e11ecd16421427908e
|
File details
Details for the file unique_toolkit-1.28.3-py3-none-any.whl.
File metadata
- Download URL: unique_toolkit-1.28.3-py3-none-any.whl
- Upload date:
- Size: 312.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
670b3cc4fedd133488ea96fd638d90ba5ee656168c0140c1960ad8c2e3bfc4e8
|
|
| MD5 |
322a75e62044cd047888780bff1d2dff
|
|
| BLAKE2b-256 |
1f793554cb40cc9838d0bd5dbae28c97b26e171e5cad65c259abdfe3702b5ac8
|