Documentation
¶
Index ¶
Constants ¶
View Source
const ( PromptHuman = "\n\nHuman:" PromptAI = "\n\nAssistant:" MessageDone = "[DONE]" ModelClaudeV1 string = "claude-v1" ModelClaudeV10 string = "claude-v1.0" ModelClaudeV12 string = "claude-v1.2" ModelClaudeInstantV1 string = "claude-instant-v1" ModelClaudeInstantV10 string = "claude-instant-v1.0" )
Variables ¶
View Source
var ( BaseURL = "https://api.anthropic.com" DefaultMaxTokensToSample = 1200 DefaultStopSequences = []string{PromptHuman} )
Functions ¶
func WrapPrompt ¶
Types ¶
type SamplingParameters ¶
type SamplingParameters struct {
Prompt string `json:"prompt"`
MaxTokensToSample int `json:"max_tokens_to_sample"`
StopSequences []string `json:"stop_sequences"`
Model string `json:"model"`
Stream bool `json:"stream"`
Temperature *float64 `json:"temperature,omitempty"`
TopK *int `json:"top_k,omitempty"`
TopP *float64 `json:"top_p,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
}
func NewSimpleSamplingParameters ¶
func NewSimpleSamplingParameters(prompt string, model string) *SamplingParameters
Click to show internal directories.
Click to hide internal directories.