Releases: pollinations/search.elixpo
Releases · pollinations/search.elixpo
lix-open-cache v2.1.6
lix-open-cache v2.1.6
Standalone multi-layer Redis caching + Huffman disk archival for conversational AI.
Install
pip install lix-open-cache==2.1.6Quick Start
from lix_open_cache import CacheConfig, CacheCoordinator
config = CacheConfig(redis_host="localhost", redis_port=6379)
cache = CacheCoordinator(session_id="user-abc", config=config)
# Store & retrieve conversation context
cache.add_message_to_context("user", "What's the weather in Tokyo?")
cache.add_message_to_context("assistant", "22°C and sunny.")
history = cache.get_context_messages()
# Semantic cache — skip LLM on similar queries
import numpy as np
embedding = np.random.rand(384).astype(np.float32)
cached = cache.get_semantic_response("https://weather.com", embedding)Three Cache Layers
| Layer | Purpose | Backend | TTL |
|---|---|---|---|
| Session Context Window | Rolling 20-message window + disk overflow | Redis DB 2 + .huff files |
24h |
| Semantic Query Cache | Deduplicate similar queries (cosine ≥ 0.90) | Redis DB 0 | 5 min |
| URL Embedding Cache | Cache embedding vectors per URL | Redis DB 1 | 24h |
Key Features
- Two-tier hybrid storage — Redis hot window + Huffman-compressed disk cold archive
- LRU eviction daemon — auto-migrates idle sessions to disk, re-hydrates on return
- smart_context() — recent messages + semantically relevant history from disk
- Pure Python Huffman codec — ~54% compression, zero native dependencies
- CacheConfig dataclass — all tunables in one place, 12-factor env var support
- Connection pooling — shared Redis pools keyed by (host, port, db)
Dependencies
Only 3: redis, numpy, loguru
Links
lix-open-search v2.1.1
lix-open-search v2.1.1
Python client SDK for lixSearch — multi-tool AI search with web, video, image, and deep research.
Install
pip install lix-open-search==2.1.1Quick Start
from lix_open_search import LixSearch
lix = LixSearch("http://localhost:9002")
# One-shot search
result = lix.search("quantum computing breakthroughs 2026")
print(result.content)
# Streaming
for chunk in lix.search_stream("latest AI papers"):
print(chunk.content, end="", flush=True)
# Multi-turn conversation
result = lix.chat([
{"role": "user", "content": "Compare Tesla and BYD sales"}
], session_id="my-session")
# Multimodal (text + image)
result = lix.search("What is this?", images=["https://example.com/photo.jpg"])
# Raw URLs without LLM
urls = lix.surf("best Python frameworks", limit=10)Async
from lix_open_search import AsyncLixSearch
async with AsyncLixSearch("http://localhost:9002") as lix:
result = await lix.search("SpaceX updates")
async for chunk in lix.search_stream("AI papers"):
print(chunk.content, end="", flush=True)Features
- Sync + Async clients (
LixSearch/AsyncLixSearch) - Streaming with parsed
StreamChunkobjects - Multi-turn sessions with server-side memory
- Multimodal — text + up to 3 images
- Surf — raw URL/image search without LLM synthesis
- OpenAI-compatible — also works with the standard OpenAI Python client
- Single dependency — just
httpx
Self-Host with Docker
docker pull elixpo/lixsearch
docker compose -f package/lix_open_search_pkg/docker-compose.yml up -d