Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40663511b4 | ||
|
|
8f008c7fd2 |
+3
-2
@@ -21,7 +21,8 @@ SEARXNG_TIMEOUT=30
|
|||||||
# Redis Configuration
|
# Redis Configuration
|
||||||
REDIS_HOST=redis-shared
|
REDIS_HOST=redis-shared
|
||||||
REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
REDIS_DB=1
|
REDIS_MEMORY_DB=1
|
||||||
|
REDIS_BENCHMARK_DB=6
|
||||||
REDIS_TIMEOUT=5
|
REDIS_TIMEOUT=5
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
@@ -30,4 +31,4 @@ ENABLE_BENCHMARKS=true
|
|||||||
# Note: Log format is auto-selected based on ENVIRONMENT (console for dev, json for production)
|
# Note: Log format is auto-selected based on ENVIRONMENT (console for dev, json for production)
|
||||||
|
|
||||||
# CORS (comma-separated list)
|
# CORS (comma-separated list)
|
||||||
CORS_ORIGINS=*
|
CORS_ORIGINS=["*"]
|
||||||
|
|||||||
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [1.3.0] - 2025-12-14
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Memory**: Update Qdrant client to use `query_points` API (qdrant-client >= 1.10)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **Config**: Rename `REDIS_DB` to `REDIS_BENCHMARK_DB` for clarity
|
||||||
|
- **Config**: Update Redis defaults to match stack allocation (benchmark=6, memory=1)
|
||||||
|
|
||||||
## [1.2.5] - 2025-12-14
|
## [1.2.5] - 2025-12-14
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -1,72 +0,0 @@
|
|||||||
# Dependency Slimming: pydantic-ai → pydantic-ai-slim
|
|
||||||
|
|
||||||
**Date**: 2025-12-13
|
|
||||||
**Version**: Post v1.2.0
|
|
||||||
|
|
||||||
## Change
|
|
||||||
|
|
||||||
Switched from `pydantic-ai` to `pydantic-ai-slim[openai]` to reduce container image size.
|
|
||||||
|
|
||||||
### Before
|
|
||||||
```
|
|
||||||
pydantic-ai>=1.27,<1.28
|
|
||||||
```
|
|
||||||
|
|
||||||
This installs SDKs for ALL LLM providers:
|
|
||||||
- anthropic
|
|
||||||
- boto3 + botocore (AWS Bedrock)
|
|
||||||
- cohere
|
|
||||||
- google-genai + google-auth
|
|
||||||
- groq
|
|
||||||
- huggingface-hub
|
|
||||||
|
|
||||||
Total packages: ~158
|
|
||||||
|
|
||||||
### After
|
|
||||||
```
|
|
||||||
pydantic-ai-slim[openai]>=1.27,<1.28
|
|
||||||
```
|
|
||||||
|
|
||||||
Only installs the OpenAI-compatible SDK. Ollama works through this interface.
|
|
||||||
|
|
||||||
Expected packages: ~80-90 (significant reduction)
|
|
||||||
|
|
||||||
## Why This Works
|
|
||||||
|
|
||||||
Tatlock uses Ollama exclusively, which implements the OpenAI-compatible API. The code uses:
|
|
||||||
```python
|
|
||||||
from pydantic_ai.models.openai import OpenAIChatModel
|
|
||||||
from pydantic_ai.providers.ollama import OllamaProvider
|
|
||||||
|
|
||||||
model = OpenAIChatModel(
|
|
||||||
model_name=config.OLLAMA_DEFAULT_MODEL,
|
|
||||||
provider=OllamaProvider(base_url=f"{config.OLLAMA_HOST}/v1")
|
|
||||||
)
|
|
||||||
```
|
|
||||||
|
|
||||||
This pattern only requires the `openai` extra, not the full pydantic-ai package.
|
|
||||||
|
|
||||||
## Rollback Instructions
|
|
||||||
|
|
||||||
If this change breaks things:
|
|
||||||
|
|
||||||
1. Revert requirements.txt:
|
|
||||||
```diff
|
|
||||||
- pydantic-ai-slim[openai]>=1.27,<1.28
|
|
||||||
+ pydantic-ai>=1.27,<1.28
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Reinstall dependencies:
|
|
||||||
```bash
|
|
||||||
pip install -r requirements.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Delete this file once confirmed stable.
|
|
||||||
|
|
||||||
## Testing Checklist
|
|
||||||
|
|
||||||
- [ ] Unit tests pass
|
|
||||||
- [ ] Integration tests pass (with Ollama running)
|
|
||||||
- [ ] Wakeup script e2e test passes
|
|
||||||
- [ ] Container builds successfully
|
|
||||||
- [ ] Container runs correctly
|
|
||||||
@@ -432,7 +432,7 @@ For LLM agent development guidelines and architectural decisions, see [AGENTS.md
|
|||||||
|
|
||||||
## Version
|
## Version
|
||||||
|
|
||||||
Current version: **1.2.5** - Dependency fix
|
Current version: **1.3.0** - Memory system fixes and Redis config cleanup
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "tatlock"
|
name = "tatlock"
|
||||||
version = "1.2.5"
|
version = "1.3.0"
|
||||||
description = "OpenAI-compatible API with Ollama backend"
|
description = "OpenAI-compatible API with Ollama backend"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
dependencies = []
|
dependencies = []
|
||||||
|
|||||||
+5
-5
@@ -101,9 +101,9 @@ class Config(BaseSettings):
|
|||||||
default=6379,
|
default=6379,
|
||||||
description="Redis server port"
|
description="Redis server port"
|
||||||
)
|
)
|
||||||
REDIS_DB: int = Field(
|
REDIS_BENCHMARK_DB: int = Field(
|
||||||
default=1,
|
default=6,
|
||||||
description="Redis database number"
|
description="Redis database number for benchmarks"
|
||||||
)
|
)
|
||||||
REDIS_TIMEOUT: int = Field(
|
REDIS_TIMEOUT: int = Field(
|
||||||
default=5,
|
default=5,
|
||||||
@@ -146,7 +146,7 @@ class Config(BaseSettings):
|
|||||||
|
|
||||||
# Redis Memory Database (separate from benchmarks)
|
# Redis Memory Database (separate from benchmarks)
|
||||||
REDIS_MEMORY_DB: int = Field(
|
REDIS_MEMORY_DB: int = Field(
|
||||||
default=2,
|
default=1,
|
||||||
description="Redis database number for memory cache"
|
description="Redis database number for memory cache"
|
||||||
)
|
)
|
||||||
REDIS_MEMORY_TTL_HOURS: int = Field(
|
REDIS_MEMORY_TTL_HOURS: int = Field(
|
||||||
@@ -170,7 +170,7 @@ class Config(BaseSettings):
|
|||||||
@property
|
@property
|
||||||
def redis_url(self) -> str:
|
def redis_url(self) -> str:
|
||||||
"""Construct Redis connection URL for benchmarks."""
|
"""Construct Redis connection URL for benchmarks."""
|
||||||
return f"redis://{self.REDIS_HOST}:{self.REDIS_PORT}/{self.REDIS_DB}"
|
return f"redis://{self.REDIS_HOST}:{self.REDIS_PORT}/{self.REDIS_BENCHMARK_DB}"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def redis_memory_url(self) -> str:
|
def redis_memory_url(self) -> str:
|
||||||
|
|||||||
+4
-4
@@ -232,14 +232,14 @@ class MemoryQdrantClient:
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
# Search
|
# Search using new Query API (qdrant-client >= 1.10)
|
||||||
results = self._client.search(
|
results = self._client.query_points(
|
||||||
collection_name=collection_name,
|
collection_name=collection_name,
|
||||||
query_vector=query_vector,
|
query=query_vector,
|
||||||
limit=limit,
|
limit=limit,
|
||||||
query_filter=query_filter,
|
query_filter=query_filter,
|
||||||
score_threshold=score_threshold,
|
score_threshold=score_threshold,
|
||||||
)
|
).points
|
||||||
|
|
||||||
# Format results
|
# Format results
|
||||||
memories = []
|
memories = []
|
||||||
|
|||||||
Reference in New Issue
Block a user