How It Works
- Replace the import - Change from
openai
to@openfiles-ai/sdk/openai
- Add your OpenFiles key - Include your OpenFiles API key
- That’s it - Your AI can now create and manage files automatically
Features
- ✅ 100% OpenAI Compatible - All OpenAI features still work
- ✅ Automatic File Operations - No manual tool handling
- ✅ Zero Learning Curve - Use your existing OpenAI knowledge
- ✅ TypeScript & Python - Full support for both
Installation
Refer to the SDK Overview for installation instructions.Two Simple Changes
What Gets Added
When you use our OpenAI replacement, we automatically:- Inject file operation tools into your requests
- Execute file operations when the AI calls them
- Return results seamlessly to the AI
- Continue the conversation naturally
Supported Operations
Your AI can automatically:- Create files - “Write a grocery list for tonight’s dinner party”
- Read files - “What’s in my shopping-list.md file?”
- Edit files - “Add butter to the shopping list”
- List files - “Show me all my recipe files”
- Append content - “Add a new item to my todo list”
- Overwrite files - “Replace my old travel itinerary”
- Get metadata - “How large is the vacation-photos.txt?”
- Access versions - “Show me previous versions of my budget spreadsheet”
File Organization
UsebasePath
to organize files:
Monitoring
Add callbacks to monitor file operations:Compatibility
- ✅ Chat completions (text-based conversations)
- ✅ All OpenAI chat models (GPT-3.5, GPT-4, etc.)
- ✅ Function calling and tool use
- 🔜 Streaming responses (coming soon)
- 🔜 Image inputs and vision models (coming soon)
- 🔜 Assistants API (coming soon)
When to Use OpenAI Integration
Choose OpenAI Integration when:- You’re already using the OpenAI SDK
- You want the simplest possible setup
- You need automatic file operations with zero configuration
- You prefer a drop-in replacement approach
- Tools Integration - If you’re using multiple AI providers or want more control
- Core Client - If you need direct API access without AI dependencies