mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-10-30 18:22:59 +00:00
122 lines
2.3 KiB
Plaintext
122 lines
2.3 KiB
Plaintext
---
|
|
title: AI Tools
|
|
description: AI-powered tools and utilities for intelligent applications
|
|
---
|
|
|
|
<ComponentPreview name="ai-tools-demo" />
|
|
|
|
## Overview
|
|
|
|
AI Tools components provide intelligent functionality for your applications, including code generation, content analysis, and automation capabilities.
|
|
|
|
## Installation
|
|
|
|
<Tabs defaultValue="cli">
|
|
|
|
<TabsList>
|
|
<TabsTrigger value="cli">CLI</TabsTrigger>
|
|
<TabsTrigger value="manual">Manual</TabsTrigger>
|
|
</TabsList>
|
|
|
|
<TabsContent value="cli">
|
|
|
|
```bash
|
|
npx @hanzo/ui@latest add ai-tools
|
|
```
|
|
|
|
</TabsContent>
|
|
|
|
<TabsContent value="manual">
|
|
|
|
<Steps>
|
|
|
|
<Step>Copy and paste the following code into your project.</Step>
|
|
|
|
<ComponentSource name="ai-tools" />
|
|
|
|
<Step>Update the import paths to match your project setup.</Step>
|
|
|
|
</Steps>
|
|
|
|
</TabsContent>
|
|
|
|
</Tabs>
|
|
|
|
## Available Tools
|
|
|
|
### Code Generation
|
|
|
|
AI-powered code generation and completion tools.
|
|
|
|
```tsx
|
|
import { AICodeGenerator } from "@hanzo/ui/ai"
|
|
|
|
export default function CodePage() {
|
|
return (
|
|
<AICodeGenerator
|
|
language="typescript"
|
|
context="React component"
|
|
onGenerate={(code) => console.log(code)}
|
|
/>
|
|
)
|
|
}
|
|
```
|
|
|
|
### Content Analysis
|
|
|
|
Analyze and process text content with AI.
|
|
|
|
```tsx
|
|
import { AIContentAnalyzer } from "@hanzo/ui/ai"
|
|
|
|
export default function AnalysisPage() {
|
|
return <AIContentAnalyzer onAnalyze={(result) => console.log(result)} />
|
|
}
|
|
```
|
|
|
|
### Smart Search
|
|
|
|
AI-enhanced search with semantic understanding.
|
|
|
|
```tsx
|
|
import { AISearch } from "@hanzo/ui/ai"
|
|
|
|
export default function SearchPage() {
|
|
return (
|
|
<AISearch
|
|
placeholder="Ask anything..."
|
|
onSearch={(query) => console.log(query)}
|
|
/>
|
|
)
|
|
}
|
|
```
|
|
|
|
## Features
|
|
|
|
- **Code Generation**: Generate code from natural language
|
|
- **Content Analysis**: Sentiment, keywords, summarization
|
|
- **Smart Search**: Semantic search with AI
|
|
- **Auto-completion**: Intelligent suggestions
|
|
- **Translation**: Multi-language support
|
|
- **Classification**: Content categorization
|
|
|
|
## Integration
|
|
|
|
AI Tools integrate with popular AI providers:
|
|
|
|
- OpenAI (GPT-4, GPT-3.5)
|
|
- Anthropic (Claude)
|
|
- Google (Gemini)
|
|
- Local models (Ollama)
|
|
|
|
## API Reference
|
|
|
|
See individual component pages for detailed API documentation:
|
|
|
|
- [AI Chat](/docs/ai/chat)
|
|
- [AI Playground](/docs/ai/playground)
|
|
|
|
## Examples
|
|
|
|
For complete examples, see the [AI Examples](/examples) section.
|