[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7800":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":47,"readmeContent":48,"aiSummary":49,"trendingCount":16,"starSnapshotCount":16,"syncStatus":50,"lastSyncTime":51,"discoverSource":52},7800,"ruby_llm","crmne\u002Fruby_llm","crmne","A single, beautiful Ruby framework for all major AI providers. Easily build chatbots, AI agents, RAG applications, content generators, and every AI workflow you can think of.","https:\u002F\u002Frubyllm.com\u002F",null,"Ruby",4000,452,34,48,0,7,19,87,31,92.17,"MIT License",false,"main",true,[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"agents","ai","anthropic","chatgpt","claude","deepseek","embeddings","gemini","gpustack","image-generation","llm","mistral","ollama","openai","openrouter","perplexity","rails","ruby","vertex-ai","xai","2026-06-12 04:00:35","\u003Cdiv align=\"center\">\n\n\u003Cpicture>\n  \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"\u002Fdocs\u002Fassets\u002Fimages\u002Flogotype_dark.svg\">\n  \u003Cimg src=\"\u002Fdocs\u002Fassets\u002Fimages\u002Flogotype.svg\" alt=\"RubyLLM\" height=\"120\" width=\"250\">\n\u003C\u002Fpicture>\n\n\u003Cstrong>One *beautiful* Ruby API for GPT, Claude, Gemini, and more.\u003C\u002Fstrong>\n\nBattle tested at [\u003Cpicture>\u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fchatwithwork.com\u002Flogotype-dark.svg\">\u003Cimg src=\"https:\u002F\u002Fchatwithwork.com\u002Flogotype.svg\" alt=\"Chat with Work\" height=\"30\" align=\"absmiddle\">\u003C\u002Fpicture>](https:\u002F\u002Fchatwithwork.com) — *Your AI coworker*\n\n[![Gem Version](https:\u002F\u002Fbadge.fury.io\u002Frb\u002Fruby_llm.svg)](https:\u002F\u002Fbadge.fury.io\u002Frb\u002Fruby_llm)\n[![Ruby Style Guide](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcode_style-rubocop-brightgreen.svg)](https:\u002F\u002Fgithub.com\u002Frubocop\u002Frubocop)\n[![Gem Downloads](https:\u002F\u002Fimg.shields.io\u002Fgem\u002Fdt\u002Fruby_llm)](https:\u002F\u002Frubygems.org\u002Fgems\u002Fruby_llm)\n[![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fcrmne\u002Fruby_llm\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fcrmne\u002Fruby_llm)\n\n\u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F13640\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Ftrendshift.io\u002Fapi\u002Fbadge\u002Frepositories\u002F13640\" alt=\"crmne%2Fruby_llm | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"\u002F>\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n> [!NOTE]\n> Using RubyLLM? [Share your story](https:\u002F\u002Ftally.so\u002Fr\u002F3Na02p)! Takes 5 minutes.\n\n---\n\nBuild chatbots, AI agents, RAG applications. Works with OpenAI, xAI, Anthropic, Google, AWS, local models, and any OpenAI-compatible API.\n\n## From zero to AI chat app in under two minutes\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F65422091-9338-47da-a303-92b918bd1345\n\n## Why RubyLLM?\n\nEvery AI provider ships their own bloated client. Different APIs. Different response formats. Different conventions. It's exhausting.\n\nRubyLLM gives you one beautiful API for all of them. Same interface whether you're using GPT, Claude, or your local Ollama. Just three dependencies: Faraday, Zeitwerk, and Marcel. That's it.\n\n## Show me the code\n\n```ruby\n# Just ask questions\nchat = RubyLLM.chat\nchat.ask \"What's the best way to learn Ruby?\"\n```\n\n```ruby\n# Analyze any file type\nchat.ask \"What's in this image?\", with: \"ruby_conf.jpg\"\nchat.ask \"What's happening in this video?\", with: \"video.mp4\"\nchat.ask \"Describe this meeting\", with: \"meeting.wav\"\nchat.ask \"Summarize this document\", with: \"contract.pdf\"\nchat.ask \"Explain this code\", with: \"app.rb\"\n```\n\n```ruby\n# Multiple files at once\nchat.ask \"Analyze these files\", with: [\"diagram.png\", \"report.pdf\", \"notes.txt\"]\n```\n\n```ruby\n# Stream responses\nchat.ask \"Tell me a story about Ruby\" do |chunk|\n  print chunk.content\nend\n```\n\n```ruby\n# Generate images\nRubyLLM.paint \"a sunset over mountains in watercolor style\"\n```\n\n```ruby\n# Create embeddings\nRubyLLM.embed \"Ruby is elegant and expressive\"\n```\n\n```ruby\n# Transcribe audio to text\nRubyLLM.transcribe \"meeting.wav\"\n```\n\n```ruby\n# Moderate content for safety\nRubyLLM.moderate \"Check if this text is safe\"\n```\n\n```ruby\n# Let AI use your code\nclass Weather \u003C RubyLLM::Tool\n  desc \"Get current weather\"\n\n  def execute(latitude:, longitude:)\n    url = \"https:\u002F\u002Fapi.open-meteo.com\u002Fv1\u002Fforecast?latitude=#{latitude}&longitude=#{longitude}&current=temperature_2m,wind_speed_10m\"\n    JSON.parse(Faraday.get(url).body)\n  end\nend\n\nchat.with_tool(Weather).ask \"What's the weather in Berlin?\"\n```\n\n```ruby\n# Define an agent with instructions + tools\nclass WeatherAssistant \u003C RubyLLM::Agent\n  model \"gpt-5-nano\"\n  instructions \"Be concise and always use tools for weather.\"\n  tools Weather\nend\n\nWeatherAssistant.new.ask \"What's the weather in Berlin?\"\n```\n\n```ruby\n# Get structured output\nclass ProductSchema \u003C RubyLLM::Schema\n  string :name\n  number :price\n  array :features do\n    string\n  end\nend\n\nresponse = chat.with_schema(ProductSchema).ask \"Analyze this product\", with: \"product.txt\"\n```\n\n## Features\n\n* **Chat:** Conversational AI with `RubyLLM.chat`\n* **Vision:** Analyze images and videos\n* **Audio:** Transcribe and understand speech with `RubyLLM.transcribe`\n* **Documents:** Extract from PDFs, CSVs, JSON, any file type\n* **Image generation:** Create images with `RubyLLM.paint`\n* **Embeddings:** Generate embeddings with `RubyLLM.embed`\n* **Moderation:** Content safety with `RubyLLM.moderate`\n* **Tools:** Let AI call your Ruby methods\n* **Agents:** Reusable assistants with `RubyLLM::Agent`\n* **Structured output:** JSON schemas that just work\n* **Streaming:** Real-time responses with blocks\n* **Rails:** ActiveRecord integration with `acts_as_chat`\n* **Async:** Fiber-based concurrency\n* **Model registry:** 800+ models with capability detection and pricing\n* **Extended thinking:** Control, view, and persist model deliberation\n* **Providers:** OpenAI, xAI, Anthropic, Gemini, VertexAI, Bedrock, DeepSeek, Mistral, Ollama, OpenRouter, Perplexity, GPUStack, and any OpenAI-compatible API\n\n## Installation\n\nAdd to your Gemfile:\n```ruby\ngem 'ruby_llm'\n```\nThen `bundle install`.\n\nConfigure your API keys:\n```ruby\n# config\u002Finitializers\u002Fruby_llm.rb\nRubyLLM.configure do |config|\n  config.openai_api_key = ENV['OPENAI_API_KEY']\nend\n```\n\n## Rails\n\n```bash\n# Install Rails Integration\nbin\u002Frails generate ruby_llm:install\nbin\u002Frails db:migrate\nbin\u002Frails ruby_llm:load_models # v1.13+\n\n# Add Chat UI (optional)\nbin\u002Frails generate ruby_llm:chat_ui\n```\n\n```ruby\nclass Chat \u003C ApplicationRecord\n  acts_as_chat\nend\n\nchat = Chat.create! model: \"claude-sonnet-4\"\nchat.ask \"What's in this file?\", with: \"report.pdf\"\n```\n\nVisit `http:\u002F\u002Flocalhost:3000\u002Fchats` for a ready-to-use chat interface!\n\n## Documentation\n\n[rubyllm.com](https:\u002F\u002Frubyllm.com)\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\nReleased under the MIT License.\n","ruby_llm 是一个为多种AI服务提供统一接口的Ruby库，支持OpenAI、Anthropic、Gemini等主流AI平台。其核心功能包括聊天机器人构建、内容生成与分析（文本、图像、音频、视频）、嵌入式向量生成及流式响应处理，并且能够无缝集成到Rails应用中。通过简洁一致的API设计，开发者可以轻松地在不同AI服务间切换而无需修改大量代码。该项目特别适合需要快速开发跨平台AI应用或希望简化多供应商AI技术栈管理的场景。",2,"2026-06-11 03:14:28","top_language"]