
Product
Introducing the Alert Details Page: A Better Way to Explore Alerts
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.
@djangocfg/ext-knowbase
Advanced tools
Knowledge base and RAG-powered chat extension for DjangoCFG.
Part of DjangoCFG — modern Django framework for production-ready SaaS applications.
pnpm add @djangocfg/ext-knowbase
import { KnowbaseProvider } from '@djangocfg/ext-knowbase/hooks';
export default function RootLayout({ children }) {
return (
<KnowbaseProvider>
{children}
</KnowbaseProvider>
);
}
import {
useKnowbaseDocumentsContext,
} from '@djangocfg/ext-knowbase/hooks';
function DocumentsPage() {
const {
documents,
uploadDocument,
deleteDocument,
isLoadingDocuments,
} = useKnowbaseDocumentsContext();
const handleUpload = async (file: File) => {
await uploadDocument({
file,
title: file.name,
description: 'Uploaded document',
});
};
return (
<div>
<input
type="file"
onChange={(e) => e.target.files && handleUpload(e.target.files[0])}
/>
{documents.map(doc => (
<div key={doc.id}>
<h3>{doc.title}</h3>
<p>Status: {doc.status}</p>
<button onClick={() => deleteDocument(doc.id)}>Delete</button>
</div>
))}
</div>
);
}
import { useKnowbaseChatContext } from '@djangocfg/ext-knowbase/hooks';
function ChatInterface() {
const { sendQuery, chatHistory, isLoading } = useKnowbaseChatContext();
const handleSend = async (message: string) => {
await sendQuery({
query: message,
session_id: sessionId,
});
};
return (
<div>
{chatHistory.map((msg, idx) => (
<div key={idx}>
<strong>{msg.role}:</strong> {msg.content}
</div>
))}
<input
onKeyDown={(e) => {
if (e.key === 'Enter') {
handleSend(e.currentTarget.value);
}
}}
disabled={isLoading}
/>
</div>
);
}
import { useKnowbaseDocumentsContext } from '@djangocfg/ext-knowbase/hooks';
function ArchiveUpload() {
const { uploadArchive, getArchiveById } = useKnowbaseDocumentsContext();
const handleArchiveUpload = async (file: File) => {
const result = await uploadArchive({
file,
auto_process: true,
});
// Check processing status
const archive = await getArchiveById(result.id);
console.log('Processing status:', archive.processing_status);
};
return (
<input
type="file"
accept=".zip"
onChange={(e) => e.target.files && handleArchiveUpload(e.target.files[0])}
/>
);
}
documents - List of all documentsuploadDocument(data) - Upload single documentdeleteDocument(id) - Delete documentupdateDocument(id, data) - Update document metadatagetDocumentById(id) - Get document detailsuploadArchive(data) - Upload ZIP archiveprocessArchive(id) - Trigger archive processingsendQuery(data) - Send chat query to RAG systemchatHistory - Current chat session historyclearHistory() - Clear chat historyisLoading - Loading statesessions - List of chat sessionscreateSession(data) - Create new sessiondeleteSession(id) - Delete sessiongetCurrentSession() - Get active sessionMIT
FAQs
Knowledge base and chat extension for DjangoCFG
We found that @djangocfg/ext-knowbase demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.