forked from AbanteAI/archive-old-cli-mentat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Config Command * You can set or get a config with `/config` * I realized conversation was holding onto its own copy of model preventing it being changed. It now gets it from the config as necessary. (Perhaps we should go all the way and have the llm_api be responsible for choosing the model? I could imagine wanting to keep track of which model generated a message for the future though). * I updated the use_embeddings comment so users know they don't need to restart mentat. * Note attr is taking care of type checking so we can't end up with illegal config properties after a call to `/config` * Validators added We check: * Temperature in [0,1] * Format exists * contexts are positive If type or value errors are encountered while changing a setting this is reported gracefully to the user if in config, by command or by flag.
- Loading branch information
1 parent
c2bf733
commit 6f27ae6
Showing
10 changed files
with
140 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from mentat.parsers.block_parser import BlockParser | ||
from mentat.parsers.parser import Parser | ||
from mentat.parsers.replacement_parser import ReplacementParser | ||
from mentat.parsers.split_diff_parser import SplitDiffParser | ||
from mentat.parsers.unified_diff_parser import UnifiedDiffParser | ||
|
||
parser_map: dict[str, Parser] = { | ||
"block": BlockParser(), | ||
"replacement": ReplacementParser(), | ||
"split-diff": SplitDiffParser(), | ||
"unified-diff": UnifiedDiffParser(), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.