💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Python agentsaiai-agentsembeddingsinformation-retrievallanguage-modellarge-language-modelsllmnlppythonragretrieval-augmented-generationsearchsearch-enginesemantic-searchsentence-embeddingstransformerstxtaivector-databasevector-search
Pass kwargs to msgpack serializer , closes #932
davidmezzettia1df111bb887
diff --git a/src/python/txtai/serialize/messagepack.py b/src/python/txtai/serialize/messagepack.pyindex 92397d54..943c9d97 100644--- a/src/python/txtai/serialize/messagepack.py+++ b/src/python/txtai/serialize/messagepack.py@@ -15,16 +15,20 @@ class MessagePack(Serialize):MessagePack serialization."""- def __init__(self, streaming=False):+ def __init__(self, streaming=False, **kwargs):# Parent constructorsuper().__init__()+ # Streaming unpackerself.streaming = streaming+ # Additional streaming unpacker keyword arguments+ self.kwargs = kwargs+def loadstream(self, stream):try:# Support both streaming and non-streaming unpacking of data- return Unpacker(stream) if self.streaming else msgpack.unpack(stream)+ return Unpacker(stream, **self.kwargs) if self.streaming else msgpack.unpack(stream)except ExtraData as e:raise SerializeError(e) from e