mirror of
https://github.com/AquaMorph/dotfiles.git
synced 2025-08-16 02:35:31 +00:00
Better debug print
This commit is contained in:
@@ -296,7 +296,8 @@ function load_model_from_list() {
|
|||||||
# Set the default coding model.
|
# Set the default coding model.
|
||||||
function set_coding_model() {
|
function set_coding_model() {
|
||||||
local models=('qwen2.5-32b-coder', 'qwen2.5-7b-coder',
|
local models=('qwen2.5-32b-coder', 'qwen2.5-7b-coder',
|
||||||
'llama3.3-70b-instruct', 'qwen2.5-coder:0.5b')
|
'llama3.3-70b-instruct', 'qwen2.5-coder:3b',
|
||||||
|
'qwen2.5-coder:0.5b')
|
||||||
load_model_from_list "${models[@]}"
|
load_model_from_list "${models[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -377,10 +378,24 @@ function print_models() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Print message variable.
|
# Print message variable.
|
||||||
function print_debug_message_history() {
|
function print_message_history() {
|
||||||
echo ${message_history}
|
echo ${message_history}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Print message variable.
|
||||||
|
function print_debug() {
|
||||||
|
echo "Model: ${selected_model}"
|
||||||
|
echo 'System Prompt:'
|
||||||
|
print_system_prompt
|
||||||
|
echo 'Chat History:'
|
||||||
|
print_message_history | jq
|
||||||
|
}
|
||||||
|
|
||||||
|
# Print the system prompt.
|
||||||
|
function print_system_prompt() {
|
||||||
|
echo -e "${system_prompt}"
|
||||||
|
}
|
||||||
|
|
||||||
# Check if the model exists.
|
# Check if the model exists.
|
||||||
function check_if_model_exists() {
|
function check_if_model_exists() {
|
||||||
local model=${1}
|
local model=${1}
|
||||||
@@ -704,8 +719,7 @@ function handle_edit() {
|
|||||||
# Check for debug command.
|
# Check for debug command.
|
||||||
function handle_debug() {
|
function handle_debug() {
|
||||||
if [[ $msg == 'debug' ]]; then
|
if [[ $msg == 'debug' ]]; then
|
||||||
echo "model=${selected_model}"
|
print_debug
|
||||||
print_debug_message_history | jq
|
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
|
Reference in New Issue
Block a user