You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
npm install @google/generative-ai # Google AI SDK (peer dependency for ChromaDB)
50
+
npm install @anchordotdev/anchor # Anchor.dev
44
51
```
45
52
46
53
**Why optional?** These packages are large and not needed for basic functionality. Install only what your use case requires.
47
54
55
+
## AI Stack
56
+
57
+
### Full AI Toolkit with Claude
58
+
59
+
This project includes a comprehensive AI Stack with support for multiple AI providers and toolkits. The stack is designed to be modular and flexible, allowing you to use only the components you need.
60
+
61
+
**Key Features:**
62
+
63
+
-**Claude AI Integration**: Full support for Anthropic's Claude models (Opus, Sonnet, Haiku)
64
+
-**LangChain Integration**: Build complex AI applications with LangChain and Claude
65
+
-**Multi-Provider Support**: OpenAI, Cohere, Google AI, and more
66
+
-**Vector Databases**: Pinecone, Weaviate, and ChromaDB support
67
+
-**Type-Safe Configuration**: Zod validation for all AI settings
68
+
-**Modular Design**: Install only the AI tools you need
69
+
70
+
### Claude AI Configuration
71
+
72
+
Claude is Anthropic's family of state-of-the-art AI models. This project supports all Claude models with full configuration options.
73
+
74
+
**Available Models:**
75
+
76
+
-`claude-3-opus-20240229` - Most capable model for complex tasks
77
+
-`claude-3-sonnet-20240229` - Balanced performance and speed
78
+
-`claude-3-haiku-20240307` - Fastest model for simple tasks
79
+
80
+
**Configuration:**
81
+
82
+
```bash
83
+
# Enable Claude AI
84
+
CLAUDE_ENABLED=true
85
+
CLAUDE_API_KEY=your-anthropic-api-key
86
+
CLAUDE_MODEL=claude-3-opus-20240229
87
+
CLAUDE_MAX_TOKENS=4096
88
+
CLAUDE_TEMPERATURE=1.0
89
+
```
90
+
91
+
**Usage Example:**
92
+
93
+
```typescript
94
+
importAnthropicfrom'@anthropic-ai/sdk';
95
+
import { loadConfig } from'./config';
96
+
97
+
const config =loadConfig();
98
+
99
+
if (config.claude?.enabled&&config.claude.apiKey) {
100
+
const anthropic =newAnthropic({
101
+
apiKey: config.claude.apiKey,
102
+
});
103
+
104
+
const message =awaitanthropic.messages.create({
105
+
model: config.claude.model,
106
+
max_tokens: config.claude.maxTokens,
107
+
temperature: config.claude.temperature,
108
+
messages: [
109
+
{
110
+
role: 'user',
111
+
content: 'Hello, Claude!',
112
+
},
113
+
],
114
+
});
115
+
116
+
console.log(message.content);
117
+
}
118
+
```
119
+
120
+
### LangChain Integration
121
+
122
+
LangChain is a framework for developing applications powered by language models. This project includes LangChain with Claude integration.
0 commit comments