Add claude client to store
This commit is contained in:
15
backend/services/claude.go
Normal file
15
backend/services/claude.go
Normal file
@@ -0,0 +1,15 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user