{"id":22096419,"url":"https://github.com/hwvs/embedding-prompted-search-ruby","last_synced_at":"2025-06-29T15:04:25.941Z","repository":{"id":166666381,"uuid":"637967087","full_name":"hwvs/Embedding-Prompted-Search-Ruby","owner":"hwvs","description":"Ruby library for searching documents/books using OpenAI API Embeddings to find relevant text, enabling (GPT-4) LLM-based tasks such as answering questions about authors or their books with context provided by the related embeddings.","archived":false,"fork":false,"pushed_at":"2023-06-16T22:00:18.000Z","size":66,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T00:57:25.551Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hwvs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-05-08T19:49:22.000Z","updated_at":"2023-06-12T21:24:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"86a61c1f-da27-465f-bb41-75a1ceaa4082","html_url":"https://github.com/hwvs/Embedding-Prompted-Search-Ruby","commit_stats":null,"previous_names":["hwvs/embedding-prompted-search-ruby"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hwvs/Embedding-Prompted-Search-Ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwvs%2FEmbedding-Prompted-Search-Ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwvs%2FEmbedding-Prompted-Search-Ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwvs%2FEmbedding-Prompted-Search-Ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwvs%2FEmbedding-Prompted-Search-Ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hwvs","download_url":"https://codeload.github.com/hwvs/Embedding-Prompted-Search-Ruby/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwvs%2FEmbedding-Prompted-Search-Ruby/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262614456,"owners_count":23337277,"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","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":"2024-12-01T04:10:48.100Z","updated_at":"2025-06-29T15:04:25.914Z","avatar_url":"https://github.com/hwvs.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Embedding-Prompted-Search-Ruby\n![workflow badge](https://github.com/hwvs/Embedding-Prompted-Search-Ruby/actions/workflows/ruby.yml/badge.svg)\n\nRuby library for searching documents/books using OpenAI API (GPT) to find related embeddings, enabling LLM-based tasks such as answering questions about authors or their books with context provided by the related embeddings.\n\n# Todo\n- Create a \"factory\" or \"builder\" class to do all of the heavy-lifting\n- ~Auto-detect which provider to use for a document based off of MIME/extension?~ (done)\n- Clean up the class names which might not meet Ruby standards\n- **Create more Tests!**\n\n# Usage\n```ruby\n# TODO: Create a Factory to create everything needed\n\n# 1. Obtain the provider for a specific filetype\ndocument_text_provider = DocumentTextProvider.get_provider_for_file(@filename)\n\n# 2. Instantiate a new document model\nsqlite_document_text_model = SQLiteDocumentTextModel.new(DATABASE_PATH, document_text_provider)\n\n# 2.1 Generate the database\nsqlite_document_text_model.build()\n\n# 3. Instantiate a new OpenAI provider with a cache provider\n@open_ai_cache_provider = SQLiteOpenAICacheProvider.new(DATABASE_PATH)\n@open_ai_provider = OpenAIProvider.new(@open_ai_cache_provider)\n\n# 4. Instantiate a new document embeddings model\n@document_embeddings_model = SQLiteDocumentEmbeddingsModel.new(DATABASE_PATH, sqlite_document_text_model, @open_ai_provider)\n\n# 5. Instantiate a new document search model\n@document_search_model = DocumentSearchModel.new(@document_embeddings_model)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhwvs%2Fembedding-prompted-search-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhwvs%2Fembedding-prompted-search-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhwvs%2Fembedding-prompted-search-ruby/lists"}