Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/PromptStarter/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from "react";
import styles from "./styles.module.scss";
import ContextualMenu from "@site/src/components/ContextualMenu";
import { getPromptDetails } from "./promptDetails";
import { getPromptDetails } from "./prompts";
import { urls } from "../config";
import { analytics } from "@site/src/utils/analytics";

Expand Down
17 changes: 0 additions & 17 deletions src/components/PromptStarter/promptDetails.js

This file was deleted.

44 changes: 13 additions & 31 deletions src/components/PromptStarter/prompts.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,16 @@
// Prompts for all pages
// Add new page prompts here as they are created
import prompts from "@site/static/prompts/index.json";

const BASE_URL = 'https://docs.weaviate.io';
export const promptDetails = Object.fromEntries(
Object.entries(prompts).map(([key, prompt]) => [
key,
{
description: prompt.description,
short: prompt.detailedDescription,
features: prompt.features,
},
])
);

// Quickstart page prompts
const quickstartPrompts = {
python: `Open this site and follow the instructions: ${BASE_URL}/prompts/quickstart-python.md`,
typescript: `Open this site and follow the instructions: ${BASE_URL}/prompts/quickstart-typescript.md`,
go: `Open this site and follow the instructions: ${BASE_URL}/prompts/quickstart-go.md`,
java: `Open this site and follow the instructions: ${BASE_URL}/prompts/quickstart-java.md`,
csharp: `Open this site and follow the instructions: ${BASE_URL}/prompts/quickstart-csharp.md`,
};

// Map of page identifiers to their prompts
const prompts = {
quickstart: { prompt: quickstartPrompts },
// Future pages can be added here:
// search: { prompt: searchPrompts },
// agents: { prompt: agentsPrompts },
};

// Cursor deeplink character limit
export const CURSOR_CHAR_LIMIT = 8000;

// Helper to get prompts for a specific page
export function getPromptsForPage(page) {
const pagePrompts = prompts[page];
if (!pagePrompts) {
console.warn(`No prompts found for page: ${page}. Available pages: ${Object.keys(prompts).join(", ")}`);
return null;
}
return pagePrompts;
export function getPromptDetails(key) {
return promptDetails[key] || null;
}
72 changes: 72 additions & 0 deletions static/prompts/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"quickstart_prompt": {
"description": "Build a working movie search app with natural language queries, vector search, and RAG in 5 steps.",
"detailedDescription": "The prompt will guide you to create a movie search demo application that uses natural language queries, vector and hybrid search to browse a movie collection.",
"features": [
"Create a Movie collection with text2vec-weaviate vectorizer",
"Import 5 sample movies (The Matrix, Inception, The Godfather, Spirited Away, The Dark Knight)",
"Use the query agent to retrieve information with natural language queries (only Python & TypeScript)",
"Implement vector, hybrid, and keyword search modes",
"Add Retrieval Augmented Generation (RAG) with Anthropic for AI-powered movie explanations"
],
"languages": {
"python": {
"file": "quickstart-python.md",
"title": "Build a Weaviate Web App with FastAPI",
"framework": "FastAPI + Uvicorn",
"tags": [
"Create Collection",
"Import Data",
"Query Agent",
"Hybrid Search",
"RAG"
],
"packages": [
"weaviate-client>=4.19.0",
"weaviate-agents>=1.2.0",
"fastapi",
"uvicorn",
"python-dotenv"
]
},
"typescript": {
"file": "quickstart-typescript.md",
"title": "Build a Weaviate Web App with Next.js",
"framework": "Next.js (App Router) + Tailwind CSS",
"tags": [
"Create Collection",
"Import Data",
"Query Agent",
"Hybrid Search",
"RAG"
],
"packages": ["weaviate-client@^3.11.0", "weaviate-agents@^1.1.0"]
},
"go": {
"file": "quickstart-go.md",
"title": "Build a Weaviate Web App with Gin",
"framework": "Gin",
"tags": ["Create Collection", "Import Data", "Hybrid Search", "RAG"],
"packages": [
"github.com/weaviate/weaviate-go-client/v5@v5.6.0",
"github.com/gin-gonic/gin",
"github.com/joho/godotenv"
]
},
"java": {
"file": "quickstart-java.md",
"title": "Build a Weaviate Web App with Spring Boot",
"framework": "Spring Boot",
"tags": ["Create Collection", "Import Data", "Hybrid Search", "RAG"],
"packages": ["io.weaviate:client:6.0.1"]
},
"csharp": {
"file": "quickstart-csharp.md",
"title": "Build a Weaviate Web App with ASP.NET Core",
"framework": "ASP.NET Core MVC",
"tags": ["Create Collection", "Import Data", "Hybrid Search", "RAG"],
"packages": ["Weaviate.Client >= 1.0.0"]
}
}
}
}