Comments (5)
I think this is fixable by adding a paramer to pass a theme to the underlying markdown parser (rich). Will take a look in the coming days
from chatblade.
thanks a ton!
from chatblade.
Hi @ldelossa
Latest version v0.3.0 from main or via pip has the change. homebrew is pending.
You can set the theme via --theme or as an env variable CHATBLADE_THEME. The available styles are here: https://pygments.org/styles/
Do note that you will only get full syntax highlighting like in the example if chatgpt provides a type hint for the language being used. You can check this with -r to get the raw response.
In this case you can see that it indicates it is python at the start of the code block. GPT-4 is really good at this, but gpt 3.5 often doesn't do this. You can create a prompt that hints it to do this though if you like which works quite well for me.
from chatblade.
Theme functionality works for code snippets, but having an issue with readability of inline variable names that have black background when using a "high contrast" variation of default Konsole "Black on White" theme which ends up using #2a8080 hex colour for the inline variable text that is too dark to show up.
High contrast variation (better for outdoors):
Maybe fixable by applying the same code snippet theme to inline variable names, or if background wasn't getting darker than the text.
As a temporary fix, overriding this terminal theme color 7 "intense" variation manually with lighter color.
Using package chatblade 0.3.1, installed using Python 3.11.2 with pipx.
from chatblade.
Also, noting that when using streaming mode with -s
it seems to use different theme during streaming than what is used after completing full request. As this initial theme looks totally fine as is, could it be used after completion too? Does it have use pygments theme that could be used with --theme
flag?
untitled.mp4
from chatblade.
Related Issues (20)
- Apostrophe's aren't escaped in input HOT 2
- Knowledge cut off September 2021 for GPT4 HOT 2
- feature request: support Creates an image given a prompt
- Add Arch to README.md#install
- API key problems problems (insufficient_quota) HOT 4
- -c 4 indeed does not work HOT 1
- UnicodeEncodeError in NVIM when Running ':! chatblade' Command HOT 1
- looks like -c 4 is not working. HOT 1
- Is clichat a copyleft violation of chatblade? HOT 1
- Azure OpenAI support for preview version fix HOT 1
- Add build instructions using a PEP517 installer HOT 3
- Feature request: Add OPENAI_API_ENDPOINT and --openai-api-endpoint="http://address:port/v1" HOT 2
- Default temperature value
- Support streaming to pipe
- error with version flag
- ChatGPT now insists on providing any formulas as LaTeX.
- Add support for Anthropic API
- Is there a way to display the active model? HOT 2
- Bad formatting in code blocks HOT 3
- Vision API
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatblade.