Python interfaces for interacting with OpenAI's Vector Storage API - both CLI and GUI versions.
- Vector Store Management:
- Create, retrieve, update, and delete vector stores
- List all available vector stores
- Automatic status polling until ready
- File Operations:
- Upload files to vector stores
- List/delete files in stores
- Supports PDF, TXT, and other OpenAI-supported formats
- Error Handling:
- Comprehensive API error handling
- Timeout management for long operations
- Visual Interface:
- Tabbed interface for store/file management
- Real-time status updates
- Scrollable log panel
- Interactive Operations:
- Store creation/deletion dialogs
- File upload with native file picker
- Detailed store metadata viewing
- Automatic refresh of lists
- Threaded Operations:
- Background processing for API calls
- Non-blocking UI during operations
-
Prerequisites:
- Python 3.7+
- OpenAI API key
-
Install packages:
pip install requests python-dotenv tkinter
-
Environment Setup:
- Create
.envfile:OPENAI_API_KEY=your-api-key-here
- Create
from gui_less import VectorStoreClient
# Initialize client
client = VectorStoreClient(api_key=os.getenv("OPENAI_API_KEY"))
# Create store
store = client.create_vector_store(name="My Data Store")
# Upload file
client.upload_file(store["id"], "data.pdf")
# Wait for processing
client.poll_until_ready(store["id"])
# List stores
stores = client.list_vector_stores()python gui.pyGUI Controls:
-
Vector Stores Tab:
- Left panel: List of all stores
- Right panel: Detailed store metadata
- Buttons: Create/Delete/Refresh stores
-
Files Tab:
- File upload controls
- List of files in selected store
- Status indicators for files
-
Log Panel:
- Real-time operation logging
- Error message display
# Create store
store = client.create_vector_store(name="Research Papers")
# Upload multiple files
for file in ["paper1.pdf", "notes.txt"]:
client.upload_file(store["id"], file)
# Monitor status
while True:
status = client.get_vector_store(store["id"])
print(f"Status: {status['status']}")
if status["status"] == "completed":
break
time.sleep(10)- Launch application
- Click "New" to create store
- Select store from list
- Choose file and click "Upload"
- Monitor progress in log panel
-
Core Module:
- Add pagination support
- Implement rate limiting
- Add async operations
-
GUI Version:
- Add progress bars
- Implement search functionality
- Add metadata editing
- Support drag-and-drop uploads
GPL3
