multiwoven-integrations 0.43.4 → 0.43.5

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: ecf2fa7bbd831e1ea77bf61ca36f9d2daedeb36c7aa1c58c8a338541cc0b3634
4
- data.tar.gz: d04571851a2b2c1c740191a51abdfbd98ef36d199587a159c084d260c2164d4b
3
+ metadata.gz: 4bd88d781a843b2eba495c4bfbdc2b500959e500e2353e573aa7683d61e455eb
4
+ data.tar.gz: 927a30002241a9f3968060e9c7bf47470d16a7f5c5d1f56cdff26af8eab526a8
5
5
  SHA512:
6
- metadata.gz: 9d961d5d255f7b2f2621ed269cad521c7baf203f4f975ca8a9a61af0ec96c32a7e15f24c8cc10ebe1c99d15592e2829ea18f29319a60a21ace58699407519bd6
7
- data.tar.gz: a27914b0f2b5fcfd156aad9f2ed42c8942ba1e5223f41b5bf5eb731cd333d0769047ce33ff1b45a532f7085c7a2f455244832921ad3df2cae97428f9ad6133e7
6
+ metadata.gz: d1dc54cd478b970024017d1f37fd20953b9d422f1d81f75fb1a29a3b12dd23282b66366fcae454ed834bb58d61b76610ee3ddc83bf130988942a3151e01d950e
7
+ data.tar.gz: e1dce10a478a5faef77ac88c84bef309e451b23e1539e4afe0de199d3f3fe1aa2e00db35011abef21c4cb0a99d3c6b5e6e8a01826b1b66932f87398bfa12d39c
@@ -124,7 +124,8 @@ module Multiwoven
124
124
  }.freeze
125
125
 
126
126
  # Aisquared Bolt
127
- AISQUARED_BOLT_URL = ENV["LIGHTNING_URL"]
127
+ AISQUARED_CHAT_ENDPOINT_URL = ENV["AISQUARED_CHAT_ENDPOINT_URL"]
128
+ AISQUARED_BOLT_API_KEY = ENV["AISQUARED_BOLT_API_KEY"]
128
129
 
129
130
  # Microsoft Graph
130
131
  MICROSOFT_GRAPH_BASE = "https://graph.microsoft.com/v1.0"
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Multiwoven
4
4
  module Integrations
5
- VERSION = "0.43.4"
5
+ VERSION = "0.43.5"
6
6
 
7
7
  ENABLED_SOURCES = %w[
8
8
  Snowflake
@@ -7,7 +7,7 @@ module Multiwoven::Integrations::Source
7
7
  class AisquaredError < StandardError; end
8
8
 
9
9
  def check_connection(connection_config)
10
- response = make_request(lightning_embedding_url, HTTP_POST, connection_config[:request_format], connection_config)
10
+ response = make_request(chat_endpoint_url, HTTP_POST, connection_config[:request_format], connection_config)
11
11
  success?(response) ? success_status : failure_status_from_response(response)
12
12
  rescue StandardError => e
13
13
  handle_exception(e, { context: "AISQUARED_BOLT:CHECK_CONNECTION:EXCEPTION", type: "error" })
@@ -40,11 +40,18 @@ module Multiwoven::Integrations::Source
40
40
  super && !embedding_model?(model)
41
41
  end
42
42
 
43
- def lightning_embedding_url
44
- host = AISQUARED_BOLT_URL.to_s.strip
45
- raise AisquaredError, "AISQUARED_BOLT_URL is not configured" if host.empty?
43
+ def chat_endpoint_url
44
+ host = AISQUARED_CHAT_ENDPOINT_URL.to_s.strip
45
+ raise AisquaredError, "AISQUARED_CHAT_ENDPOINT_URL is not configured" if host.empty?
46
46
 
47
- "http://#{host.sub(%r{\Ahttps?://}, "")}/chat"
47
+ host
48
+ end
49
+
50
+ def api_key
51
+ key = AISQUARED_BOLT_API_KEY.to_s.strip
52
+ raise AisquaredError, "AISQUARED_BOLT_API_KEY is not configured" if key.empty?
53
+
54
+ key
48
55
  end
49
56
 
50
57
  def parse_json(json_string)
@@ -60,13 +67,13 @@ module Multiwoven::Integrations::Source
60
67
  url: url,
61
68
  http_method: http_method,
62
69
  payload: JSON.parse(payload),
63
- headers: { "Content-Type" => "application/json" }
70
+ headers: { "Content-Type" => "application/json", "Authorization" => "Bearer #{api_key}" }
64
71
  )
65
72
  end
66
73
 
67
74
  # TODO: Add support for streaming when Lightning Endpoint supports it.
68
75
  def run_model(connection_config, payload)
69
- response = make_request(lightning_embedding_url, HTTP_POST, payload, connection_config)
76
+ response = make_request(chat_endpoint_url, HTTP_POST, payload, connection_config)
70
77
  process_response(response)
71
78
  rescue StandardError => e
72
79
  handle_exception(e, { context: "AISQUARED_BOLT:RUN_MODEL:EXCEPTION", type: "error" })
@@ -9,8 +9,8 @@
9
9
  "Text Generation",
10
10
  "Reasoning"
11
11
  ],
12
- "context_window": 128000,
13
- "max_output": 16384,
12
+ "context_window": 131000,
13
+ "max_output": 131000,
14
14
  "pricing": {
15
15
  "input": 0.0,
16
16
  "output": 0.0,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multiwoven-integrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.43.4
4
+ version: 0.43.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Subin T P