inloop-brain 0.0.11 → 0.0.12

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/bin/inloop-brain +6 -3
  4. metadata +18 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63a22296f9b842b76e08629bc34d7dc55549797dac27be173bd94480565d228d
4
- data.tar.gz: '00917e8d39099aa4f89822ee2bd8ecd1b65efc144ba9b33c0f2e5601c6bb1e07'
3
+ metadata.gz: 5f176e6091ddf3dd8c04abd0e693dbde1ad2151832f56ae0662c7eb8a83f9e43
4
+ data.tar.gz: 0d92f3cf02bdca00ae092314ecd137ede5c6743cda542122f6e62fc558c24767
5
5
  SHA512:
6
- metadata.gz: 8a27bc384123ca10b73627b63cde039a6c74f41a46c89861e347a03607b9e887687eb655fa2de049a80900907d2bd3ad6f1cbe71663e9b81e75213ac6493b60c
7
- data.tar.gz: 1fbb8b52826ef7d4b009c8d61d80c41132d20173d90221d107aea4975a8129cd17e188c979470cc4d2e04aeb65bb187d971c7bab80875c945c0507ecf15abecb
6
+ metadata.gz: b4d126455788c3879674df89b3ba85266e200b68f3509d6f8eebbf373df72b2624f0e908cdfca7d3ea98108d59466b79a84f4ec12feb0059e3491790515ddd99
7
+ data.tar.gz: 26aa271479335d9a53ab499f2b533a917ee2984ac9ea95a658e6c7314a4648788aee6c3368185a974108dc028513eee2e7654685fc26f8be4779eb67b512fea4
data/README.md CHANGED
@@ -29,7 +29,7 @@ echo "What can you do?" | inloop-brain -k YOUR_API_KEY > output.txt
29
29
  Use an API key generated from the Brain API share link in app.inloop.studio. The API uses the published `llms.txt` context when available.
30
30
 
31
31
  - `INLOOP_BRAIN_API_KEY`: API key used for Authorization (recommended)
32
- - `INLOOP_BRAIN_API_URL`: Full API URL (default: https://app.inloop.studio/api/v1/chat/completions)
32
+ - `INLOOP_BRAIN_API_URL`: Full API URL (default: https://app.inloop.studio/v1/chat/completions)
33
33
  - `INLOOP_BRAIN_MODEL`: Model name to send (default: inloop-brain)
34
34
  - `INLOOP_BRAIN_HOST`: Host override (default: app.inloop.studio)
35
35
  - `INLOOP_BRAIN_PROTOCOL`: Protocol override (default: https)
data/bin/inloop-brain CHANGED
@@ -8,8 +8,11 @@ require 'optparse'
8
8
  require 'net/http'
9
9
  require 'uri'
10
10
  require 'json'
11
+ require 'dotenv'
11
12
  require 'inloop_brain/ssl'
12
13
 
14
+ Dotenv.load
15
+
13
16
  # Parse command line options
14
17
  options = {}
15
18
  parser = OptionParser.new do |opts|
@@ -23,7 +26,7 @@ parser = OptionParser.new do |opts|
23
26
  opts.on('--system=TEXT', 'System prompt to prepend to the conversation') do |text|
24
27
  options[:system] = text
25
28
  end
26
- opts.on('--api-url=URL', 'Override API URL (default: https://app.inloop.studio/api/v1/chat/completions)') do |url|
29
+ opts.on('--api-url=URL', 'Override API URL (default: https://app.inloop.studio/v1/chat/completions)') do |url|
27
30
  options[:api_url] = url
28
31
  end
29
32
  opts.on('-d', '--debug', 'Enable debug mode') do
@@ -65,7 +68,7 @@ api_url = options[:api_url] || ENV['INLOOP_BRAIN_API_URL']
65
68
  if api_url.nil? || api_url.strip.empty?
66
69
  host = ENV['INLOOP_BRAIN_HOST'] || 'app.inloop.studio'
67
70
  protocol = ENV['INLOOP_BRAIN_PROTOCOL'] || 'https'
68
- api_url = "#{protocol}://#{host}/api/v1/chat/completions"
71
+ api_url = "#{protocol}://#{host}/v1/chat/completions"
69
72
  end
70
73
  uri = URI.parse(api_url)
71
74
 
@@ -157,7 +160,7 @@ begin
157
160
  else
158
161
  message = nil
159
162
  if payload.is_a?(Hash)
160
- message = payload.dig("error", "message")
163
+ message = payload.dig("error", "message") if payload["error"].is_a?(Hash)
161
164
  message ||= payload["error"] if payload["error"].is_a?(String)
162
165
  message ||= payload["message"]
163
166
  elsif payload.is_a?(String)
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inloop-brain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abhishek Parolkar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-02-09 00:00:00.000000000 Z
11
+ date: 2026-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: dotenv
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -61,7 +75,7 @@ dependencies:
61
75
  description: A simple command-line tool that sends prompts to the Inloop Brain Access
62
76
  Kit API and returns responses
63
77
  email:
64
- - abhishek@inloop.studio
78
+ - abhishek@parolkar.com
65
79
  executables:
66
80
  - inloop-brain
67
81
  extensions: []
@@ -93,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
107
  - !ruby/object:Gem::Version
94
108
  version: '0'
95
109
  requirements: []
96
- rubygems_version: 3.4.19
110
+ rubygems_version: 3.5.22
97
111
  signing_key:
98
112
  specification_version: 4
99
113
  summary: Command-line interface for the Inloop Brain Access Kit