Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add env var to disable image parsing #146

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

msabramo
Copy link
Contributor

Added a PROMPTY_CHAT_PARSER_DISABLE_IMAGE_PARSING=true environment variable to disable image parsing in the chat parser.

In my use case, I am using Prompty to send a prompt to the LLM that contains Markdown that should be converted to a different format. I do not need Prompty to parse the images and try to send them to the LLM. In fact, this is inconvenient because I don't want to have to copy the images just so Prompty can read them.

An environment variable seems kind of janky perhaps, but it's the best solution I could come up with that doesn't require a lot of changes, because there's a fairly deep call stack so in order to pass a parameter, it would require modifying a lot of code. I'm open to other ideas though.

Added a `PROMPTY_CHAT_PARSER_DISABLE_IMAGE_PARSING=true` environment variable to
disable image parsing in the chat parser.

In my use case, I am using Prompty to send a prompt to the LLM that contains Markdown that
should be converted to a different format. I do not need Prompty to parse the
images and try to send them to the LLM. In fact, this is inconvenient because I don't
want to have to copy the images just so Prompty can read them.

An environment variable seems kind of janky perhaps, but it's the best solution
I could come up with that doesn't require a lot of changes, because there's a
fairly deep call stack so in order to pass a parameter, it would require
modifying a lot of code. I'm open to other ideas though.
Copy link
Member

@sethjuarez sethjuarez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good idea - let me think about how to do this in a more declarative way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants