Skip to content

Instantly share code, notes, and snippets.

View skeptrunedev's full-sized avatar
💭
🚢 🚢 🚢

skeptrune skeptrunedev

💭
🚢 🚢 🚢
View GitHub Profile
@skeptrunedev
skeptrunedev / best-qdrant-confg.json
Last active June 27, 2024 07:16
Good Qdrant Config
{
"params": {
"vectors": {
"1024_vectors": {
"size": 1024,
"distance": "Cosine",
"hnsw_config": {
"on_disk": false
},
"quantization_config": {
@skeptrunedev
skeptrunedev / delete-all-git-branches-except-main.sh
Created July 2, 2024 22:41
Delete All Git Branches Except Main Unix Shell Script
git branch | grep -v main | xargs git branch -D
@skeptrunedev
skeptrunedev / create-500-trieve-datasets-for-testing.js
Created July 3, 2024 18:33
Create 500 Trieve Datasets for Testing
const createDatasetPayload = JSON.parse("{\"dataset_name\":\"test14\",\"organization_id\":\"95b7c53e-2c24-49a1-97fa-c87188c7324b\",\"server_configuration\":{\"LLM_BASE_URL\":\"\",\"LLM_DEFAULT_MODEL\":\"\",\"EMBEDDING_BASE_URL\":\"https://embedding.trieve.ai\",\"EMBEDDING_MODEL_NAME\":\"jina-base-en\",\"MESSAGE_TO_QUERY_PROMPT\":\"\",\"RAG_PROMPT\":\"\",\"EMBEDDING_SIZE\":768,\"N_RETRIEVALS_TO_INCLUDE\":8,\"DUPLICATE_DISTANCE_THRESHOLD\":1.1,\"DOCUMENT_UPLOAD_FEATURE\":true,\"DOCUMENT_DOWNLOAD_FEATURE\":true,\"COLLISIONS_ENABLED\":false,\"FULLTEXT_ENABLED\":true,\"QDRANT_COLLECTION_NAME\":null,\"EMBEDDING_QUERY_PREFIX\":\"Search for: \",\"USE_MESSAGE_TO_QUERY_PROMPT\":false,\"FREQUENCY_PENALTY\":null,\"TEMPERATURE\":null,\"PRESENCE_PENALTY\":null,\"STOP_TOKENS\":null,\"INDEXED_ONLY\":false,\"LOCKED\":false},\"client_configuration\":\"{}\"}");
for (let i = 0; i<500; i++) {
createDatasetPayload.dataset_name = `test_${i}`;
fetch("http://localhost:8090/api/dataset", {
"headers": {
"accept":

Trieve Deploy Guide

1. Create a VPS

We typicaly do this through Hetzner, but EC2 or Compute Instances on GCP would also be ok. However, Hetzner is preferred unless you have a strong preference against it.

The preferred region is US-West.

For operating system, pick Ubuntu.

@skeptrunedev
skeptrunedev / trieve-search-playground
Created July 25, 2024 18:26
Trieve Search Playground Screenshot
I need to upload image in comment
@skeptrunedev
skeptrunedev / query-highlighting-system.rs
Created August 3, 2024 10:25
query-highlighting-system
// TODO: latency optimize this so it can be uncommented
if phrases.is_empty() {
let potential_query_split_whitespace = potential_query.split_whitespace().collect_vec();
if potential_query_split_whitespace.len() > 5 {
continue;
}
let query_without_stop_words = potential_query
.split_whitespace()
.filter(|word| !stop_words.contains(&word.to_lowercase()))
.collect::<Vec<&str>>();
@skeptrunedev
skeptrunedev / caddy-spa-config-block.yml
Created August 6, 2024 04:06
caddy-spa-config.yml
foo.bar.com {
root * /home/git_projects/trieve-hn-discovery/frontend/dist
try_files {path} {path}/ /index.html
file_server
}
@skeptrunedev
skeptrunedev / cargo.toml
Created August 6, 2024 22:57
Rust actix-web implementation for actix-extensible-rate-limit crate (Trieve)
redis = { version = "0.25", features = [
"tokio-rustls-comp",
"aio",
"connection-manager",
] }
actix-extensible-rate-limit = { version = "0.3.1", features = ["redis"] }
@skeptrunedev
skeptrunedev / history-of-hn-search.md
Last active August 12, 2024 21:42
Blog Post Documenting the History of HN Search from 2014 to 2024
publishDate author title excerpt image category tags
2024-08-12 08:45:00 UTC
skeptrune (Nick K)
History of HackerNews Search: From 2007 to 2024
The history of HackerNews (HN) search spans three generations. Starting in 2007 with Disqus founder Jason Yan followed by a series of other sites, Octopart/ThriftDB-powered HNSearch in 2011, and finally Algolia-powered search from 2014 to today.
History
hackernews
@skeptrunedev
skeptrunedev / get-docker-url.txt
Last active August 28, 2024 01:17
Get Docker URL
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh