finic-ai / doctran

MIT License
479 stars 42 forks source link

FEATURE: adding ability to add system messages #21

Open maishathasin opened 4 months ago

maishathasin commented 4 months ago

The problem

Currently there is no way of easily adding system messages other than changing the transformers.py

What the PR does

This PR creates a simple optional way of adding a system message by adding an optional system field in the Document class, and can be used like this document.parse(content=content, system=system) using the parse function.

Testing

The feature has been tested by giving a system message and evaluating the outputs.