Python extract method recreates Needle
I'm trying to do bulk extractions using the python module. However, I'm seeing the implementation of extract create a new Needle and autoclose the needle instance on each call to an already constructed Needle instance.
Switching to constructing the Needle instance with my pydantic model as a tool and running complete followed by reset, nearly halves the response time of running my batch.
I get wanting an easy acessor for extract but is there a way to update the instance extract method to reuse an already constructed instance?
Hello @Zambonilli , thank you for reporting this. extract now reuses its agent between calls, and the fix is out in cactus-compute 4.2.3. We've moved everything to the cactus-compute package, and we strongly encourage you to update to it, since that's where all new features, patches and updates go.
pip install -U cactus-compute