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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab8f2052c6695abc545b10879f23262d1c444011c28aa60e035fe94e12e62e35
|
4
|
+
data.tar.gz: 21532f0afe7f6bf345da06b89e0e472d6e219eba9a3da0a5387a09a2f3ddbc39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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>
|
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://
|
15
|
-
config.llama_bot_rails.llamabot_api_url = "http://
|
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(
|
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("
|
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("
|
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)
|
data/lib/llama_bot_rails.rb
CHANGED
@@ -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/
|
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.
|
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:
|
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.
|
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.
|