llama_bot_rails 0.1.9 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0850d756a8d86153485d9fdbcb9a0154834e646050da9169b3269d7937d6760f'
4
- data.tar.gz: c5276496549f2b055ec08dbfdf2615b47d431437f1d62845ff8b6c5d8baa0f7c
3
+ metadata.gz: ab8f2052c6695abc545b10879f23262d1c444011c28aa60e035fe94e12e62e35
4
+ data.tar.gz: 21532f0afe7f6bf345da06b89e0e472d6e219eba9a3da0a5387a09a2f3ddbc39
5
5
  SHA512:
6
- metadata.gz: 13c32b136629c642fb149a85197b445495e4c40f80a68402e5b7ab5f76d255b514a5584059df1e9bbe883f68a912c12d9de6811aed4de7f2d55d4ace6f23e432
7
- data.tar.gz: b0d26dad8ee336083c702301c7ba36a6aa5926c65220ea205af6dec0abc941366c4af5de0126ed580251673fc935c693de717dc779ffbe0ba1f0f1d8d82e0dab
6
+ metadata.gz: a4400caf025fb253e8734003046a8256d6dcd6862ef6ddc9b45a3ac7a0a016749ef77eccf5ed9b17d5310ed1029a98af4873737765471d17aa665e0f60c7865c
7
+ data.tar.gz: 5ee28cfaa7c097dcce2fd95490c3721643abc0600cdbb3bd591bb255a2d21c27558810f43194206a10ae4ea0de7ee1ec71e9c5c0c62defb731238751fc8f1dd5
@@ -532,7 +532,7 @@
532
532
  <div class="logo-container">
533
533
  <img src="https://service-jobs-images.s3.us-east-2.amazonaws.com/7rl98t1weu387r43il97h6ipk1l7" alt="LlamaBot Logo" class="logo">
534
534
  </div>
535
- <h1>LlamaBot Chat</h1>
535
+ <h1>Lenny the Llama</h1>
536
536
  </div>
537
537
  <button class="compose-button" onclick="startNewConversation()">
538
538
  <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
data/config/routes.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  LlamaBotRails::Engine.routes.draw do
2
2
  post "agent/command", to: "agent#command"
3
3
  get "agent/chat", to: "agent#chat"
4
+ get "/", to: "agent#chat"
5
+ get "/ws", to: "agent#chat_ws"
4
6
  get "agent/chat_ws", to: "agent#chat_ws"
5
7
  get "agent/threads", to: "agent#threads"
6
8
  get "agent/chat-history/:thread_id", to: "agent#chat_history"
@@ -11,8 +11,8 @@ module LlamaBotRails
11
11
  end
12
12
 
13
13
  config.llama_bot_rails = ActiveSupport::OrderedOptions.new
14
- config.llama_bot_rails.websocket_url = 'ws://localhost:8000/ws' # <-- default
15
- config.llama_bot_rails.llamabot_api_url = "http://localhost:8000"
14
+ config.llama_bot_rails.websocket_url = ENV['LLAMABOT_WEBSOCKET_URL'] || 'ws://llamabot-backend:8000/ws' # <-- default for Docker Compose
15
+ config.llama_bot_rails.llamabot_api_url = ENV['LLAMABOT_API_URL'] || "http://llamabot-backend:8000" # <-- default for Docker Compose
16
16
  config.llama_bot_rails.enable_console_tool = true
17
17
 
18
18
  initializer "llama_bot_rails.assets.precompile" do |app|
@@ -6,7 +6,7 @@ module LlamaBotRails
6
6
  #This class is responsible for initiating HTTP requests to the FastAPI backend that takes us to LangGraph.
7
7
  class LlamaBot
8
8
  def self.get_threads
9
- uri = URI('http://localhost:8000/threads')
9
+ uri = URI("#{Rails.application.config.llama_bot_rails.llamabot_api_url}/threads")
10
10
  response = Net::HTTP.get_response(uri)
11
11
  JSON.parse(response.body)
12
12
  rescue => e
@@ -15,7 +15,7 @@ module LlamaBotRails
15
15
  end
16
16
 
17
17
  def self.get_chat_history(thread_id)
18
- uri = URI("http://localhost:8000/chat-history/#{thread_id}")
18
+ uri = URI("#{Rails.application.config.llama_bot_rails.llamabot_api_url}/chat-history/#{thread_id}")
19
19
  response = Net::HTTP.get_response(uri)
20
20
  JSON.parse(response.body)
21
21
  rescue => e
@@ -26,7 +26,7 @@ module LlamaBotRails
26
26
  def self.send_agent_message(agent_params)
27
27
  return enum_for(__method__, agent_params) unless block_given?
28
28
 
29
- uri = URI("http://localhost:8000/llamabot-chat-message")
29
+ uri = URI("#{Rails.application.config.llama_bot_rails.llamabot_api_url}/llamabot-chat-message")
30
30
  http = Net::HTTP.new(uri.host, uri.port)
31
31
 
32
32
  request = Net::HTTP::Post.new(uri)
@@ -1,3 +1,3 @@
1
1
  module LlamaBotRails
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.11"
3
3
  end
@@ -1,7 +1,9 @@
1
1
  require "llama_bot_rails/version"
2
2
  require "llama_bot_rails/engine"
3
+
4
+ # require "llama_bot_rails/railtie" # We don't need this, as we're loading the LlamaBot path directly in the engine.
3
5
  require "llama_bot_rails/llama_bot"
4
- require "llama_bot_rails/railtie"
6
+ require "llama_bot_rails/agent_state_builder"
5
7
 
6
8
  module LlamaBotRails
7
9
  class << self
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: llama_bot_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kody Kendall
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2025-07-11 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: rails
@@ -138,6 +139,7 @@ licenses:
138
139
  - MIT
139
140
  metadata:
140
141
  homepage_uri: https://llamapress.ai
142
+ post_install_message:
141
143
  rdoc_options: []
142
144
  require_paths:
143
145
  - lib
@@ -152,7 +154,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
154
  - !ruby/object:Gem::Version
153
155
  version: '0'
154
156
  requirements: []
155
- rubygems_version: 3.6.7
157
+ rubygems_version: 3.5.16
158
+ signing_key:
156
159
  specification_version: 4
157
160
  summary: LlamaBotRails is a gem that turns your existing Rails App into an AI Agent
158
161
  by connecting it to an open source LangGraph agent, LlamaBot.