Knowledge loader for wish
Project description
wish-knowledge-loader
A CLI tool for managing knowledge bases in wish.
Overview
wish-knowledge-loader is a command-line tool that allows you to:
- Load knowledge from GitHub repositories into wish
- List existing knowledge bases
- Delete knowledge bases when no longer needed
For detailed usage instructions, see the Knowledge Loader Usage Guide.
Installation
# Install from the repository
cd wish-knowledge-loader
uv sync --dev
cp .env.example .env
vim .env # Set the OpenAI API key
Quick Reference
# Load a knowledge base
wish-knowledge-loader load --repo-url https://github.com/username/repo --glob "**/*.md" --title "Knowledge Base Title"
# List all knowledge bases
wish-knowledge-loader list
# Delete a knowledge base
wish-knowledge-loader delete --title "Knowledge Base Title"
Environment Variables
The following environment variables can be set in a .env file:
OPENAI_API_KEY: Your OpenAI API key (required)OPENAI_EMBEDDING_MODEL: OpenAI embedding model to use (default: "text-embedding-3-small")WISH_HOME: Path to the wish home directory (default: "~/.wish")
Development
# Run tests
uv run pytest
# Run linting
uv run ruff check .
Verifying Search Functionality
After creating a knowledge base, you can verify the search functionality using the provided script:
# Set the OpenAI API key
export OPENAI_API_KEY="your-api-key"
# Run the search script
python scripts/search_knowledge.py "Knowledge Base Title" "your search query"
The script will:
- Load the vector store for the specified knowledge base
- Search for documents similar to your query
- Display the top 4 results with their content and metadata
You can adjust the number of results by modifying the k parameter in the script.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wish_knowledge_loader-0.5.0.tar.gz.
File metadata
- Download URL: wish_knowledge_loader-0.5.0.tar.gz
- Upload date:
- Size: 36.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
049404d2d72df99a6c6f3bb6f74dffe2f608d3594588a7bc237b8a3ebd38f670
|
|
| MD5 |
7a113f7d0c12411050a7df4f52bac0c2
|
|
| BLAKE2b-256 |
b8e9a01399c303e8ea49d859fef00f69c72c47ea6bf6d23dd6987876bafd23cd
|
File details
Details for the file wish_knowledge_loader-0.5.0-py3-none-any.whl.
File metadata
- Download URL: wish_knowledge_loader-0.5.0-py3-none-any.whl
- Upload date:
- Size: 34.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe0597a418162d4389579b58aae8f9ba1bb4e333461f543d85b9f6da28f8bdfb
|
|
| MD5 |
222073d811b42fc094d2b741b20e31a8
|
|
| BLAKE2b-256 |
be7c8cc893b4ba33817d0ab04a3617824a65665ee0d7790e940895460aa4af41
|