{"repo":"hiremav/spectre","free":true,"listed":false,"github":"https://github.com/hiremav/spectre","clone":"git clone https://github.com/hiremav/spectre.git","description":"Spectre is a Ruby gem that makes it easy to AI-enable your Ruby on Rails application.","language":"Ruby","stars":28,"topics":["ai","llm","mongodb","ruby","ruby-on-rails"],"license":null,"category":"ai-agents","readme_excerpt":"Spectre is a Ruby gem that makes it easy to AI-enable your Ruby on Rails application. Currently, Spectre focuses on helping developers create embeddings, perform vector-based searches, create chat completions, and manage dynamic prompts — ideal for applications that are featuring RAG (Retrieval-Augmented Generation), chatbots and dynamic prompts. Compatibility Feature Compatibility ------------------------- ------------------------ Foundation Models (LLM) OpenAI, Ollama, Claude, Gemini Embeddings OpenAI, Ollama, Gemini Vector Searching MongoDB Atlas Prompt Templates ✅ 💡 Note: We now support OpenAI, Ollama, Claude, and Gemini. Next, we'll add support for additional providers (e.g., Cohere) and more vector databases (Pgvector, Pinecone, etc.). If you're looking for something a bit more extensible, we highly recommend checking out langchainrb. Installation Add this line to your application's Gemfile: And then execute: Or install it yourself as: Usage 🔧 Configuration First, you’ll need to generate the initializer. Run the following command to create the initializer: This will create a file at config/initializers/spectre.rb , where you can set your llm provider and configure the provider-specific settings. 📡 Embeddings & Vector Search For Embedding To use Spectre for generating embeddings in your Rails model, follow these steps: 1. Include the Spectre module. 2. Declare the model as embeddable. 3. Define the embeddable fields. Here is an example of how to set this up in a model","default_branch":null,"files":null,"tree":[],"storefront":"/r/hiremav","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/hiremav/spectre/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}