v0.4.2
What's New
model= accepts Union[str, EngineConnector] — The Easy API (think(), generate()) now accepts either a model name string or a pre-built EngineConnector instance. All backends (Ollama, llama.cpp, vLLM, HuggingFace) are now first-class in the Easy API.
import avp
from avp import OllamaConnector
# With any connector
conn = OllamaConnector.from_ollama("qwen2.5:7b")
context = avp.think("Analyze this", model=conn)
answer = avp.generate("Solve it", model=conn, context=context)
# With a model name (still works, auto-creates HuggingFace backend)
context = avp.think("Analyze this", model="Qwen/Qwen2.5-7B-Instruct")Added
ModelSpectype alias —Union[str, EngineConnector], importable from top-levelavpEngineConnectortop-level export —from avp import EngineConnectornow workscan_thinkvalidation ingenerate()— clear error with actionable message when a connector without think support is passed withsteps > 0- transformers 5.4 compatibility — removed explicit
cache_positionkwarg (now managed internally bygenerate()) - 19 new tests for connector parameter handling and backward compatibility
Changed
generate()reduced from 17 to 15 parameterssource_model=also acceptsUnion[str, EngineConnector]for cross-model projection- Framework integrations (ChatAVP, AVPLLM, AVPChatCompletionClient) resolve connectors internally