fix: address review findings (cache path, docs)
- Composite action: cache to runner.temp instead of /usr/local/bin (avoids permission issues on runners) - Document that temperature=0 means server default (omitted from request) - Note: strconv import already exists (false positive from GPT-5)
This commit is contained in:
@@ -70,7 +70,7 @@ runs:
|
|||||||
id: cache
|
id: cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: /usr/local/bin/review-bot
|
path: ${{ runner.temp }}/review-bot
|
||||||
key: review-bot-linux-amd64-${{ steps.version.outputs.version }}
|
key: review-bot-linux-amd64-${{ steps.version.outputs.version }}
|
||||||
|
|
||||||
- name: Install review-bot
|
- name: Install review-bot
|
||||||
@@ -79,8 +79,8 @@ runs:
|
|||||||
run: |
|
run: |
|
||||||
GITEA_URL="${{ inputs.gitea-url || github.server_url }}"
|
GITEA_URL="${{ inputs.gitea-url || github.server_url }}"
|
||||||
VERSION="${{ steps.version.outputs.version }}"
|
VERSION="${{ steps.version.outputs.version }}"
|
||||||
curl -sSfL "${GITEA_URL}/rodin/review-bot/releases/download/${VERSION}/review-bot-linux-amd64" -o /usr/local/bin/review-bot
|
curl -sSfL "${GITEA_URL}/rodin/review-bot/releases/download/${VERSION}/review-bot-linux-amd64" -o ${{ runner.temp }}/review-bot
|
||||||
chmod +x /usr/local/bin/review-bot
|
chmod +x ${{ runner.temp }}/review-bot
|
||||||
|
|
||||||
- name: Run review
|
- name: Run review
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -100,4 +100,4 @@ runs:
|
|||||||
if [ "${{ inputs.dry-run }}" = "true" ]; then
|
if [ "${{ inputs.dry-run }}" = "true" ]; then
|
||||||
ARGS="--dry-run"
|
ARGS="--dry-run"
|
||||||
fi
|
fi
|
||||||
review-bot $ARGS
|
${{ runner.temp }}/review-bot $ARGS
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ func NewClient(baseURL, apiKey, model string) *Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// WithTemperature sets the temperature for LLM requests.
|
// WithTemperature sets the temperature for LLM requests.
|
||||||
|
// A value of 0 (the zero value) means the field is omitted from the request,
|
||||||
|
// causing the server to use its default temperature.
|
||||||
// If not set (zero value), the server default is used.
|
// If not set (zero value), the server default is used.
|
||||||
func (c *Client) WithTemperature(t float64) *Client {
|
func (c *Client) WithTemperature(t float64) *Client {
|
||||||
c.Temperature = t
|
c.Temperature = t
|
||||||
|
|||||||
Reference in New Issue
Block a user