Skip to main content

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:

  1. Load the vector store for the specified knowledge base
  2. Search for documents similar to your query
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wish_knowledge_loader-0.6.5.tar.gz (36.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wish_knowledge_loader-0.6.5-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

Details for the file wish_knowledge_loader-0.6.5.tar.gz.

File metadata

  • Download URL: wish_knowledge_loader-0.6.5.tar.gz
  • Upload date:
  • Size: 36.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for wish_knowledge_loader-0.6.5.tar.gz
Algorithm Hash digest
SHA256 28da1bbe9e03d4e40379ed9ec3f819d7c0411229b8d551d1316b96f1c8ebc30c
MD5 d72fdbc8a69b94411d5d8f761dbd0e65
BLAKE2b-256 2dce3f8af4d0cf45a48043570fa60a3a2d2bbb925fb4dbe98a98fa38e8f9ac19

See more details on using hashes here.

File details

Details for the file wish_knowledge_loader-0.6.5-py3-none-any.whl.

File metadata

File hashes

Hashes for wish_knowledge_loader-0.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a83ee4e506f9e55deb176147f9da7b6feca5e8cc0ee6a2f50b903bf2b708b826
MD5 a08bbfbf07c107ec42c1b8b7ba78fd67
BLAKE2b-256 a3ebac307fc434286f5ae95eae486aa34fc3a3779f672378282906337be537e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page