Skip to content

v0.4.2

Choose a tag to compare

@SStas SStas released this 30 Mar 06:25
· 14 commits to main since this release

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

  • ModelSpec type aliasUnion[str, EngineConnector], importable from top-level avp
  • EngineConnector top-level exportfrom avp import EngineConnector now works
  • can_think validation in generate() — clear error with actionable message when a connector without think support is passed with steps > 0
  • transformers 5.4 compatibility — removed explicit cache_position kwarg (now managed internally by generate())
  • 19 new tests for connector parameter handling and backward compatibility

Changed

  • generate() reduced from 17 to 15 parameters
  • source_model= also accepts Union[str, EngineConnector] for cross-model projection
  • Framework integrations (ChatAVP, AVPLLM, AVPChatCompletionClient) resolve connectors internally

Full Changelog

v0.4.1...v0.4.2