update
This commit is contained in:
@@ -64,7 +64,7 @@ type CompleteRequest struct {
|
|||||||
Model string `json:"model,omitempty"` //*
|
Model string `json:"model,omitempty"` //*
|
||||||
Prompt string `json:"prompt,omitempty"` //*
|
Prompt string `json:"prompt,omitempty"` //*
|
||||||
MaxTokensToSample int `json:"max_tokens_to_sample,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"`
|
Temperature int `json:"temperature,omitempty"`
|
||||||
TopP int `json:"top_p,omitempty"`
|
TopP int `json:"top_p,omitempty"`
|
||||||
TopK int `json:"top_k,omitempty"`
|
TopK int `json:"top_k,omitempty"`
|
||||||
@@ -237,6 +237,9 @@ func TransReq(chatreq *openai.ChatCompletionRequest) (*bytes.Buffer, error) {
|
|||||||
Stream: chatreq.Stream,
|
Stream: chatreq.Stream,
|
||||||
MaxTokensToSample: chatreq.MaxTokens,
|
MaxTokensToSample: chatreq.MaxTokens,
|
||||||
}
|
}
|
||||||
|
if transReq.MaxTokensToSample == 0 {
|
||||||
|
transReq.MaxTokensToSample = 1000000
|
||||||
|
}
|
||||||
var prompt string
|
var prompt string
|
||||||
for _, msg := range chatreq.Messages {
|
for _, msg := range chatreq.Messages {
|
||||||
switch msg.Role {
|
switch msg.Role {
|
||||||
|
|||||||
Reference in New Issue
Block a user