Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add datasets.columns.embeddings #227

Merged
merged 1 commit into from
Nov 11, 2024
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
6 changes: 3 additions & 3 deletions search_github_files/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Quickstart: Searching GitHub files with Spice

## Prerequistes
## Prerequistes
- Ensure you have the Spice CLI installed. Follow the [Getting Started](https://docs.spiceai.org/getting-started) if you haven't done so.
- Populate `.env`.
- `GITHUB_TOKEN`: With a [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic).
Expand Down Expand Up @@ -34,7 +34,7 @@ Result:

## Utilizing Vector-Based Search

1. In the `spicepod.yaml`, uncomment the `datasets[0].embeddings`.
1. In the `spicepod.yaml`, uncomment the `datasets[0].columns[0].embeddings`.
2. Restart the spiced.
3. Perform a basic search
```shell
Expand Down Expand Up @@ -82,7 +82,7 @@ Result:

### Additional Configuration - Chunking

1. Update the spicepod `datasets[0].embeddings.chunking.enabled: true`.
1. Update the spicepod `datasets[0].columns[0].embeddings.chunking.enabled: true`.
2. Restart the spiced.
3. Rerun the search
```shell
Expand Down
24 changes: 12 additions & 12 deletions search_github_files/spicepod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ models:
embeddings:
- name: local_embedding_model
from: huggingface:huggingface.co/sentence-transformers/all-MiniLM-L6-v2

datasets:
- from: github:github.com/spiceai/spiceai/files/trunk
name: spiceai.files
params:
github_token: ${secrets:GITHUB_TOKEN}
include: 'docs/**/*.md'
include: "docs/**/*.md"
acceleration:
enabled: true
# embeddings:
# - column: content
# use: local_embedding_model
# column_pk:
# - path
# chunking:
# enabled: false
# target_chunk_size: 256
# overlap_size: 64
# file_format: md
columns:
- name: content
# embeddings:
# - from: local_embedding_model
# row_id: path
# chunking:
# enabled: false
# target_chunk_size: 256
# overlap_size: 64
# file_format: md
Loading