Skip to main content

No project description provided

Project description

Unique Toolkit

This package provides high-level 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.chat
  • unique_toolkit.content
  • unique_toolkit.embedding
  • unique_toolkit.language_model
  • unique_toolkit.short_term_memory

Each domain comprises a set of schemas (in schemas.py) that are used in functions (in functions.py) which encapsulate the basic functionalities to interact with the platform. The above domains represent the internal structure of the Unique platform.

For the developers we expose interfaces via services classes that correspond directly to a frontend or an entity the user interacts with.

The following services are currently available:

Service Responsibility
ChatService All interactions with the chat interface
KnowledgeBaseService All interaction with the knowledgebase

The services can be directly imported as

from unique_toolkit import ChatService, KnowledgeBaseService

In addition, the unique_toolkit.app module provides functions to initialize apps and dev utilities to interact with the Unique platform.

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.py can be used to initalize the logger either with unique dictConfig or an any other dictConfig.
  • init_sdk.py can be used to initialize the sdk using the correct env variables and retrieving the endpoint secret.
  • schemas.py contains the Event schema which can be used to parse and validate the unique.chat.external-module.chosen event.
  • verification.py can be used to verify the endpoint secret and construct the event.

Chat

The unique_toolkit.chat module encompasses all chat related functionality.

  • functions.py comprises the functions to manage and load the chat history and interact with the chat ui, e.g., creating a new assistant message.
  • schemas.py comprises all relevant schemas, e.g., ChatMessage, used in the ChatService.
  • utils.py comprises 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.py comprises the functions to manage and load the chat history and interact with the chat ui, e.g., creating a new assistant message.
  • schemas.py comprises all relevant schemas, e.g., Content and ContentChunk, used in the ContentService.
  • utils.py comprise utility functions to manipulate Content and ContentChunk objects, e.g., sort_content_chunks and merge_content_chunks.

Embedding (To be Deprecated)

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.py comprises the functions to embed text and calculate the similarity between two texts.
  • service.py encompasses the EmbeddingService and provides an interface to interact with the embeddings, e.g., embed text and calculate the similarity between two texts.
  • schemas.py comprises 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.py comprises 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.py comprises the functions to complete and stream complete to chat.
  • schemas.py comprises all relevant schemas, e.g., LanguageModelResponse, used in the LanguageModelService.
  • utils.py comprises 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.py comprises the functions to manage and load the chat history and interact with the chat ui, e.g., creating a new assistant message.
  • schemas.py comprises all relevant schemas, e.g., ShortTermMemory, used in the ShortTermMemoryService.

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

unique_toolkit-2026.18.0.tar.gz (4.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

unique_toolkit-2026.18.0-py3-none-any.whl (4.6 MB view details)

Uploaded Python 3

File details

Details for the file unique_toolkit-2026.18.0.tar.gz.

File metadata

  • Download URL: unique_toolkit-2026.18.0.tar.gz
  • Upload date:
  • Size: 4.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for unique_toolkit-2026.18.0.tar.gz
Algorithm Hash digest
SHA256 8dde3dccb852beb6eed7f012f17b87684e19a151b22ca7df48986dfa2a8f9789
MD5 4e7fea6a3d95b217753555686b6b583d
BLAKE2b-256 2534e0be68508ac5757ae3e3ca852abde197485b6bd31d74c7ce2a2ade42acd9

See more details on using hashes here.

File details

Details for the file unique_toolkit-2026.18.0-py3-none-any.whl.

File metadata

  • Download URL: unique_toolkit-2026.18.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for unique_toolkit-2026.18.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c33e800f148b6e8ed4eba1235eb77925f89e6b8e1a275b15fcf3323e2e14559b
MD5 3eabc0330f3c955c7168adb179be375a
BLAKE2b-256 a992d877ae414242bb8fca7bd5b1219391b507aa3ca40453630ff08bc2f78c0b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page