Documentation ¶
Index ¶
Constants ¶
View Source
const ( PromptHuman = "\n\nHuman:" PromptAI = "\n\nAssistant:" MessageDone = "[DONE]" ModelClaudeV1 string = "claude-v1" ModelClaudeV1_100K string = "claude-v1-100k" ModelClaudeV10 string = "claude-v1.0" ModelClaudeV12 string = "claude-v1.2" ModelClaudeV13 string = "claude-v1.3" ModelClaudeV13_100K string = "claude-v1.3-100k" ModelClaudeInstantV1 string = "claude-instant-v1" ModelClaudeInstantV1_100K string = "claude-instant-v1-100k" ModelClaudeInstantV10 string = "claude-instant-v1.0" ModelClaudeInstantV11 string = "claude-instant-v1.1" ModelClaudeInstantV11_100K string = "claude-instant-v1.1-100k" )
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.