Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser handles receipt parsing using the Anthropic Messages API.
func NewParser ¶
func NewParser() *Parser
NewParser creates a new receipt parser using the Anthropic API. It reads the API key from the ANTHROPIC_API_KEY env var.
func NewParserWithKey ¶
NewParserWithKey creates a new receipt parser with an explicit API key. If apiKey is empty, parsing will fail with a descriptive error.
func (*Parser) ParseFromBytes ¶
func (p *Parser) ParseFromBytes(ctx context.Context, data []byte, contentType string) (*model.ParsedReceipt, error)
ParseFromBytes parses a receipt from raw bytes.
func (*Parser) ParseFromFile ¶
ParseFromFile parses a receipt from a file path.
Click to show internal directories.
Click to hide internal directories.