recommended setup

This commit is contained in:
AI Christianson 2025-02-14 15:16:57 -05:00
parent 370401b1eb
commit 80900188d5
1 changed files with 31 additions and 31 deletions

View File

@ -1,43 +1,43 @@
--- # Recommended Setup
sidebar_position: 1
---
# Recommended ## Installation
Add **Markdown or React** files to `src/pages` to create a **standalone page**: Create a new Python 3.12 virtual environment and install RA.Aid:
- `src/pages/index.js``localhost:3000/` ```bash
- `src/pages/foo.md``localhost:3000/foo` uv venv -p 3.12
- `src/pages/foo/bar.js``localhost:3000/foo/bar` source .venv/bin/activate # On Unix/macOS
# or
.venv\Scripts\activate # On Windows
## Create your first React Page uv pip install ra-aid
Create a file at `src/pages/my-react-page.js`:
```jsx title="src/pages/my-react-page.js"
import React from 'react';
import Layout from '@theme/Layout';
export default function MyReactPage() {
return (
<Layout>
<h1>My React page</h1>
<p>This is a React page</p>
</Layout>
);
}
``` ```
A new page is now available at [http://localhost:3000/my-react-page](http://localhost:3000/my-react-page). ## Configuration
## Create your first Markdown Page Configure your API keys:
Create a file at `src/pages/my-markdown-page.md`: ```bash
# For OpenAI (required)
export OPENAI_API_KEY=your_api_key_here
```mdx title="src/pages/my-markdown-page.md" # For Anthropic (required)
# My Markdown page export ANTHROPIC_API_KEY=your_api_key_here
This is a Markdown page # For web search capability (optional)
export TAVILY_API_KEY=your_api_key_here
``` ```
A new page is now available at [http://localhost:3000/my-markdown-page](http://localhost:3000/my-markdown-page). ## Basic Usage
Start RA.Aid in interactive mode:
```bash
ra-aid
```
Or run with a specific command:
```bash
ra-aid -m "Help me understand this code"
```