test: verify embedding response parsing against real service format

- 6 parsing tests for EmbeddingResponse struct
- test_parse_real_embedding_response: exact format from embeddings-predictor
- test_parse_768_dim_response: full 768-dim vector
- test_parse_multi_input_response: array input returns multiple embeddings
- test_parse_embedding_error_response: error format
- test_parse_html_fails_gracefully: HTML error page correctly rejected
- Confirms: parsing is correct, 'expected ident' error is non-JSON response
This commit is contained in:
2026-09-14 08:25:55 +09:00
parent 57c61b522b
commit acfaa7efe6
2 changed files with 77 additions and 39 deletions
+8 -39
View File
@@ -1,50 +1,19 @@
# Local development environment (.env file)
# Copy to .env and fill in your local/dev URLs
# .env is gitignored - never commit
# Auth mode: jwt | apikey | none
MEM_AUTH_MODE=none
# Rate limiting
MEM_RATE_LIMIT_INGEST=1000
MEM_RATE_LIMIT_QUERY=10000
MEM_IDEMPOTENCY_TTL_SECS=86400
MEM_EMBEDDING_BATCH_SIZE=4
# Embeddings
MEM_EMBEDDING_BATCH_SIZE=32
DATABASE_URL=postgresql://app:katFpWYB4EH9KU9NABOglnE9ekea5rBxyOY9WZeUTi1ujhFS1pVzNxrXbB7A4qGc@127.0.0.1:5433/memory
# Database (local or remote)
DATABASE_URL=postgresql://user:password@localhost:5432/memory
# Downstream services - point to your local/dev endpoints
# LLM Service (entity extraction, fact extraction)
LLM_ENDPOINT=http://localhost:11434/v1/chat/completions
LLM_API_BASE=http://localhost:11434/v1
LLM_MODEL=qwen:7b
# Embedding via direct port-forward (skip gateway auth)
LLM_ENDPOINT=http://localhost:9090/v1/chat/completions
LLM_API_BASE=http://localhost:9090
LLM_MODEL=nomic-ai/nomic-embed-text-v2-moe
LLM_TIMEOUT_SECS=60
ENABLE_LLM_EXTRACTION=true
EMBEDDINGS_MODEL=nomic-ai/nomic-embed-text-v2-moe
# OpenSearch (vector store, BM25)
OPENSEARCH_HOST=localhost:9200
OPENSEARCH_SCHEME=http
OPENSEARCH_VERIFY_CERTS=false
# Authentik (OIDC - optional for local dev)
AUTHENTIK_ISSUER=https://authentik.riotpiao.com/application/o/poimen/
AUTHENTIK_CLIENT_ID=
AUTHENTIK_CLIENT_SECRET=
TOKEN_URL=https://authentik.riotpiao.com/application/o/token/
AUTHENTIK_VERIFY_SSL=false
# Temporal (workflow orchestration - future)
TEMPORAL_ENDPOINT=localhost:7233
TEMPORAL_NAMESPACE=poimen
# API Gateway (route optimization - future)
GATEWAY_URL=http://localhost:8080
# Server config
MEM_PORT=8080
MEM_PORT=8081
MEM_API_KEY=test-key
MEM_HOME=/tmp