Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AnthropicContent ¶
type AnthropicContent struct { Text string `json:"text,omitempty"` Type string `json:"type,omitempty"` }
AnthropicContent is the content of a message to the Claude model.
type AnthropicMessage ¶
type AnthropicMessage struct { Content []AnthropicContent `json:"content,omitempty"` Role string `json:"role,omitempty"` }
AnthropicMessage is a message to the Claude model.
type AnthropicRequest ¶
type AnthropicRequest struct { AnthropicVersion string `json:"anthropic_version,omitempty"` MaxTokens int `json:"max_tokens,omitempty"` Messages []AnthropicMessage `json:"messages,omitempty"` Stream bool `json:"stream,omitempty"` TopP float32 `json:"top_p,omitempty"` TopK int `json:"top_k,omitempty"` Temperature float32 `json:"temperature,omitempty"` }
AnthropicRequest is the request to the Claude model.
type AnthropicResponse ¶
type AnthropicResponse struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` Role string `json:"role,omitempty"` Content []AnthropicContent `json:"content,omitempty"` Model string `json:"model,omitempty"` StopReason string `json:"stop_reason,omitempty"` StopSequence string `json:"stop_sequence,omitempty"` Usage AnthropicUsage `json:"usage,omitempty"` }
AnthropicResponse is the response from the Claude model.
type AnthropicUsage ¶
type CitationMetadata ¶
type CitationMetadata struct {
Citations []interface{} `json:"citations"`
}
type Metadata ¶
type Metadata struct {
TokenMetadata TokenMetadata `json:"tokenMetadata"`
}
type PaLMResponse ¶
type PaLMResponse struct { Predictions []Prediction `json:"predictions"` Metadata Metadata `json:"metadata"` }
PaLMResponse is the response from the PaLM model.
type Prediction ¶
type Prediction struct { CitationMetadata CitationMetadata `json:"citationMetadata,omitempty"` Content string `json:"content,omitempty"` SafetyAttributes SafetyAttributes `json:"safetyAttributes,omitempty"` }
type SafetyAttributes ¶
type SafetyAttributes struct { Blocked bool `json:"blocked,omitempty"` Categories []string `json:"categories,omitempty"` SafetyRatings []SafetyRating `json:"safetyRatings,omitempty"` }
type SafetyRating ¶
type TokenMetadata ¶
type TokenMetadata struct { InputTokenCount TokenMetadataDetails `json:"inputTokenCount,omitempty"` OutputTokenCount TokenMetadataDetails `json:"outputTokenCount,omitempty"` }
type TokenMetadataDetails ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.