16 lines
307 B
Go
16 lines
307 B
Go
package services
|
|
|
|
import (
|
|
"github.com/anthropics/anthropic-sdk-go"
|
|
"github.com/anthropics/anthropic-sdk-go/option"
|
|
)
|
|
|
|
type ClaudeConfig struct {
|
|
APIKey string
|
|
}
|
|
|
|
func InitClaude(config *ClaudeConfig) *anthropic.Client {
|
|
client := anthropic.NewClient(option.WithAPIKey(config.APIKey))
|
|
return &client
|
|
}
|