QueryTranslator now supports two backends chosen at startup: - CF_ORCH_URL set: allocate via POST /api/inference/task (product=snipe, task=query_translation), call the allocated cf-text service, release the slot in a finally block to guarantee the VRAM lease is freed. - CF_ORCH_URL absent: existing LLMRouter path unchanged (ollama/vllm/api keys). Also moves httpx from dev-only to main dependencies (already used by mcp/server.py).
57 lines
1.3 KiB
TOML
57 lines
1.3 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=68"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "snipe"
|
|
version = "0.3.0"
|
|
description = "Auction listing monitor and trust scorer"
|
|
requires-python = ">=3.11"
|
|
dependencies = [
|
|
"circuitforge-core>=0.8.0",
|
|
"streamlit>=1.32",
|
|
"requests>=2.31",
|
|
"imagehash>=4.3",
|
|
"Pillow>=10.0",
|
|
"python-dotenv>=1.0",
|
|
"beautifulsoup4>=4.12",
|
|
"lxml>=5.0",
|
|
"fastapi>=0.111",
|
|
"python-multipart>=0.0.9",
|
|
"uvicorn[standard]>=0.29",
|
|
"playwright>=1.44",
|
|
"playwright-stealth>=1.0",
|
|
"cryptography>=42.0",
|
|
"PyJWT>=2.8",
|
|
"httpx>=0.27",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest>=8.0",
|
|
"pytest-cov>=5.0",
|
|
"ruff>=0.4",
|
|
]
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["."]
|
|
include = ["app*", "api*"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
markers = [
|
|
"browser: tests that require a headed Chromium browser (Xvfb + playwright install required)",
|
|
]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py311"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "W", "I"]
|
|
ignore = [
|
|
"E501", # line length — handled by formatter
|
|
"E402", # module-import-not-at-top — intentional for conditional/lazy imports
|
|
"E701", # multiple-statements-colon — `if x: return y` is accepted style
|
|
"E741", # ambiguous variable name — l/q used intentionally for listing/query
|
|
]
|