-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use openai compatible environment variables for configuration and allow configuration using more specific variables that do not interfere with the openai defaults #46
Conversation
else | ||
messagesJson='['$(join_by , "${qaMessages[@]}")']' | ||
fi | ||
messagesJson='['$(join_by , "${qaMessages[@]}")']' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not work for me if qaMessages
is defined as above
function join_by {
local d=${1-} f=${2-}
if shift 2; then
printf %s "$f" "${@/#/$d}"
fi
}
qaMessages=()
messagesJson='['$(join_by , "${qaMessages[@]}")']'
gives "join_by:shift:2: shift count must be <= $#"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but the above code adds an element to the array: qaMessages+=
, so qaMessages cannot be empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sry my bad; works indeed fine with bash (butt actually I think it's great there are tests now :)
d04fb92
to
61a0425
Compare
…ow configuration using more specific variables that do not interfere with the openai defaults Signed-off-by: Mathias Burger <[email protected]>
32f0a16
to
33fcb1e
Compare
Signed-off-by: Mathias Burger <[email protected]>
33fcb1e
to
6677a13
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! (but I guess Thomas should approve it? Actually I am surprised I actually can at least in this form ;))
Just one suggestion for additional tests (which btw I really appreciate being added!)
else | ||
messagesJson='['$(join_by , "${qaMessages[@]}")']' | ||
fi | ||
messagesJson='['$(join_by , "${qaMessages[@]}")']' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sry my bad; works indeed fine with bash (butt actually I think it's great there are tests now :)
- name: Install BATS | ||
run: sudo apt-get update && sudo apt-get install -y bats | ||
- name: Run BATS Tests | ||
run: bats --formatter tap test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really cool;
If you'd like, how about adding some smoke test test/please.bats
#!/usr/bin/env bats
PLEASE_EXE=$BATS_TEST_DIRNAME/../please.sh
@test "smoke test please --help" {
result=$($PLEASE_EXE '--help')
[ "${result:0:6}" == "Please" ]
}
@test "smoke test please --version" {
result=$($PLEASE_EXE '--version')
[ "${result:0:8}" == "Please v" ]
}
(just to make sure the main() is called correctly)
Signed-off-by: Mathias Burger <[email protected]>
e3e9e70
to
0641366
Compare
Use openai compatible environment variables for configuration and allow configuration using more specific variables that do not interfere with the openai defaults