From 799b177c4f2a2e6a6f31b10c69152a0bc5caff90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?c=E8=8F=8C?= Date: Sat, 16 Sep 2023 19:22:32 +0800 Subject: [PATCH] update --- pkg/claude/claude.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/claude/claude.go b/pkg/claude/claude.go index bf875e0..94ee0e9 100644 --- a/pkg/claude/claude.go +++ b/pkg/claude/claude.go @@ -64,7 +64,7 @@ type CompleteRequest struct { Model string `json:"model,omitempty"` //* Prompt string `json:"prompt,omitempty"` //* MaxTokensToSample int `json:"max_tokens_to_sample,omitempty"` //* - StopSequences string `json:"stop_Sequences,omitempty"` + StopSequences string `json:"stop_sequences,omitempty"` Temperature int `json:"temperature,omitempty"` TopP int `json:"top_p,omitempty"` TopK int `json:"top_k,omitempty"` @@ -237,6 +237,9 @@ func TransReq(chatreq *openai.ChatCompletionRequest) (*bytes.Buffer, error) { Stream: chatreq.Stream, MaxTokensToSample: chatreq.MaxTokens, } + if transReq.MaxTokensToSample == 0 { + transReq.MaxTokensToSample = 1000000 + } var prompt string for _, msg := range chatreq.Messages { switch msg.Role {