{"id":29636447,"url":"https://github.com/zseta/scylla-semantic-cache","last_synced_at":"2025-07-21T17:04:10.264Z","repository":{"id":301061908,"uuid":"1008042294","full_name":"zseta/scylla-semantic-cache","owner":"zseta","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-25T00:04:56.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-25T01:20:50.315Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zseta.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-25T00:02:17.000Z","updated_at":"2025-06-25T00:04:58.000Z","dependencies_parsed_at":"2025-06-25T01:20:53.961Z","dependency_job_id":"7a3be3d1-519f-4a8e-9199-fb7a5e50aaca","html_url":"https://github.com/zseta/scylla-semantic-cache","commit_stats":null,"previous_names":["zseta/scylla-semantic-cache"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zseta/scylla-semantic-cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zseta%2Fscylla-semantic-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zseta%2Fscylla-semantic-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zseta%2Fscylla-semantic-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zseta%2Fscylla-semantic-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zseta","download_url":"https://codeload.github.com/zseta/scylla-semantic-cache/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zseta%2Fscylla-semantic-cache/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266341355,"owners_count":23914227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-21T17:04:09.476Z","updated_at":"2025-07-21T17:04:10.257Z","avatar_url":"https://github.com/zseta.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Semantic caching with ScyllaDB\nThis is a sample application that shows you how to use ScyllaDB with LLM APIs for semantic caching and avoid unnecesary LLM API requests to save costs.\n\nStart up a new ScyllaDB cluster:\n```bash\ndocker run --name semantic -p \"9042:9042\" -d scylladb/scylla \\\n  --overprovisioned 1 \\\n  --smp 1\n```\n\nConnect to ScyllaDB using CQLSH:\n```bash\ndocker exec -it semantic cqlsh\n```\n\nCreate schema:\n```sql\nCREATE KEYSPACE semantic\nWITH REPLICATION = {\n  'class' : 'NetworkTopologyStrategy',\n  'replication_factor' : 1\n};\n\nCREATE TABLE semantic.prompts (\n    id uuid PRIMARY KEY,\n    inserted_at timestamp,\n    prompt text,\n    prompt_vector text,\n    response text,\n    updated_at timestamp\n)\n```\n\n## Run the app\nRun the program using the `--question` cmd argument:\n```\npython main.py --question \"What's the capital of Hungary?\"\n\npython main.py --question \"What's the biggest city in Florida?\"\n\npython main.py --question \"What's the largest city in Florida?\"\n```\n\nNotice how the program uses cache or not depending on the question.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzseta%2Fscylla-semantic-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzseta%2Fscylla-semantic-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzseta%2Fscylla-semantic-cache/lists"}