Skip to content

Commit 4c09240

Browse files
csg-pr-botDev Agent
andauthored
Remove black space for prompt (#972)
Co-authored-by: Dev Agent <dev-agent@example.com>
1 parent 0006d30 commit 4c09240

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

builder/llm/client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"io"
1010
"log/slog"
1111
"net/http"
12+
"strings"
1213

1314
"opencsg.com/csghub-server/common/types"
1415
)
@@ -29,7 +30,7 @@ func NewClient() *Client {
2930

3031
func (c *Client) ChatStream(ctx context.Context, endpoint, host string, headers map[string]string, data types.LLMReqBody) (<-chan string, error) {
3132
slog.Debug("chat with llm", slog.Any("endpoint", endpoint), slog.Any("data", data))
32-
rc, err := c.doRequest(ctx, http.MethodPost, endpoint, host, headers, data)
33+
rc, err := c.doRequest(ctx, http.MethodPost, strings.TrimSpace(endpoint), host, headers, data)
3334
if err != nil {
3435
return nil, fmt.Errorf("do llm stream request, error: %w", err)
3536
}

0 commit comments

Comments
 (0)