Commit graph

135 commits

Author SHA1 Message Date
Simon Willison
f193468f76 llm install -e/--editable option 2023-07-05 17:58:19 -07:00
Simon Willison
78c93b9e23 Model.execute() model now defaults to using self.Response 2023-07-05 16:57:10 -07:00
Simon Willison
23886e04ae Better error message display
Refs https://github.com/pydantic/pydantic/issues/6441
2023-07-05 16:36:38 -07:00
Simon Willison
bc8dad1e33 stream defaults to True on prompt() method 2023-07-04 08:14:00 -07:00
Simon Willison
49e4d688c6 Removed .stream() method in favor of .prompt(stream=False) 2023-07-04 07:50:31 -07:00
Simon Willison
3136948408 Moved things into inner classes, log_message is now defined on base Response 2023-07-03 21:25:19 -07:00
Simon Willison
de81cc9a9e Test messages logged in new format 2023-07-03 08:12:04 -07:00
Simon Willison
307af2474c Fix column order in logs 2023-07-03 07:29:58 -07:00
Simon Willison
345ad0d2dc Implemented new logs database schema 2023-07-03 07:27:47 -07:00
Simon Willison
b1c51df3f1 New LogMessage design, plus Response.json() method 2023-07-03 06:46:51 -07:00
Simon Willison
61dd8afc60 Drop the debug field from the logs, combine chunks from stream 2023-07-03 06:39:54 -07:00
Simon Willison
84b99f8baf -o/--option, implemented for OpenAI models - closes #63 2023-07-02 17:42:22 -07:00
Simon Willison
e485eadf14 just fix command 2023-07-02 17:40:45 -07:00
Simon Willison
52add96ec1 Rough initial version of new logging, to log2 table 2023-07-02 16:35:36 -07:00
Simon Willison
4a9f7f4908 Lint using Ruff, refs #78 2023-07-02 12:41:40 -07:00
Simon Willison
9eeebfa020 type stubs for PyYAML and requests, refs #77 2023-07-02 12:39:37 -07:00
Simon Willison
3ed86e403d Added mypy, plus some fixes to make it happy - refs #77 2023-07-02 12:36:22 -07:00
Simon Willison
7054c673e1 Better type hint for iter_prompt method
The Generator thing is only useful if the method uses the send mechanism

Declaring it an Iterator gives people more flexibility for how they implement it.
2023-07-02 11:18:31 -07:00
Simon Willison
9a180e65a8 llm models default command, plus refactored env variables
Closes #76
Closes #31
2023-07-01 14:01:29 -07:00
Simon Willison
f3f38c0c02 Initial experimental response.reply() method 2023-07-01 13:29:54 -07:00
Simon Willison
664fca165b .stream is now in base Response class 2023-07-01 13:29:27 -07:00
Simon Willison
183b647351 Removed PaLM 2 vertex model
It lives here now: https://github.com/simonw/llm-palm

Refs #20
2023-07-01 13:27:59 -07:00
Simon Willison
9d914bf9cc Include cogapp in pip install -e '.[test]' 2023-07-01 11:56:50 -07:00
Simon Willison
feff460496 Fix for pydantic warning, refs #74 2023-07-01 11:56:35 -07:00
Simon Willison
9ac120fae4 Upgrade to pydantic 2 using bump-pydantic, refs #74 2023-07-01 11:53:54 -07:00
Simon Willison
d26ed84939 Don't include tests/ in the package 2023-07-01 11:45:00 -07:00
Simon Willison
0f266d6657 Fix for missing package bug 2023-07-01 11:36:58 -07:00
Simon Willison
7485e0646e Use pip install -e '.[test]' 2023-07-01 11:32:38 -07:00
Simon Willison
9afc758cd7 Pass model to the Response 2023-07-01 11:29:41 -07:00
Simon Willison
6ef52172b0 Fixed timezone related test failure 2023-07-01 11:14:25 -07:00
Simon Willison
4d304d99e1 Fixed import error in llm openai models 2023-07-01 11:12:06 -07:00
Simon Willison
1b3f14fe89 Move default plugins into llm/default_plugins 2023-07-01 11:10:30 -07:00
Simon Willison
c4513068fb Disabled DB logging test for the moment 2023-07-01 11:07:10 -07:00
Simon Willison
14ce371007 Fix plugins tests to account for default plugins 2023-07-01 11:06:28 -07:00
Simon Willison
8f7450bd74 Fixed a test 2023-07-01 11:03:16 -07:00
Simon Willison
714b867e92 -s shortcut for --system, closes #69 2023-07-01 10:46:20 -07:00
Simon Willison
b9dd0a34db Ran cog for llm openai --help, refs #70 2023-07-01 10:40:11 -07:00
Simon Willison
c679d4d99e llm openai models command, closes #70 2023-07-01 10:39:24 -07:00
Simon Willison
c1938a4987 Fix for --key being beaten by env variable, closes #71 2023-07-01 10:33:49 -07:00
Simon Willison
52cedc03e0 CLI now uses new prompt/stream methods 2023-07-01 09:09:19 -07:00
Simon Willison
ffe4b6706d Model.stream() and .get_key() methods 2023-07-01 09:03:07 -07:00
Simon Willison
2911975548 First attempt at internal API docs, refs #65 2023-07-01 08:50:39 -07:00
Simon Willison
13fb4c2966 Refactor Template into templates.py 2023-07-01 08:27:45 -07:00
Simon Willison
5e056fad8a Implemented PaLM 2, to test out new plugin hook - refs #20 2023-06-26 08:25:01 -07:00
Simon Willison
5103f77c40 New mechanism for handling API keys for models 2023-06-26 08:05:48 -07:00
Simon Willison
ee748884d2 Ran cog, showing help for llm models command 2023-06-26 07:49:12 -07:00
Simon Willison
274126d9f8 WIP register_models() plugin hook, refs #53 2023-06-26 07:43:46 -07:00
Simon Willison
098d77905d main branch doesn't work with pydantic 2.0 yet 2023-07-03 13:12:33 -07:00
Simon Willison
a380967c27 Link to license on main 2023-07-03 13:11:33 -07:00
Simon Willison
72d1063621 Link to license on main 2023-07-03 13:10:30 -07:00