Frequently Asked Questions (FAQ)
Quick answers to common questions about ONE framework, organized by topic.
General
Q: What is ONE framework?
A: ONE is an AI-powered web framework built on Astro that combines static site generation with dynamic AI capabilities. It provides tools for creating intelligent web applications with features like AI chat interfaces, content generation, and more.
Q: Is ONE free to use?
A: Yes, ONEβs core features are completely free and open source. Optional token-based features are available for enterprise users who need white-labeling or additional capabilities.
Q: What are the system requirements?
A: You need:
- Node.js 18 or higher
- pnpm package manager
- Modern web browser
- OpenAI API key (for AI features)
Installation
Q: How do I install ONE?
A: Install using pnpm:
# Create new project
pnpm create astro@latest my-one-app -- --template one
# Install dependencies
cd my-one-app
pnpm install
Q: Can I use npm or yarn instead of pnpm?
A: While possible, we recommend pnpm for better performance and consistency. If you must use npm:
npm install
npm run dev
AI Features
Q: How do I configure the OpenAI API?
A: Add your API key to .env
:
OPENAI_API_KEY=your_key_here
Q: Which AI models are supported?
A: ONE supports:
- OpenAI GPT models
- Anthropic models (with configuration)
- Custom AI providers (with integration)
Q: How do I customize AI behavior?
A: Use system prompts and chat configuration:
const chatConfig = {
systemPrompt: [{
type: "text",
text: "Define AI behavior here"
}],
temperature: 0.7,
maxTokens: 2000
};
Chat Interface
Q: How do I add chat to a page?
A: Use the Layout component:
---
import Layout from "../layouts/Layout.astro";
import { ChatConfigSchema } from '../schema/chat';
const chatConfig = ChatConfigSchema.parse({
// Your config here
});
---
<Layout
chatConfig={chatConfig}
rightPanelMode="quarter"
>
<!-- Your content -->
</Layout>
Q: Which panel modes are available?
A: Available modes:
quarter
: 25% width (default)half
: 50% widthfull
: Full screenfloating
: Detached windowicon
: Minimized buttonhidden
: No chat interface
Q: How do I style the chat interface?
A: Use Tailwind classes or custom CSS:
// Custom theme
const theme = {
colors: {
primary: "blue",
background: "white"
},
spacing: "comfortable"
};
Development
Q: How do I create a custom AI agent?
A: Define a specialized configuration:
const customAgent = {
systemPrompt: [{
type: "text",
text: "Define agent's expertise"
}],
welcome: {
message: "Custom welcome",
suggestions: [...]
}
};
Q: How do I add authentication?
A: Integrate with your preferred auth provider:
// Example with Auth.js
import { getSession } from '@auth/astro';
const session = await getSession(Astro.request);
if (!session) {
return Astro.redirect('/login');
}
Q: How do I handle errors?
A: Use try-catch and error boundaries:
try {
const response = await chat.sendMessage(message);
} catch (error) {
if (error.code === 'rate_limit') {
// Handle rate limiting
}
// Log error
console.error('Chat error:', error);
}
Performance
Q: How do I optimize performance?
A: Key optimization strategies:
- Enable edge runtime
- Implement caching
- Use streaming responses
- Optimize assets
Deployment
Q: How do I deploy to production?
A: Multiple options:
- Vercel
vercel deploy
- Cloudflare:
wrangler deploy (under development)
- Custom server:
pnpm build
node server.js
Q: How do I handle environment variables?
A: Set up environment-specific variables:
# .env.production
OPENAI_API_KEY=prod_key
DATABASE_URL=prod_url
Troubleshooting
Q: Chat interface not showing?
A: Check:
- ChatConfig syntax
- API key configuration
- Panel mode setting
- Console errors
Q: Build failing?
A: Try:
# Clear cache
pnpm clean
# Fresh install
rm -rf node_modules
pnpm install
# Rebuild
pnpm build
Q: TypeScript errors?
A: Update types:
# Regenerate types
pnpm astro sync
# Check configuration
pnpm tsc --noEmit
Getting Help
Q: Where can I get support?
A: Several options:
Q: How do I report bugs?
A: Open an issue with:
- Error message
- Steps to reproduce
- Environment details
- Code sample
Q: How do I request features?
A: Use our feature request template on GitHub.
Need more help? Join our Discord community for real-time support.