You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: chat.go
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -28,13 +28,15 @@ type ChatRequestParams struct {
28
28
TopPfloat64`json:"top_p"`// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or Temperature but not both.
29
29
RandomSeedint`json:"random_seed"`
30
30
MaxTokensint`json:"max_tokens"`
31
+
SafePromptbool`json:"safe_prompt"`// Adds a Mistral defined safety message to the system prompt to enforce guardrailing
31
32
}
32
33
33
34
varDefaultChatRequestParams=ChatRequestParams{
34
35
Temperature: 1,
35
36
TopP: 1,
36
37
RandomSeed: 42069,
37
38
MaxTokens: 4000,
39
+
SafePrompt: false,
38
40
}
39
41
40
42
// ChatMessage represents a single message in a chat.
0 commit comments