Skip to content

Conversation

leerobertdyer
Copy link

This PR updates the openai script to add a simple background and spacing for the chat's response.

In regards to this issue

It
-Pipes the response through a sed command that replaces the "^" begin line character with "\t" a tab character
-Adds a simple background and text color to the response to make it stand out from remaining terminal text

Screen Shot 2024-08-09 at 10 07 49 PM

NOTE
Is there a more convenient way to store reused variables like GRAY and RESET somewhere globally so we might not have to re-code them in different scripts? Or is it better to have them function in isolation?

Screen Shot 2024-08-09 at 10 08 05 PM

@matthewlarkin
Copy link
Member

Very interesting approach!

I mentioned in the the issue my preference for treating the output as clean plaintext so we can easily write pipelines that don't contain unexpected padding, etc. I think I'll stick to that for now.

But let's hold on to this, as it might come in handy for a --pretty flag or some other approach.

Thanks for considering this Lee!

@matthewlarkin matthewlarkin added the enhancement New feature or request label Aug 10, 2024
@leerobertdyer
Copy link
Author

Awesome yes I see how the prettier version could cause issues downstream with multiple pipes. Making it a flag is a great idea!

Is there a flag for this already or is this something I could potentially work on implementing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants