instructor
instructor copied to clipboard
Expose the internal system prompts so they can be configured if the defaults aren't sufficient
Is your feature request related to a problem? Please describe. Internal system prompts are currently hard coded into the library. This is fine, but we should also expose these prompts as variables that the user can change if need be
Describe the solution you'd like
client = instructor.patch(OpenAI())
client.retry_prompt = "my custom retry prompt"
this is interesting cause right now patch only updates the create call, so the create call does not have self
to access the client
.
could do some something like
client = instructor.patch(OpenAI(), config=...)
and having some additional stuff in the config?
Another approach could be to supply a default Jinja2 template for the prompts, which could be forked and modified by the user.
Hello, is a solution to this facilitated by the new 1.x approach to instantiating the client? Being able to customise system prompts would be especially helpful when integrating with, e.g., ollama.
Been too busy with work on configuration just yet.