Commit graph

195 commits

Author SHA1 Message Date
59d9e68119
Show code blocks at full height
...well, for any reasonable height anyway.

When scrollbars appear the refreshing output tends to get janky, so
just allow the code region (called a fence in markdown, apparently)
to be up to 9999 lines tall.
2023-12-12 21:38:23 -06:00
86059a5d85
re-work backend parameters again to work on 3.9 and 3.11 2023-12-12 17:01:41 -06:00
877246ac28
document chap tui a bit more in the README 2023-12-12 16:08:54 -06:00
a42a349bb7
fix typing of main function 2023-12-12 16:03:08 -06:00
322ae8b8e2
switch to pyperclip for yanking chat text 2023-12-12 16:02:48 -06:00
8106368ca2
tui: add a flag to replace the system message in an existing session 2023-12-09 09:56:30 -06:00
dfb49bc12e
fix image in README 2023-12-07 20:23:22 -06:00
e97a99047e
enable ruff rules in preview mode 2023-12-02 15:50:01 -06:00
4f4c6522b3
drop no longer needed pylint disables 2023-12-02 15:49:47 -06:00
d91425ec6f
remove unneeded pylint disable 2023-12-02 15:45:48 -06:00
5c639ab141
pre-commit autoupdate 2023-12-02 15:37:07 -06:00
f2f7c78e7e
replace black, isort, pylint with ruff
this is faster enough that it's a huge qol win
2023-12-02 15:36:22 -06:00
c16e091a38
OK we're doing 3.9 I guess 2023-12-01 08:42:35 -06:00
ffd152a533
Make alt+enter work (on supported terminals like xfce4-terminal) 2023-12-01 08:41:07 -06:00
4a36cce0e0
Fix parsing of bool-type backend options
this made it necessary to plumb 'ctx' through some additional
places, all to make it easy to call BoolParamType().convert().
2023-12-01 08:38:07 -06:00
5daf7e7d2a
Make it work on 3.9 again
turns out I have some systems where I care about that :)
2023-12-01 08:38:06 -06:00
14f284defc
reorganize to fix errors seen in mypy 2023-11-16 09:43:14 -06:00
ae8c13f7d2
fix streaming output from lorem 2023-11-16 09:29:34 -06:00
89de218708
Switch chap tui to a multiline text field
due to technical limitations in textual there's no way to handle
ctrl-enter (terminal emulator limitation) or alt-enter (textual limitation)
so the submit key becomes F9.

it'd be nice someday to switch between single-line and multiline entry but
not right now.
2023-11-16 09:29:24 -06:00
14e0feaf4c
give a var a better name 2023-11-15 15:57:50 -06:00
59c0ae7ce9
Merge pull request #29 from jepler/metadata
improve project metadata (h/t pyroma)
2023-11-10 16:31:50 -06:00
1aabcf6f0d
improve project metadata (h/t pyroma) 2023-11-10 12:13:35 -06:00
b548797858
Merge pull request #28 from jepler/document-mypy
Document how to run mypy; move mypy settings to pyproject.toml
2023-11-10 12:09:50 -06:00
e966d62a1b
mypy 1.7.0 has a serious bug, avoid it 2023-11-10 12:04:51 -06:00
4a35193fa3
simplify Makefile too 2023-11-10 09:10:47 -06:00
52cb9ab2df
Document how to run mypy; move mypy settings to pyproject.toml 2023-11-10 08:14:24 -06:00
03e0adfbb1
Merge pull request #25 from jepler/gpt-4-turbo
Add gpt-4-1106-preview (gpt-4-turbo) to model list
2023-11-09 11:51:24 -06:00
08b221d760
Re-jigger EncodingMeta to be less fragile
It seems that only gpt-3.5-turbo-0301 is the oddity, mis-counting is
only a few tokens here and there, and tiktoken.encoding_for_model
works for evergreen names like "gpt-3.5-turbo".
2023-11-09 11:45:35 -06:00
c8d2ffbc15
Fix "| None" types in backend options 2023-11-09 11:25:39 -06:00
628994c229
Add py.typed 2023-11-09 11:21:45 -06:00
18623ad3eb
Fix running mypy after __version__.py is created 2023-11-09 11:21:38 -06:00
1e856e4547
Add gpt-4-1106-preview (gpt-4-turbo) to model list 2023-11-09 10:35:07 -06:00
4454071e87
Merge pull request #27 from jepler/refactor-type-etc
Refactor and add typing information
2023-11-09 10:34:47 -06:00
a48015e0db
use same while-loop condition as below 2023-11-09 10:09:36 -06:00
b82ea41430
remove dead assignment 2023-11-09 10:08:22 -06:00
1537d1145c
use docstrings instead of ellipsis for method stub 2023-11-09 10:07:15 -06:00
5f91717900
bump python version in workflows too 2023-11-09 09:56:52 -06:00
edfb21e41c
avoid typing error during ci 2023-11-09 09:55:29 -06:00
0c84e1f218
bump python version 2023-11-09 09:55:12 -06:00
fc69800594
Fully type annotate mypy
with two (commented) exceptions
2023-11-09 09:50:04 -06:00
eac422ff17
Don't reassign name "Markdown" 2023-11-09 09:50:03 -06:00
8c0f20e38a
Fix type hint 2023-11-09 09:50:03 -06:00
396ef3164b
Reorganize session, ditching dataclasses_json
this needs more testing (or more typing) and it breaks the plugins
I just released. oof.
2023-11-09 09:50:03 -06:00
29cc2edfb3
Merge pull request #26 from jepler/plugins-ux-etc
Added (as separate github repos) example plugins to prove the concept
2023-11-08 17:38:41 -06:00
e0786a0fbf
Translate dashes to underscores in API names
so that `--backend openai-chatgpt` works like `--backend openai_chatgpt`
2023-11-08 17:31:58 -06:00
715dc2b57a
Plugins! 2023-11-08 17:31:08 -06:00
f29358379d
Merge pull request #22 from jepler/add-coc-contributing
Add contributing and code-of-conduct documents
2023-10-09 08:46:08 +01:00
4c10048708
error found in proofreading 2023-10-09 08:43:31 +01:00
fb5168a6fa
fix link markdown 2023-10-09 08:42:21 +01:00
d1277c9d8b
link to new documents 2023-10-09 08:40:10 +01:00