Discover Packages
github.com/robermar23/langchaingo
llms
anthropic
package
Version:
v0.1.9
Opens a new window with list of versions in this module.
Published: Feb 28, 2024
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
Documentation
¶
View Source
var (
ErrEmptyResponse = errors .New ("no response")
ErrMissingToken = errors .New ("missing the Anthropic API key, set it in the ANTHROPIC_API_KEY environment variable")
ErrUnexpectedResponseLength = errors .New ("unexpected length of response")
)
New returns a new Anthropic LLM.
Call requests a completion for the given prompt.
GenerateContent implements the Model interface.
type Option func(*options)
WithModel passes the Anthropic model to the client.
WithToken passes the Anthropic API token to the client. If not set, the token
is read from the ANTHROPIC_API_KEY environment variable.
Source Files
¶
Directories
¶
internal
Click to show internal directories.
Click to hide internal directories.