multiwoven-integrations 0.24.2 → 0.26.0
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 +4 -4
- data/lib/multiwoven/integrations/destination/qdrant/client.rb +184 -0
- data/lib/multiwoven/integrations/destination/qdrant/config/meta.json +15 -0
- data/lib/multiwoven/integrations/destination/qdrant/config/spec.json +23 -0
- data/lib/multiwoven/integrations/destination/qdrant/icon.svg +1 -0
- data/lib/multiwoven/integrations/rollout.rb +3 -1
- data/lib/multiwoven/integrations/source/generic_open_ai/client.rb +118 -0
- data/lib/multiwoven/integrations/source/generic_open_ai/config/catalog.json +6 -0
- data/lib/multiwoven/integrations/source/generic_open_ai/config/meta.json +15 -0
- data/lib/multiwoven/integrations/source/generic_open_ai/config/spec.json +63 -0
- data/lib/multiwoven/integrations/source/generic_open_ai/icon.svg +6 -0
- data/lib/multiwoven/integrations.rb +2 -0
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9a97f8e29b1319b13c9828b58874c459aa1775834471212e067b50c37c89f45
|
4
|
+
data.tar.gz: 4cca3dd890240b8d831a7ef100ed99e6961c142bb4202631f2022d655692e13c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4e91d96513b9b53a274b15a831d811f3e23e8d0b4958ed24a6914ca77d3b961c7389a7a2cdaae60546906e0abe68e772a678ad618f13e7b50ae9fd388379e32
|
7
|
+
data.tar.gz: 480de5e8ea3d1f6cf93457f4d7717ab8ae4cbae939d704cbd7a3403412c8c452b6e877b40fe91ac33baa1fad71ca21cfc4623fceb62fa7e5c46628dfca83d7e4
|
@@ -0,0 +1,184 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Multiwoven::Integrations::Destination
|
4
|
+
module Qdrant
|
5
|
+
include Multiwoven::Integrations::Core
|
6
|
+
class Client < DestinationConnector
|
7
|
+
def check_connection(connection_config)
|
8
|
+
connection_config = connection_config.with_indifferent_access
|
9
|
+
api_url = connection_config[:api_url]
|
10
|
+
api_key = connection_config[:api_key]
|
11
|
+
|
12
|
+
response = Multiwoven::Integrations::Core::HttpClient.request(
|
13
|
+
api_url,
|
14
|
+
HTTP_GET,
|
15
|
+
headers: auth_headers(api_key)
|
16
|
+
)
|
17
|
+
if success?(response)
|
18
|
+
success_status
|
19
|
+
else
|
20
|
+
failure_status(nil)
|
21
|
+
end
|
22
|
+
rescue StandardError => e
|
23
|
+
handle_exception(e, {
|
24
|
+
context: "QDRANT:CHECK_CONNECTION:EXCEPTION",
|
25
|
+
type: "error"
|
26
|
+
})
|
27
|
+
failure_status(e)
|
28
|
+
end
|
29
|
+
|
30
|
+
def discover(connection_config = nil)
|
31
|
+
connection_config = connection_config.with_indifferent_access
|
32
|
+
@api_url = connection_config[:api_url]
|
33
|
+
@api_key = connection_config[:api_key]
|
34
|
+
|
35
|
+
response = Multiwoven::Integrations::Core::HttpClient.request(
|
36
|
+
"#{@api_url}/collections",
|
37
|
+
HTTP_GET,
|
38
|
+
headers: auth_headers(@api_key)
|
39
|
+
)
|
40
|
+
|
41
|
+
data = JSON.parse(response.body)
|
42
|
+
catalog = build_catalog(data)
|
43
|
+
catalog.to_multiwoven_message
|
44
|
+
rescue StandardError => e
|
45
|
+
handle_exception(e, {
|
46
|
+
context: "QDRANT:DISCOVER:EXCEPTION",
|
47
|
+
type: "error"
|
48
|
+
})
|
49
|
+
end
|
50
|
+
|
51
|
+
def write(sync_config, records, _action = "upsert")
|
52
|
+
connection_config = sync_config.destination.connection_specification.with_indifferent_access
|
53
|
+
collection_name = sync_config.stream.name
|
54
|
+
primary_key = sync_config.model.primary_key
|
55
|
+
log_message_array = []
|
56
|
+
|
57
|
+
api_url = connection_config[:api_url]
|
58
|
+
api_key = connection_config[:api_key]
|
59
|
+
|
60
|
+
write_success = 0
|
61
|
+
write_failure = 0
|
62
|
+
records.each do |record|
|
63
|
+
points = []
|
64
|
+
points.push({
|
65
|
+
id: record[primary_key],
|
66
|
+
vector: JSON.parse(record["vector"]),
|
67
|
+
payload: record["payload"]
|
68
|
+
})
|
69
|
+
begin
|
70
|
+
response = upsert_points(api_url, api_key, collection_name, { points: points })
|
71
|
+
if success?(response)
|
72
|
+
write_success += 1
|
73
|
+
log_message_array << log_request_response("info", { points: points }, JSON.parse(response.body))
|
74
|
+
else
|
75
|
+
# write_failure could be duplicated if JSON.parse errors.
|
76
|
+
write_failure += 1
|
77
|
+
log_message_array << log_request_response("error", { points: points }, JSON.parse(response.body))
|
78
|
+
end
|
79
|
+
rescue StandardError => e
|
80
|
+
handle_exception(e, {
|
81
|
+
context: "QDRANT:RECORD:WRITE:EXCEPTION",
|
82
|
+
type: "error",
|
83
|
+
sync_id: sync_config.sync_id,
|
84
|
+
sync_run_id: sync_config.sync_run_id
|
85
|
+
})
|
86
|
+
write_failure += 1
|
87
|
+
log_message_array << log_request_response("error", { points: points }, e.message)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
tracking_message(write_success, write_failure, log_message_array)
|
91
|
+
rescue StandardError => e
|
92
|
+
handle_exception(e, {
|
93
|
+
context: "QDRANT:RECORD:WRITE:EXCEPTION",
|
94
|
+
type: "error",
|
95
|
+
sync_id: sync_config.sync_id,
|
96
|
+
sync_run_id: sync_config.sync_run_id
|
97
|
+
})
|
98
|
+
end
|
99
|
+
|
100
|
+
private
|
101
|
+
|
102
|
+
def upsert_points(api_url, api_key, collection_name, payload)
|
103
|
+
Multiwoven::Integrations::Core::HttpClient.request(
|
104
|
+
api_url + "/collections/#{collection_name}/points",
|
105
|
+
HTTP_PUT,
|
106
|
+
payload: payload,
|
107
|
+
headers: auth_headers(api_key)
|
108
|
+
)
|
109
|
+
end
|
110
|
+
|
111
|
+
def build_catalog(data)
|
112
|
+
streams = data["result"]["collections"].map { |collection| build_stream(collection) }
|
113
|
+
Multiwoven::Integrations::Protocol::Catalog.new(
|
114
|
+
streams: streams,
|
115
|
+
request_rate_limit: 60,
|
116
|
+
request_rate_limit_unit: "minute",
|
117
|
+
request_rate_concurrency: 10
|
118
|
+
)
|
119
|
+
end
|
120
|
+
|
121
|
+
def build_stream(collection)
|
122
|
+
response = Multiwoven::Integrations::Core::HttpClient.request(
|
123
|
+
"#{@api_url}/collections/#{collection["name"]}",
|
124
|
+
HTTP_GET,
|
125
|
+
headers: auth_headers(@api_key)
|
126
|
+
)
|
127
|
+
|
128
|
+
payload = { "type" => "object", "properties" => {} }
|
129
|
+
if success?(response)
|
130
|
+
data = JSON.parse(response.body)
|
131
|
+
payload_schema = data["result"]["payload_schema"]
|
132
|
+
payload_schema.each { |key, value| payload["properties"][key] = map_qdrant_types(value) } unless payload_schema.empty?
|
133
|
+
end
|
134
|
+
|
135
|
+
Multiwoven::Integrations::Protocol::Stream.new(
|
136
|
+
name: collection["name"],
|
137
|
+
action: "update",
|
138
|
+
method: HTTP_PUT,
|
139
|
+
supported_sync_modes: %w[incremental],
|
140
|
+
json_schema: {
|
141
|
+
"type" => "object",
|
142
|
+
"required" => %w[id vector payload],
|
143
|
+
"properties" => {
|
144
|
+
"id" => {
|
145
|
+
"type" => "string"
|
146
|
+
},
|
147
|
+
"payload" => payload,
|
148
|
+
"vector" => {
|
149
|
+
"type" => "vector"
|
150
|
+
}
|
151
|
+
}
|
152
|
+
}
|
153
|
+
)
|
154
|
+
end
|
155
|
+
|
156
|
+
def map_qdrant_types(value)
|
157
|
+
case value["data_type"]
|
158
|
+
when "integer"
|
159
|
+
{ "type" => "integer" }
|
160
|
+
when "float"
|
161
|
+
{ "type" => "number" }
|
162
|
+
when "bool"
|
163
|
+
{ "type" => "boolean" }
|
164
|
+
when "geo"
|
165
|
+
{
|
166
|
+
"type" => "object",
|
167
|
+
"required" => %w[lon lat],
|
168
|
+
"properties" => {
|
169
|
+
"lon" => {
|
170
|
+
"type" => "number"
|
171
|
+
},
|
172
|
+
"lat" => {
|
173
|
+
"type" => "number"
|
174
|
+
}
|
175
|
+
}
|
176
|
+
}
|
177
|
+
else
|
178
|
+
# datetime, keyword, text, uuid
|
179
|
+
{ "type" => "string" }
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"data": {
|
3
|
+
"name": "Qdrant",
|
4
|
+
"title": "Qdrant",
|
5
|
+
"connector_type": "destination",
|
6
|
+
"category": "Database",
|
7
|
+
"documentation_url": "https://docs.squared.ai/guides/destinations/retl-destinations/database/qdrant",
|
8
|
+
"github_issue_label": "destination-qdrant",
|
9
|
+
"icon": "icon.svg",
|
10
|
+
"license": "MIT",
|
11
|
+
"release_stage": "alpha",
|
12
|
+
"support_level": "community",
|
13
|
+
"tags": ["language:ruby", "multiwoven"]
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
{
|
2
|
+
"documentation_url": "https://docs.squared.ai/guides/destinations/retl-destinations/database/qdrant",
|
3
|
+
"stream_type": "dynamic",
|
4
|
+
"connection_specification": {
|
5
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
6
|
+
"title": "Qdrant",
|
7
|
+
"type": "object",
|
8
|
+
"required": ["api_url", "api_key"],
|
9
|
+
"properties": {
|
10
|
+
"api_url": {
|
11
|
+
"type": "string",
|
12
|
+
"title": "API Url",
|
13
|
+
"order": 0
|
14
|
+
},
|
15
|
+
"api_key": {
|
16
|
+
"type": "string",
|
17
|
+
"multiwoven_secret": true,
|
18
|
+
"title": "API Key",
|
19
|
+
"order": 1
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 451.84 152.4" width="451.84" height="152.4" fill="none"><g fill="#dc244c"><path d="M212.69 116c0 5.523-4.477 10.001-10 10.001h-6.836v-7.808h-.244c-.732 1.057-1.708 2.155-2.928 3.293-1.139 1.058-2.521 2.034-4.148 2.929-1.545.894-3.294 1.626-5.246 2.196a20.015 20.015 0 0 1-5.856.853c-4.392 0-8.377-.732-11.956-2.196-3.579-1.545-6.669-3.66-9.272-6.344-2.521-2.765-4.473-6.018-5.856-9.759-1.383-3.742-2.074-7.849-2.074-12.322 0-4.148.61-8.093 1.83-11.835 1.301-3.822 3.091-7.198 5.368-10.126a26.176 26.176 0 0 1 8.54-6.954c3.335-1.789 7.117-2.683 11.346-2.683 3.823 0 7.361.61 10.614 1.83 3.335 1.138 6.059 3.13 8.174 5.978h.244V43.769c0-5.523 4.477-10 10-10h8.3zm-16.836-19.646c0-4.473-1.301-8.092-3.904-10.858-2.521-2.765-6.1-4.148-10.736-4.148s-8.255 1.383-10.858 4.148c-2.521 2.766-3.782 6.385-3.782 10.858 0 4.474 1.261 8.093 3.782 10.858 2.603 2.766 6.222 4.149 10.858 4.149s8.215-1.383 10.736-4.149c2.603-2.765 3.904-6.384 3.904-10.858zM224.53 76.708c0-5.522 4.477-10 10-10h8.3v9.516h.244c1.952-3.66 4.27-6.384 6.954-8.174 2.684-1.87 6.059-2.805 10.126-2.805 1.057 0 2.114.04 3.172.121 1.057.082 2.033.245 2.928.489v16.713a22.4 22.4 0 0 0-3.904-.854 19.895 19.895 0 0 0-3.904-.367c-3.498 0-6.263.489-8.296 1.465-2.034.975-3.62 2.358-4.758 4.147-1.058 1.708-1.749 3.782-2.074 6.222-.326 2.441-.488 5.124-.488 8.052V116c0 5.524-4.477 10.002-10 10.002h-8.3zM310.64 118.56h-.244c-2.033 3.172-4.758 5.449-8.174 6.832-3.334 1.382-6.872 2.073-10.614 2.073-2.765 0-5.449-.406-8.052-1.219-2.521-.732-4.758-1.871-6.71-3.416-1.952-1.546-3.497-3.457-4.636-5.735-1.138-2.277-1.708-4.92-1.708-7.929 0-3.416.61-6.304 1.83-8.662 1.302-2.359 3.01-4.311 5.124-5.856 2.196-1.546 4.677-2.725 7.442-3.538a50.076 50.076 0 0 1 8.54-1.953c3.01-.406 5.978-.65 8.906-.732 3.01-.081 5.775-.121 8.296-.121 0-3.254-1.179-5.816-3.538-7.687-2.277-1.952-5.002-2.928-8.174-2.928-3.009 0-5.774.651-8.296 1.952-2.44 1.221-4.636 2.929-6.588 5.124l-9.76-10.004c3.416-3.171 7.402-5.53 11.956-7.075a41.766 41.766 0 0 1 14.152-2.44c5.368 0 9.76.69 13.176 2.073 3.498 1.302 6.263 3.254 8.296 5.856 2.115 2.603 3.579 5.816 4.392 9.638.814 3.742 1.22 8.093 1.22 13.054v20.135c0 5.522-4.477 10-10 10h-6.836zm-4.514-18.545c-1.382 0-3.131.082-5.246.244a24.865 24.865 0 0 0-5.978.976c-1.87.57-3.497 1.424-4.88 2.562-1.301 1.139-1.952 2.725-1.952 4.759 0 2.196.936 3.822 2.806 4.879 1.871 1.058 3.823 1.586 5.856 1.586 1.79 0 3.498-.244 5.124-.732 1.708-.488 3.213-1.179 4.514-2.074a9.45 9.45 0 0 0 3.05-3.416c.814-1.382 1.22-3.009 1.22-4.879v-3.905zM340.18 76.708c0-5.522 4.477-10 10-10h7.568v8.052h.244c.569-1.138 1.382-2.277 2.44-3.416 1.057-1.138 2.318-2.155 3.782-3.05s3.131-1.626 5.002-2.195c1.87-.57 3.904-.854 6.1-.854 4.636 0 8.377.732 11.224 2.196 2.846 1.382 5.042 3.334 6.588 5.855 1.626 2.522 2.724 5.49 3.294 8.906.569 3.416.854 7.117.854 11.103V116c0 5.523-4.477 10.001-10 10.001h-8.3V96.964a58.2 58.2 0 0 0-.244-5.246c-.082-1.87-.448-3.578-1.098-5.123a8.154 8.154 0 0 0-2.806-3.783c-1.22-.976-3.01-1.464-5.368-1.464-2.359 0-4.27.448-5.734 1.342a8.629 8.629 0 0 0-3.416 3.416c-.732 1.383-1.22 2.969-1.464 4.758a41.535 41.535 0 0 0-.366 5.612V116c0 5.523-4.477 10.001-10 10.001h-8.3zM451.84 71.348c0 5.522-4.477 10-10 10h-6.104v19.764c0 1.627.082 3.132.244 4.514.163 1.301.529 2.44 1.098 3.415.57.977 1.424 1.75 2.562 2.32 1.22.487 2.806.73 4.758.73.976 0 2.237-.08 3.782-.243 1.627-.245 2.847-.732 3.66-1.464v8.725c0 3.915-2.452 7.557-6.344 7.989a58.528 58.528 0 0 1-6.466.366c-3.09 0-5.937-.325-8.54-.976-2.602-.65-4.88-1.667-6.832-3.05-1.952-1.463-3.497-3.334-4.636-5.612-1.057-2.277-1.586-5.042-1.586-8.295V81.347h-11.712v-4.64c0-5.522 4.478-9.999 10-9.999h1.712V59.14c0-5.523 4.478-10 10-10h8.3v17.568h16.104z"/></g><g fill-rule="evenodd" clip-rule="evenodd"><path fill="#24386c" d="m103.79 140.09-3.039-83.784-5.503-22.089 36.734 3.889v101.35l-22.44 12.95z"/><path fill="#7589be" d="m131.98 38.1-22.44 12.96-46.308-10.158L9.029 62.971-.001 38.1l32.99-19.05 33-19.05 32.99 19.05z"/><path fill="#b2bfe8" d="m0 38.1 22.44 12.96 13.008 38.686 43.921 35.142L65.991 152.4l-33-19.051L0 114.299v-76.2"/><path fill="#24386c" d="m80.868 104.56-14.877 21.932v25.91l21.11-12.18 10.877-16.242"/><path fill="#7589be" d="M66 100.59 44.881 64.025l4.549-12.119 17.293-8.384L87.1 64.026z"/><path fill="#b2bfe8" d="m44.881 64.022 21.11 12.18v24.38l-19.524.84-11.81-15.08 10.224-22.32"/><path fill="#24386c" d="m65.991 76.2 21.11-12.179 14.367 23.922-17.386 14.365-18.091-1.727z"/><path fill="#dc244c" d="m87.101 140.22 22.44 12.181V51.061l-21.78-12.57-21.77-12.57-21.78 12.57-21.77 12.57v50.289l21.77 12.57 21.78 12.571 21.11-12.191zm0-51.83-21.11 12.19-21.11-12.19V64.02l21.11-12.19 21.11 12.19v24.37"/></g><path fill="url(#a)" d="M66 126.5v-25.914L45 88.5v25.871z"/><defs><linearGradient id="a" x1="62.128" x2="41.202" y1="105.54" y2="105.54" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#FF3364"/><stop offset="1" stop-color="#C91540" stop-opacity="0"/></linearGradient></defs></svg>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module Multiwoven
|
4
4
|
module Integrations
|
5
|
-
VERSION = "0.
|
5
|
+
VERSION = "0.26.0"
|
6
6
|
|
7
7
|
ENABLED_SOURCES = %w[
|
8
8
|
Snowflake
|
@@ -26,6 +26,7 @@ module Multiwoven
|
|
26
26
|
WatsonxData
|
27
27
|
Anthropic
|
28
28
|
AwsBedrockModel
|
29
|
+
GenericOpenAI
|
29
30
|
].freeze
|
30
31
|
|
31
32
|
ENABLED_DESTINATIONS = %w[
|
@@ -52,6 +53,7 @@ module Multiwoven
|
|
52
53
|
AISDataStore
|
53
54
|
AmazonS3
|
54
55
|
MicrosoftDynamics
|
56
|
+
Qdrant
|
55
57
|
PineconeDB
|
56
58
|
].freeze
|
57
59
|
end
|
@@ -0,0 +1,118 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Multiwoven::Integrations::Source
|
4
|
+
module GenericOpenAI
|
5
|
+
include Multiwoven::Integrations::Core
|
6
|
+
class Client < SourceConnector
|
7
|
+
def check_connection(connection_config)
|
8
|
+
connection_config = prepare_config(connection_config)
|
9
|
+
response = send_request(
|
10
|
+
url: connection_config[:url],
|
11
|
+
http_method: HTTP_POST,
|
12
|
+
payload: JSON.parse(connection_config[:request_format]),
|
13
|
+
headers: auth_headers(connection_config[:api_key]),
|
14
|
+
config: connection_config[:config]
|
15
|
+
)
|
16
|
+
success?(response) ? success_status : failure_status(nil)
|
17
|
+
rescue StandardError => e
|
18
|
+
handle_exception(e, { context: "GENERIC OPEN AI:CHECK_CONNECTION:EXCEPTION", type: "error" })
|
19
|
+
failure_status(e)
|
20
|
+
end
|
21
|
+
|
22
|
+
def discover(_connection_config = nil)
|
23
|
+
catalog_json = read_json(CATALOG_SPEC_PATH)
|
24
|
+
catalog = build_catalog(catalog_json)
|
25
|
+
catalog.to_multiwoven_message
|
26
|
+
rescue StandardError => e
|
27
|
+
handle_exception(e, { context: "GENERIC OPEN AI:DISCOVER:EXCEPTION", type: "error" })
|
28
|
+
end
|
29
|
+
|
30
|
+
def read(sync_config)
|
31
|
+
connection_config = prepare_config(sync_config.source.connection_specification)
|
32
|
+
stream = connection_config[:is_stream] ||= false
|
33
|
+
# The server checks the ConnectorQueryType.
|
34
|
+
# If it's "ai_ml," the server calculates the payload and passes it as a query in the sync config model protocol.
|
35
|
+
# This query is then sent to the AI/ML model.
|
36
|
+
payload = parse_json(sync_config.model.query)
|
37
|
+
|
38
|
+
if stream
|
39
|
+
run_model_stream(connection_config, payload) { |message| yield message if block_given? }
|
40
|
+
else
|
41
|
+
run_model(connection_config, payload)
|
42
|
+
end
|
43
|
+
rescue StandardError => e
|
44
|
+
handle_exception(e, { context: "GENERIC OPEN AI:READ:EXCEPTION", type: "error" })
|
45
|
+
end
|
46
|
+
|
47
|
+
private
|
48
|
+
|
49
|
+
def prepare_config(config)
|
50
|
+
config.with_indifferent_access.tap do |conf|
|
51
|
+
conf[:config][:timeout] ||= 30
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def parse_json(json_string)
|
56
|
+
JSON.parse(json_string)
|
57
|
+
rescue JSON::ParserError => e
|
58
|
+
handle_exception(e, { context: "GENERIC OPEN AI:PARSE_JSON:EXCEPTION", type: "error" })
|
59
|
+
{}
|
60
|
+
end
|
61
|
+
|
62
|
+
def run_model(connection_config, payload)
|
63
|
+
response = send_request(
|
64
|
+
url: connection_config[:url],
|
65
|
+
http_method: HTTP_POST,
|
66
|
+
payload: payload,
|
67
|
+
headers: auth_headers(connection_config[:api_key]),
|
68
|
+
config: connection_config[:config]
|
69
|
+
)
|
70
|
+
process_response(response)
|
71
|
+
rescue StandardError => e
|
72
|
+
handle_exception(e, { context: "GENERIC OPEN AI:RUN_MODEL:EXCEPTION", type: "error" })
|
73
|
+
end
|
74
|
+
|
75
|
+
def run_model_stream(connection_config, payload)
|
76
|
+
send_streaming_request(
|
77
|
+
url: connection_config[:url],
|
78
|
+
http_method: HTTP_POST,
|
79
|
+
payload: payload,
|
80
|
+
headers: auth_headers(connection_config[:api_key]),
|
81
|
+
config: connection_config[:config]
|
82
|
+
) do |chunk|
|
83
|
+
process_streaming_response(chunk) { |message| yield message if block_given? }
|
84
|
+
end
|
85
|
+
rescue StandardError => e
|
86
|
+
handle_exception(e, { context: "GENERIC OPEN AI:RUN_STREAM_MODEL:EXCEPTION", type: "error" })
|
87
|
+
end
|
88
|
+
|
89
|
+
def process_response(response)
|
90
|
+
if success?(response)
|
91
|
+
data = JSON.parse(response.body)
|
92
|
+
[RecordMessage.new(data: data, emitted_at: Time.now.to_i).to_multiwoven_message]
|
93
|
+
else
|
94
|
+
create_log_message("GENERIC OPEN AI:RUN_MODEL", "error", "request failed: #{response.body}")
|
95
|
+
end
|
96
|
+
rescue StandardError => e
|
97
|
+
handle_exception(e, { context: "OPEN AI:PROCESS_RESPONSE:EXCEPTION", type: "error" })
|
98
|
+
end
|
99
|
+
|
100
|
+
def extract_data_entries(chunk)
|
101
|
+
chunk.split(/^data: /).map(&:strip).reject(&:empty?)
|
102
|
+
end
|
103
|
+
|
104
|
+
def process_streaming_response(chunk)
|
105
|
+
data_entries = extract_data_entries(chunk)
|
106
|
+
data_entries.each do |entry|
|
107
|
+
next if entry == "[DONE]"
|
108
|
+
|
109
|
+
data = parse_json(entry)
|
110
|
+
|
111
|
+
raise StandardError, "Error: #{data["error"]["message"]}" if data["error"] && data["error"]["message"]
|
112
|
+
|
113
|
+
yield [RecordMessage.new(data: data, emitted_at: Time.now.to_i).to_multiwoven_message] if block_given?
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"data": {
|
3
|
+
"name": "GenericOpenAI",
|
4
|
+
"title": "Generic OpenAI Spec Endpoint",
|
5
|
+
"connector_type": "source",
|
6
|
+
"category": "AI Model",
|
7
|
+
"documentation_url": "https://docs.mutltiwoven.com",
|
8
|
+
"github_issue_label": "source-generic-open-ai-model",
|
9
|
+
"icon": "icon.svg",
|
10
|
+
"license": "MIT",
|
11
|
+
"release_stage": "alpha",
|
12
|
+
"support_level": "community",
|
13
|
+
"tags": ["language:ruby", "multiwoven"]
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
{
|
2
|
+
"documentation_url": "https://docs.multiwoven.com/integrations/source/generic-open-ai-endpoint",
|
3
|
+
"stream_type": "user_defined",
|
4
|
+
"connector_query_type": "ai_ml",
|
5
|
+
"connection_specification": {
|
6
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
7
|
+
"title": "Generic Open AI Spec Endpoint",
|
8
|
+
"type": "object",
|
9
|
+
"required": ["url", "api_key", "request_format", "response_format"],
|
10
|
+
"properties": {
|
11
|
+
"url": {
|
12
|
+
"type": "string",
|
13
|
+
"title": "Endpoint URL",
|
14
|
+
"description": "The URL of the endpoint that follows the OpenAI API spec.",
|
15
|
+
"default": "https://api.openai.com/v1/chat/completions",
|
16
|
+
"order": 0
|
17
|
+
},
|
18
|
+
"api_key": {
|
19
|
+
"type": "string",
|
20
|
+
"multiwoven_secret": true,
|
21
|
+
"title": "API Key",
|
22
|
+
"order": 1
|
23
|
+
},
|
24
|
+
"is_stream": {
|
25
|
+
"type": "boolean",
|
26
|
+
"title": "Enable streaming",
|
27
|
+
"description": "Enables data streaming for such as chat, when supported by the model. When true, messages and model data are processed in chunks for immediate delivery, enhancing responsiveness. Default is false, processing only after the entire response is received.",
|
28
|
+
"default": false,
|
29
|
+
"order": 1
|
30
|
+
},
|
31
|
+
"config": {
|
32
|
+
"title": "",
|
33
|
+
"type": "object",
|
34
|
+
"properties": {
|
35
|
+
"timeout": {
|
36
|
+
"type": "string",
|
37
|
+
"default": "30",
|
38
|
+
"title": "HTTP Timeout",
|
39
|
+
"description": "The maximum time, in seconds, to wait for a response from the server before the request is canceled.",
|
40
|
+
"order": 0
|
41
|
+
}
|
42
|
+
},
|
43
|
+
"order": 2
|
44
|
+
},
|
45
|
+
"request_format": {
|
46
|
+
"title": "Request Format",
|
47
|
+
"description": "Sample Request Format",
|
48
|
+
"type": "string",
|
49
|
+
"default": "{\"model\":\"gpt-4o-mini\", \"messages\":[{\"role\": \"user\", \"content\": \"What do you know about APIs?\"}], \"stream\": false}",
|
50
|
+
"x-request-format": true,
|
51
|
+
"order": 3
|
52
|
+
},
|
53
|
+
"response_format": {
|
54
|
+
"title": "Response Format",
|
55
|
+
"description": "Sample Response Format",
|
56
|
+
"type": "string",
|
57
|
+
"default": "{\"choices\":[{\"index\": 0, \"delta\":{\"role\": \"assistant\", \"content\": \"APIs, or Application Programming Interfaces, are tools that allow different software applications to communicate with each other. They define a set of rules and protocols for building and interacting with software applications.\"}, \"finish_reason\": \"stop\"}]}",
|
58
|
+
"x-response-format": true,
|
59
|
+
"order": 4
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<svg width="218.5mm" height="277mm" viewBox="0 0 218.5 277" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path style="display:inline;fill:#d0d1c5" d="M-69.47 159.906V-20.716h361.244v361.244H-69.471Z" transform="translate(3.852 -20.065)"/>
|
3
|
+
<path style="fill:#6f857c" d="M-69.47 159.906V-20.716h361.244v361.244H-69.471Zm276.98 135.371c2.322-1.14 4.634-3.503 5.714-5.84l.762-1.65.092-99.835c.065-69.583-.02-100.11-.28-100.742-.205-.498-1.719-2.245-3.363-3.88l-2.99-2.976-23.725-.176-23.725-.176-2.317-1.141c-2.93-1.443-5.62-4.242-7.12-7.411l-1.13-2.384-.103-23.386-.102-23.385-1.132-.69c-1.114-.68-2.272-.69-71.763-.692-69.862-.002-70.651.006-72.524.707-2.605.974-4.585 2.78-5.87 5.352l-1.083 2.166v129.057c0 125.766.017 129.1.668 130.813 1.282 3.373 3.897 5.769 7.547 6.912 1.22.382 19.393.454 100.97.4l99.483-.066zM78.238 272.644c-3.103-1.119-5.18-3.114-6.656-6.395-.718-1.598-.8-2.458-.98-10.228-.167-7.228-.287-8.62-.807-9.413-.966-1.474-2.798-2.68-4.877-3.212l-1.92-.491V234.563l1.94-.49c1.067-.27 2.459-.886 3.094-1.37 2.309-1.757 2.352-1.938 2.594-10.868.256-9.46.497-10.473 3.187-13.416 2.634-2.882 4.326-3.403 10.654-3.279l4.989.098v8.114l-3.433.177c-3.163.164-3.51.254-4.41 1.154l-.977.975-.186 7.49c-.163 6.591-.273 7.682-.919 9.095-.941 2.06-2.577 3.914-4.557 5.165-.863.545-1.569 1.102-1.57 1.239 0 .136.55.509 1.22.827 1.618.767 3.952 3.34 4.89 5.39.68 1.483.774 2.452.939 9.668l.183 8.018.978.977c.917.916 1.178.98 4.166 1.016 1.754.022 3.344.194 3.533.383.195.195.3 2.017.243 4.195l-.1 3.85-4.94.078c-3.464.054-5.338-.067-6.278-.406zm64.575.3c-.388-.392-.323-7.832.07-8.076.185-.114 1.473-.264 2.863-.333 2.167-.108 2.66-.259 3.457-1.055l.93-.93.179-8.018c.172-7.758.208-8.082 1.109-9.96 1.046-2.182 2.176-3.478 4.203-4.819l1.384-.916-1.497-.965c-2.056-1.327-3.256-2.686-4.204-4.765-.739-1.618-.82-2.413-.99-9.606l-.184-7.842-.977-.977c-.854-.855-1.317-1-3.704-1.154l-2.727-.176v-8.114l4.195-.1c5.015-.12 6.813.357 9.163 2.424.893.787 2.031 2.292 2.585 3.421.982 2 .992 2.084 1.167 10.483.159 7.644.245 8.583.882 9.664 1.056 1.792 2.96 3.16 4.9 3.523.944.176 1.851.535 2.018.798.474.749.383 6.794-.11 7.287-.233.233-.953.423-1.601.423-1.315 0-3.48.986-4.4 2.004-1.5 1.658-1.69 2.917-1.69 11.201 0 9.273-.308 10.644-3.03 13.445-2.47 2.54-4.107 3.115-9.317 3.27-2.425.072-4.528.01-4.674-.137zm-29.225-9.694c-.548-.34-1.123 1.686 6.448-22.734 3.309-10.672 6.169-19.562 6.356-19.756.392-.405 1.825 1.1 5.016 5.268l2.088 2.728-.737 2.352c-3.63 11.574-10.121 31.678-10.287 31.856-.319.342-8.374.6-8.884.286zm-15.619-6.96c-.31-.501 11.772-39.032 12.385-39.499.602-.458 6.93-.637 8-.227.307.118.558.475.557.794 0 .319-1.255 4.628-2.787 9.576-1.533 4.947-4.08 13.202-5.661 18.344-1.58 5.142-3.044 9.785-3.252 10.319l-.379.97h-4.346c-2.39 0-4.423-.125-4.517-.277zm23.59-47.74c-1.867-1.073-1.925-1.358-1.933-9.53-.006-6.027-.11-7.715-.492-8.032-.266-.22-1.337-.652-2.381-.959-6.534-1.919-10.967-6.568-11.932-12.515-.213-1.31-.371-8.717-.378-17.608-.01-14.602-.044-15.423-.72-16.933-.52-1.164-3.101-3.966-9.667-10.496-8.366-8.319-9.042-8.907-10.223-8.907-1.645 0-4.265-1.245-5.106-2.426-1.803-2.532-1.638-5.695.42-8.038 3.876-4.416 10.64-1.998 10.994 3.928l.12 2.02 9.168 9.048c7.9 7.8 9.32 9.362 10.268 11.31.606 1.245 1.102 2.475 1.102 2.735 0 .26.238.473.529.473.457 0 .53-1.305.532-9.613.003-9.402.022-9.652.846-11.378.463-.97 1.89-2.938 3.17-4.373 1.339-1.502 2.476-3.15 2.68-3.88.194-.7.353-2.898.354-4.886.002-3.605 0-3.62-1.181-4.94-.651-.728-1.366-1.67-1.588-2.094-.596-1.138-.49-3.645.214-5.025 2.195-4.304 8.249-4.733 10.917-.774 1.64 2.433 1.39 5.309-.663 7.647-1.087 1.239-1.09 1.252-.905 4.492.353 6.195-.827 9.903-4.428 13.914-1.129 1.257-2.132 2.767-2.343 3.528-.433 1.559-.51 16.55-.086 16.812.158.098 4.108-3.663 8.78-8.358l8.492-8.535.195-2.066c.252-2.677 1.416-4.467 3.592-5.52 3.756-1.818 8.169.586 8.84 4.816.575 3.636-2.414 7.147-6.107 7.172-.987.007-1.641.522-4.763 3.75-1.99 2.058-3.618 3.892-3.618 4.075 0 .183.953.72 2.117 1.192 1.164.473 3.055 1.506 4.203 2.297l2.086 1.438 1.971-.868c1.084-.477 3.315-1.134 4.958-1.46 2.573-.509 3.194-.78 4.466-1.954 2.742-2.526 5.883-2.583 8.572-.153 2.571 2.323 2.693 6.256.268 8.681-2.027 2.027-4.86 2.31-7.693.768l-1.726-.94-2.837.649c-1.56.356-2.902.752-2.98.879-.078.126.238 1.172.703 2.322.464 1.15 1.02 3.196 1.236 4.545.216 1.349.545 2.637.733 2.863.187.226 1.145.488 2.13.582 2.393.23 3.65 1.429 3.65 3.48 0 1.201-.205 1.63-1.199 2.519-1.19 1.064-1.217 1.069-4.339.867-5.478-.355-6.754-1.578-7.563-7.25-1.146-8.032-6.128-13.295-12.99-13.722l-2.469-.154-7.653 7.72c-4.209 4.245-7.824 8.17-8.034 8.721-.588 1.545-.855 10.211-.423 13.685.588 4.721 2.075 7.012 5.61 8.645 1.914.884 2.56.837 2.566-.185.005-.893 1.638-4.228 2.687-5.487 1.453-1.745 4.94-4.004 7.488-4.852 2.48-.825 7.548-1.021 9.266-.358 2.211.853 3.137 3.322 1.934 5.158-.832 1.27-1.94 1.6-4.544 1.358-2.955-.276-5.61.498-7.628 2.226-2.468 2.112-2.471 2.135-2.245 13.891.21 10.898.076 12.312-1.286 13.545-.84.76-2.834 1.036-3.735.518zm12.215-3.522c-1.264-1.178-1.456-2.174-1.448-7.486.009-5.891.331-6.897 3.094-9.66 3.003-3.003 4.21-3.402 11.186-3.694 6.566-.275 8.951-.747 12.523-2.478 5.486-2.659 9.172-8.787 9.172-15.248 0-2.47.775-3.422 4.05-4.977 7.44-3.53 11.721-13.595 9.9-23.275-1.465-7.794-6.303-13.906-12.438-15.717-2.712-.8-3.036-1.466-3.31-6.794-.183-3.598-.437-5.242-1.107-7.166-2.301-6.618-7.083-10.77-14.601-12.676-1.869-.474-3.549-.862-3.733-.862-.2 0-.288 1.825-.22 4.531.127 4.932.023 5.274-1.908 6.272-.821.424-1.254.448-2.243.122-1.951-.644-2.308-1.552-2.67-6.785-.574-8.32-1.774-11.726-5.374-15.256-2.715-2.662-7.284-5.09-11.391-6.053-2.258-.53-4.191-.643-10.694-.629-7.073.016-8.242.103-10.74.797-5.438 1.512-10.637 4.656-12.86 7.778-1.36 1.912-1.21 2.12 2.434 3.349 5.496 1.855 9.96 5.098 12.859 9.34 2.503 3.663 4.418 10.247 3.833 13.173-.482 2.413-3.736 3.562-5.575 1.97-.758-.657-1.005-1.344-1.427-3.969-.94-5.853-3.83-9.967-8.857-12.608-3.185-1.674-6.19-2.375-10.182-2.374-6.764.002-12.301 2.152-16.57 6.433-3.912 3.923-5.83 8.72-6.374 15.939-.215 2.85-.334 3.246-1.225 4.08-.544.507-1.678 1.125-2.52 1.372-3.733 1.096-7.493 4.635-9.78 9.204-2 3.995-2.653 7.28-2.414 12.137.315 6.422 2.273 11.057 6.426 15.206 4.725 4.722 7.176 5.422 20.297 5.8l9.712.28 3.694 1.314c4.504 1.603 6.74 2.147 7.549 1.837.561-.216.603-.893.495-8.085-.113-7.548-.151-7.916-1-9.613-1.34-2.68-2.928-3.351-7.926-3.351-2.143 0-4.431-.154-5.086-.341-.996-.286-1.425-.206-2.643.494-1.946 1.119-3.398 1.38-5.113.917-1.853-.499-3.512-1.92-4.321-3.701-1.999-4.4 1.092-9.01 6.04-9.01 2.363 0 4.274 1.007 5.62 2.963l1.071 1.557 5.218.121c5.072.117 5.284.153 7.568 1.278 2.862 1.41 5.124 3.807 6.289 6.664.808 1.982.843 2.45.968 12.87.142 11.846.08 12.288-1.944 13.613-1.47.962-8.03.842-10.768-.197l-4.057-1.54c-1.816-.691-2.988-.798-11.2-1.023-13.733-.375-17.474-1.343-23.3-6.024-5.708-4.587-9.463-11.587-10.421-19.427-1.474-12.065 4.495-24.559 14.01-29.32 1.97-.987 2.247-1.4 2.25-3.349.004-1.947 1.262-6.806 2.428-9.377 3.94-8.688 12.328-14.77 22.674-16.438l2.658-.429 1.126-2.36c2.269-4.749 6.044-8.385 11.516-11.09 6.133-3.033 9.225-3.756 17.099-3.996 9.627-.294 16.383.818 21.872 3.6 5.704 2.889 9.896 6.854 12.515 11.838 1.153 2.194 1.386 2.432 2.579 2.628 9.685 1.592 14.446 3.812 19.193 8.95 4.262 4.612 6.477 9.7 6.924 15.902l.24 3.345 2.394 1.307c6.002 3.279 10.254 8.731 12.47 15.993.883 2.895.97 3.689.99 8.996.019 5.067-.083 6.183-.79 8.623-2.062 7.12-6.36 12.675-12.577 16.256-.417.24-.74 1.07-.958 2.47-.79 5.036-2.957 9.387-6.64 13.328-3.428 3.669-6.846 5.793-11.346 7.053-3.098.867-4.478 1.029-9.472 1.113-3.622.06-5.031.22-5.887.663-2.003 1.04-2.226 1.692-2.226 6.505 0 4.596-.372 6.038-1.745 6.773-1.135.608-2.993.426-3.855-.376zM43.433 97.558c-1.632-.305-4.42-1.562-6.025-2.715-1.45-1.041-1.911-1.172-4.765-1.343-3.899-.235-6.515-1.176-9.423-3.391-2.396-1.825-4.394-4.497-5.411-7.237-.511-1.377-.673-2.744-.673-5.693 0-3.655-.056-3.963-.974-5.314-5.354-7.885-2.156-19.52 6.537-23.78 2.157-1.058 2.497-1.375 3.508-3.271 2.912-5.464 9.503-9.141 15.447-8.618 3.338.294 5.66 1.106 8.366 2.926 2.148 1.445 2.634 1.623 4.732 1.728 4.501.225 7.82 1.664 11.095 4.809 3.884 3.73 5.302 7.473 4.985 13.164-.196 3.532-.194 3.546 1.093 6.154 1.184 2.4 1.3 2.911 1.425 6.273.112 3.046.006 4.058-.631 6.03-1.458 4.505-4.72 8.166-8.71 9.775-1.802.726-2.217 1.083-3.206 2.754-2.13 3.6-5.87 6.39-10.067 7.507-1.762.47-5.441.591-7.303.242zm7.773-5.66c2.482-1.21 4.417-3.07 5.508-5.29l.992-2.02V69.112l-1.916-1.151c-1.053-.634-2.046-1.071-2.205-.973-.159.098-.29 3.725-.29 8.06v7.88l-1.193 1.047c-.656.576-3.355 2.296-5.997 3.822-2.642 1.526-4.804 2.958-4.804 3.182 0 .355 1.013.954 2.823 1.67 1.219.482 5.482.03 7.082-.75zm-15.307-3.626c.546-.205 3.81-1.972 7.254-3.926l6.262-3.554v-2.641c0-2.448-.05-2.628-.69-2.46-.38.099-3.487 1.803-6.904 3.787-7.809 4.534-7.41 4.523-14.347.398-2.657-1.58-4.999-2.873-5.204-2.873-.602 0-.426 2.298.331 4.308 1.099 2.916 4.034 5.657 7.307 6.825 1.62.578 4.63.646 5.99.136zm27.61-6.497c1.503-.778 3.449-3.24 4.248-5.375 1.5-4.01.595-9.314-2.058-12.06-.728-.752-3.969-2.844-7.427-4.792l-6.136-3.456-1.89.927c-1.039.51-1.89 1.074-1.89 1.255 0 .18 2.799 1.957 6.218 3.948 4.39 2.556 6.412 3.938 6.878 4.703.588.963.66 1.868.662 8.226 0 3.93.089 7.144.195 7.144.107 0 .646-.234 1.2-.52zm-25.206-5.478c0-.244-2.535-1.925-5.634-3.736-6.304-3.683-7.403-4.56-7.725-6.17-.123-.615-.223-3.876-.223-7.247 0-7.005-.042-7.081-2.58-4.742-4.019 3.704-4.853 10.405-1.839 14.778.93 1.348 2.2 2.26 7.783 5.588l6.672 3.978 1.773-1.002c.975-.55 1.773-1.202 1.773-1.447zm8.249-4.14 2.863-1.67V63.71l-2.895-1.635-2.896-1.636-2.66 1.449c-3.814 2.076-3.581 1.704-3.467 5.528l.1 3.36 2.47 1.516c1.358.834 2.728 1.521 3.045 1.526.317.006 1.865-.742 3.44-1.66zM33.54 59.607l.177-7.637.965-.964c.53-.53 3.45-2.399 6.486-4.152 3.037-1.754 5.534-3.347 5.55-3.541.014-.194-.682-.75-1.549-1.235-1.317-.738-2.036-.881-4.397-.877-3.49.007-5.374.787-8.078 3.344-3.363 3.18-3.976 5.754-3.57 14.98l.256 5.78 1.639 1.054c.902.58 1.798 1.016 1.992.97.215-.052.422-3.07.53-7.722zm13.488-5.762c2.47-1.427 4.84-2.595 5.265-2.595.425 0 3.601 1.598 7.058 3.551s6.465 3.44 6.685 3.304c.615-.38.127-3.374-.872-5.344-2.008-3.964-6.339-6.802-10.38-6.802-2.7 0-3.476.313-9.76 3.945-8.267 4.778-7.603 4.203-7.603 6.584 0 1.13.105 2.158.233 2.287.248.247 2.099-.727 9.374-4.93z" transform="translate(3.852 -20.065)"/>
|
4
|
+
<path style="display:inline;fill:#356660" d="M-69.47 159.906V-20.716h361.244v361.244H-69.471Zm277.363 135.54c2.565-1.263 4.317-3.027 5.632-5.67l.814-1.635.09-100.435.091-100.434-31.98-31.857c-35.586-35.45-33.289-33.141-33.289-33.456 0-.127-.516-.501-1.146-.832-1.071-.561-5.846-.594-72.408-.496l-71.26.104-1.803.95c-2.362 1.247-4.86 4.057-5.67 6.38-.616 1.769-.642 6.984-.642 130.606v128.764l.989 2.117c1.547 3.312 4.198 5.717 7.416 6.725 1.2.376 19.878.45 101.14.396l99.667-.066zM79.225 272.469c-1.874-.467-3.895-1.702-5.262-3.215-2.352-2.604-2.458-3.1-2.681-12.51-.186-7.857-.257-8.575-.987-9.966-.916-1.748-2.947-3.209-5.288-3.803l-1.657-.42v-7.652l1.328-.276c2.825-.587 5.133-2.366 6.09-4.695.159-.388.38-4.436.493-8.996l.203-8.29 1.042-1.881c1.142-2.062 2.342-3.216 4.561-4.387 1.3-.686 2.005-.767 6.744-.777l5.292-.01v7.408l-3.175.176c-3.456.192-4.315.517-5.33 2.014-.595.879-.673 1.751-.716 8.076-.044 6.439-.119 7.25-.811 8.82-.895 2.028-2.771 4.075-4.873 5.318-.825.488-1.5 1.078-1.5 1.311 0 .234.55.624 1.221.867 1.557.562 4.06 2.992 4.961 4.815.615 1.244.719 2.374.874 9.541.23 10.566.345 10.773 6.174 11.097l3.175.176v7.408l-4.41.057c-2.425.032-4.886-.061-5.468-.206zm63.842-.105c-.107-.277-.148-2-.091-3.829l.102-3.325 2.562-.2c2.967-.23 4.265-.978 4.914-2.832.27-.768.429-3.753.441-8.282.023-7.957.296-9.34 2.306-11.689.654-.764 1.915-1.774 2.803-2.245.888-.471 1.614-.96 1.614-1.088 0-.127-.842-.706-1.87-1.287-1.03-.58-2.306-1.625-2.837-2.321-1.763-2.312-1.994-3.587-2.016-11.11-.012-4.407-.173-7.36-.44-8.125-.657-1.874-2.002-2.65-4.944-2.856l-2.533-.176v-7.408l4.586.006c4.013.005 4.762.1 5.997.763 1.943 1.045 3.867 3.126 4.832 5.228.753 1.642.822 2.355.987 10.29l.178 8.526 1.073 1.525c1.202 1.708 3.183 2.971 5.194 3.311l1.342.227-.1 3.58-.1 3.578-1.675.24c-2.136.304-3.892 1.392-4.922 3.049-.776 1.247-.82 1.696-.992 10.124-.17 8.299-.23 8.929-1.013 10.669-.963 2.141-2.965 4.088-5.29 5.145-2.112.959-9.787 1.349-10.108.513zm-29.32-10.053c.172-.597 7.636-24.704 11.09-35.818.89-2.862 1.785-5.2 1.991-5.195.323.007 5.201 5.947 5.922 7.21.241.423-1.19 5.148-7.755 25.59l-2.775 8.643-4.327.099c-4.008.092-4.313.053-4.146-.53zm-15.296-6.489c0-.483 11.127-36.794 11.637-37.972.327-.758.529-.794 4.407-.794 2.236 0 4.065.125 4.065.277 0 .152-1.84 6.224-4.088 13.494a9190.022 9190.022 0 0 0-5.922 19.214l-1.835 5.997-4.132.1c-2.986.071-4.132-.016-4.132-.316zm23.015-47.82c-1.115-.45-1.32-1.77-1.495-9.627l-.177-7.92-3.246-1.094c-6.566-2.21-10.55-6.46-11.226-11.973-.12-.98-.247-8.848-.282-17.482l-.062-15.699-.826-1.587c-.524-1.009-4.063-4.816-9.701-10.439-8.738-8.712-8.903-8.854-10.611-9.085-.955-.13-2.404-.626-3.221-1.105-3.08-1.805-3.504-6.426-.817-8.9 4.018-3.698 9.83-1.09 9.83 4.412v1.722l8.132 7.867c8.834 8.546 10.936 10.983 12.122 14.05.556 1.439.982 2.037 1.504 2.114.718.105.733-.054.99-10.23.302-11.92.163-11.37 3.887-15.427 1.278-1.393 2.476-2.932 2.661-3.42.186-.487.337-2.86.337-5.271v-4.386l-1.27-1.407c-3.576-3.957-1.14-9.613 4.14-9.613 2.033 0 3.683.878 4.833 2.57.688 1.012.803 1.554.685 3.235-.115 1.648-.36 2.293-1.335 3.506l-1.194 1.485-.02 5.138c-.017 5.001-.047 5.199-1.113 7.431-.602 1.261-2.002 3.303-3.11 4.538-1.11 1.235-2.165 2.634-2.345 3.11-.181.475-.33 4.744-.33 9.485 0 8.023.044 8.62.628 8.62.349 0 4.49-3.875 9.348-8.748l8.722-8.747v-1.717c0-2.197 1.272-4.463 2.952-5.26 2.512-1.192 5.81-.385 7.443 1.821 1.04 1.404 1.153 4.836.21 6.338-.988 1.576-2.71 2.552-4.506 2.553-1.43.001-1.633.153-5.468 4.088-2.19 2.248-3.982 4.33-3.982 4.625 0 .338.79.827 2.116 1.31 1.165.424 3.203 1.502 4.531 2.395l2.414 1.625 1.82-.828c1-.456 3.237-1.106 4.97-1.445 2.805-.548 3.338-.78 4.843-2.118 2.55-2.265 5.458-2.49 7.707-.599 2.203 1.854 2.694 4.345 1.387 7.044-1.437 2.97-4.942 3.688-8.326 1.705l-1.467-.86-3.239.755c-3.7.863-3.611.673-2.15 4.627.414 1.12.852 2.987.973 4.147.297 2.839.654 3.239 3.074 3.44 1.605.132 2.142.342 2.7 1.05 1.347 1.715.416 4.366-1.697 4.83-1.475.324-6.045-.436-7.306-1.216-1.441-.89-1.897-1.944-2.328-5.383-1.037-8.27-5.747-13.413-13.275-14.497l-2.622-.378-7.9 7.943c-4.985 5.012-8.099 8.42-8.44 9.235-.42 1.007-.537 2.753-.53 7.918.004 3.644.172 7.34.373 8.213.803 3.495 4.433 7.102 7.237 7.191 1.25.04 1.316-.02 1.908-1.74 1.358-3.949 3.176-6.041 6.96-8.012 4.944-2.574 11.26-2.755 13.13-.377.96 1.221.91 2.429-.144 3.484-.8.8-1.129.866-4.322.873-3.912.01-5.772.621-7.807 2.57-2.32 2.221-2.294 2.05-2.208 14.614l.077 11.371-.888.888c-.851.852-2.455 1.138-3.658.653zm13.067-3.014c-1.474-.712-1.961-2.91-1.796-8.111.109-3.454.302-4.982.73-5.79.995-1.875 3.72-4.377 5.829-5.35 1.846-.851 2.543-.951 8.191-1.17 6.962-.272 9.257-.802 12.877-2.976 2.67-1.604 3.762-2.643 5.492-5.228 1.677-2.507 2.687-5.632 3.004-9.299.282-3.261.591-3.698 3.581-5.053 2.488-1.128 5.545-3.838 7.148-6.336.592-.923 1.583-3.008 2.202-4.633 1.075-2.82 1.127-3.185 1.138-8.07.01-4.38-.105-5.495-.807-7.76-1.067-3.445-3.05-6.774-5.417-9.094-2.278-2.233-3.358-2.92-6.26-3.978-1.212-.442-2.41-1.134-2.661-1.539-.265-.426-.55-2.472-.676-4.864-.487-9.192-4.138-15.203-11.3-18.606-2.999-1.425-7.322-2.629-8.726-2.43l-.83.117.131 4.616.131 4.615-.972.765c-1.192.937-2.649.98-3.724.11-.732-.594-.849-1.141-1.25-5.872-.512-6.028-.915-7.986-2.263-10.993-2.266-5.051-8.561-9.417-15.677-10.872-3.846-.786-11.246-1.066-15.587-.588-8.053.885-15.136 4.327-18.521 9.001-1.626 2.244-1.412 2.83 1.296 3.563 4.919 1.331 10.198 4.612 12.878 8.002 2.867 3.627 4.93 9.138 4.93 13.17 0 2.278-1.066 3.498-3.054 3.498-1.574 0-2.44-.96-2.753-3.052-.677-4.54-1.882-7.551-4.096-10.237-1.55-1.88-5.44-4.315-8.632-5.404-2.4-.818-3.398-.96-6.865-.97-7.316-.024-12.35 1.893-16.97 6.463-4.135 4.091-6.121 8.742-6.555 15.352-.283 4.304-.604 4.838-3.61 5.986-5.645 2.157-10.034 7.435-11.892 14.299-.946 3.498-.861 9.647.181 13.053 1.283 4.188 3.087 7.29 5.866 10.082 4.694 4.716 7.868 5.626 20.777 5.96 9.124.235 10.685.448 14.596 1.994 3.549 1.403 5.57 1.824 6.463 1.346.691-.37.71-.651.603-8.736-.108-8.166-.13-8.389-.997-9.936-1.527-2.727-3.02-3.284-9.515-3.55-5.327-.219-5.51-.203-7.059.63-1.269.683-1.966.826-3.457.709-3.283-.26-5.365-2.54-5.365-5.878 0-2.484 1.075-4.22 3.274-5.284 2.945-1.426 6.07-.572 7.96 2.175l1.086 1.578 5.04.171c4.06.138 5.434.323 7.053.946 2.812 1.083 5.23 3.364 6.45 6.081 1.18 2.63 1.542 6.433 1.57 16.528.03 10.202-.098 10.407-6.453 10.407-4.222 0-4.343-.022-8.34-1.563l-4.058-1.564-9.701-.247c-10.739-.273-13.48-.708-17.734-2.819-5.276-2.617-10.297-8.263-12.777-14.364-1.882-4.634-2.485-12.293-1.387-17.646 1.651-8.057 6.6-15.206 12.874-18.597l2.606-1.408.45-3.175c.62-4.361 1.296-6.524 3.198-10.23 3.684-7.18 11.572-12.673 20.53-14.299l3.057-.554c.559-.102 1.159-.957 2.24-3.19 1.125-2.323 2.043-3.607 3.848-5.38 3.977-3.907 10.706-7.233 16.966-8.386 4.07-.75 13.052-.824 17.987-.149 10.56 1.446 19.097 6.944 23.014 14.824.633 1.274 1.29 2.417 1.46 2.54.168.124 1.217.327 2.33.453 6.245.707 12.56 3.43 16.573 7.144 5.232 4.843 7.766 10.27 8.35 17.877l.225 2.918 2.287 1.186c5.743 2.978 9.784 7.903 12.061 14.704 4.41 13.162-.14 27.64-10.625 33.814l-1.803 1.062-.64 3.172c-.425 2.108-1.194 4.295-2.293 6.523-1.375 2.787-2.165 3.86-4.689 6.367-5.298 5.266-9.626 6.93-19.086 7.344-8.691.38-9.172.757-9.172 7.193 0 2.794-.165 4.56-.5 5.36-.757 1.813-2.232 2.38-3.988 1.532zM41.645 96.308c-1.267-.432-3.114-1.38-4.105-2.107-1.672-1.228-1.976-1.323-4.248-1.323-2.583 0-5.36-.668-7.674-1.847-2.3-1.171-5.28-4.293-6.588-6.898-1.151-2.294-1.188-2.5-1.192-6.614-.004-4.177-.022-4.277-1.136-6.013-1.508-2.35-2.215-4.43-2.45-7.203-.564-6.698 2.896-12.829 8.86-15.701 2.264-1.09 2.57-1.368 3.365-3.046 1.924-4.066 6.34-7.463 11.006-8.463 4.15-.89 9.211.261 12.713 2.893 1.573 1.182 2.108 1.387 3.62 1.392 10.135.03 17.822 8.743 16.363 18.55-.344 2.315-.316 2.665.287 3.56 3.445 5.112 3.274 12.347-.425 17.92-1.576 2.374-3.285 3.762-6.341 5.147-1.661.753-2.512 1.377-2.933 2.149-1.173 2.154-3.276 4.534-5.092 5.762-3.935 2.663-9.486 3.391-14.03 1.842zm9.685-3.77c2.476-1.199 5.27-3.935 6.22-6.091.746-1.695.83-2.487.968-8.994.083-3.925.053-7.522-.065-7.995-.252-1.002-4.661-3.675-5.19-3.146-.175.174-.358 3.905-.407 8.29-.078 6.931-.168 8.058-.689 8.626-.33.36-3.06 2.083-6.067 3.83-3.008 1.746-5.54 3.347-5.63 3.559-.29.688.326 1.219 2.45 2.114 2.614 1.103 5.889 1.027 8.41-.194zm-15.453-3.67c.752-.266 2.637-1.196 4.19-2.067 7.567-4.245 8.864-5 9.436-5.494.496-.428.618-1.11.618-3.456 0-1.676-.16-3.021-.374-3.154-.205-.127-3.42 1.506-7.143 3.628-3.724 2.122-7.2 3.964-7.726 4.094-1.033.254-4.717-1.487-9.658-4.565-1.374-.856-2.76-1.556-3.08-1.556-.844 0-1.107 1.551-.627 3.696 1.383 6.178 8.88 10.81 14.364 8.874zm27.579-6.369c1.555-.817 3.862-3.43 4.697-5.32 1.053-2.381 1.28-6.148.528-8.735-1.138-3.917-2.782-5.37-11.66-10.31l-4.917-2.736-2.226 1.098c-1.559.768-2.227 1.297-2.227 1.763 0 .492 1.692 1.647 6.474 4.421 4.495 2.608 6.597 4.028 6.879 4.646.263.578.406 3.404.406 8.047 0 3.937.106 7.263.235 7.392.35.35.754.29 1.81-.266zm-26.014-4.526c1.148-.63 2.089-1.344 2.091-1.586.005-.46-1.114-1.194-8.636-5.659-2.85-1.692-4.75-3.054-5.022-3.603-.303-.608-.44-2.979-.443-7.652-.004-4.37-.138-6.852-.378-7-.72-.446-1.957.179-3.591 1.812-5.062 5.063-4.756 13.65.625 17.546 2.459 1.78 11.958 7.25 12.624 7.27.353.01 1.581-.497 2.73-1.128zm9.475-5.291 3.194-1.853.005-3.62.005-3.62-1.852-1.182c-1.019-.65-2.495-1.507-3.28-1.906l-1.428-.725-3.246 1.76c-2.215 1.2-3.307 2.004-3.439 2.528-.105.423-.145 2.19-.088 3.929l.104 3.16 2.822 1.678c1.552.923 3.09 1.683 3.416 1.69.326.007 2.03-.82 3.787-1.84zm-12.85-5.549c.128-.577.122-1.395-.012-1.817-.134-.422-.127-3.556.015-6.965.31-7.424-.373-6.443 7.76-11.158 4.046-2.344 5.645-3.454 5.645-3.917 0-.835-2.256-2.11-4.713-2.665-4.775-1.077-10.726 2.054-13.111 6.9l-1.093 2.22.029 7.722c.032 8.477-.108 7.933 2.488 9.637 2.066 1.356 2.702 1.365 2.993.043zm10.7-11.297c3.75-2.134 7.164-3.88 7.586-3.878.421.001 3.59 1.603 7.043 3.56 3.486 1.976 6.505 3.47 6.791 3.36.37-.141.513-.773.51-2.237-.006-3.822-2.715-7.825-6.753-9.977-1.81-.966-2.71-1.21-4.875-1.33-3.055-.168-3.097-.15-12.581 5.318-5.729 3.303-5.76 3.336-5.768 6.302-.006 1.898.253 2.763.827 2.762.222 0 3.471-1.746 7.22-3.88z" transform="translate(3.852 -20.065)"/>
|
5
|
+
<path style="display:inline;fill:#26292e" d="M-69.47 159.906V-20.716h361.244v361.244H-69.471Zm275.003 136.693c3.85-.985 7.45-4.238 8.706-7.865.36-1.038.47-21.235.552-100.43.056-54.521.008-99.656-.107-100.3-.175-.976-5.666-6.606-33.205-34.043-18.147-18.08-33.372-33.073-33.831-33.318-.666-.353-15.285-.425-71.848-.352l-71.011.091-2.012.988c-2.52 1.238-4.949 3.891-5.909 6.456l-.726 1.941.09 129.187.09 129.187.754 1.63c1.495 3.234 4.73 5.943 8.217 6.883 1.259.34 23.184.44 99.875.459 86.948.02 98.505-.038 100.365-.514zM78.207 271.864c-1.201-.37-2.277-1.084-3.553-2.36-2.835-2.835-3.076-3.821-3.33-13.643-.192-7.493-.282-8.408-.935-9.52-.942-1.602-3.113-3.105-5.296-3.666l-1.743-.448.066-3.473.067-3.474 1.97-.61c2.44-.755 4.224-2.083 5.097-3.793.58-1.136.687-2.352.822-9.24.18-9.221.438-10.324 3.047-13.003 2.33-2.392 3.956-2.867 9.808-2.867h4.7v7.056h-2.911c-2.26.002-3.162.155-4.034.687-1.917 1.169-2.034 1.674-2.254 9.72-.229 8.343-.387 8.987-2.885 11.696-.809.878-2.23 1.98-3.16 2.452-.93.47-1.69 1.003-1.69 1.182 0 .18.96.838 2.133 1.463 1.173.625 2.624 1.758 3.225 2.516 1.957 2.472 2.18 3.595 2.388 12.105.25 10.156.438 10.485 6.012 10.538l2.999.028.1 3.616.101 3.616-4.51-.025c-2.943-.016-5.11-.208-6.234-.554zm65.123-3.007.1-3.586 2.44-.116c2.572-.123 3.753-.639 4.515-1.973.316-.552.51-3.213.637-8.732.163-7.046.266-8.115.915-9.525 1.045-2.27 2.443-3.786 4.416-4.785 1.98-1.004 2.175-1.69.634-2.226-1.864-.65-3.772-2.45-4.78-4.512-.94-1.92-.968-2.157-1.121-9.598-.173-8.387-.33-9.094-2.293-10.29-.8-.489-1.77-.69-3.334-.69l-2.205-.001v-7.056h3.928c4.804 0 6.242.403 8.415 2.356 3.11 2.796 3.31 3.568 3.523 13.546l.186 8.67.973 1.47c1.206 1.822 3.202 3.175 5.18 3.513l1.506.257.05 3.345.052 3.344-1.706.246c-2.06.296-3.795 1.408-5.091 3.262l-.964 1.38-.177 9.027c-.202 10.332-.395 11.114-3.4 13.76-2.233 1.965-4.086 2.5-8.67 2.5h-3.83zm-29.356-6.22c0-.234 3.48-11.55 9.893-32.176 1.418-4.56 2.693-8.424 2.833-8.589.25-.295 3.482 3.352 5.126 5.786l.846 1.253-1.788 5.802c-2.597 8.43-8.83 27.645-9.034 27.851-.279.283-7.876.353-7.876.073zm-10.383-23.092c2.765-8.973 5.478-17.665 6.03-19.314l1.001-2.999 3.793-.1c2.78-.073 3.792.014 3.792.326 0 .234-2.56 8.692-5.689 18.797-3.129 10.104-5.767 18.65-5.862 18.99-.152.54-.663.616-4.133.616h-3.96z" transform="translate(3.852 -20.065)"/>
|
6
|
+
</svg>
|
@@ -82,6 +82,7 @@ require_relative "integrations/source/watsonx_ai/client"
|
|
82
82
|
require_relative "integrations/source/watsonx_data/client"
|
83
83
|
require_relative "integrations/source/anthropic/client"
|
84
84
|
require_relative "integrations/source/aws_bedrock_model/client"
|
85
|
+
require_relative "integrations/source/generic_open_ai/client"
|
85
86
|
|
86
87
|
# Destination
|
87
88
|
require_relative "integrations/destination/klaviyo/client"
|
@@ -107,6 +108,7 @@ require_relative "integrations/destination/mailchimp/client"
|
|
107
108
|
require_relative "integrations/destination/ais_data_store/client"
|
108
109
|
require_relative "integrations/destination/amazon_s3/client"
|
109
110
|
require_relative "integrations/destination/microsoft_dynamics/client"
|
111
|
+
require_relative "integrations/destination/qdrant/client"
|
110
112
|
require_relative "integrations/destination/pinecone_db/client"
|
111
113
|
|
112
114
|
module Multiwoven
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: multiwoven-integrations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.26.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Subin T P
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-05-
|
11
|
+
date: 2025-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -671,6 +671,10 @@ files:
|
|
671
671
|
- lib/multiwoven/integrations/destination/postgresql/config/meta.json
|
672
672
|
- lib/multiwoven/integrations/destination/postgresql/config/spec.json
|
673
673
|
- lib/multiwoven/integrations/destination/postgresql/icon.svg
|
674
|
+
- lib/multiwoven/integrations/destination/qdrant/client.rb
|
675
|
+
- lib/multiwoven/integrations/destination/qdrant/config/meta.json
|
676
|
+
- lib/multiwoven/integrations/destination/qdrant/config/spec.json
|
677
|
+
- lib/multiwoven/integrations/destination/qdrant/icon.svg
|
674
678
|
- lib/multiwoven/integrations/destination/salesforce_consumer_goods_cloud/client.rb
|
675
679
|
- lib/multiwoven/integrations/destination/salesforce_consumer_goods_cloud/config/catalog.json
|
676
680
|
- lib/multiwoven/integrations/destination/salesforce_consumer_goods_cloud/config/meta.json
|
@@ -746,6 +750,11 @@ files:
|
|
746
750
|
- lib/multiwoven/integrations/source/databrics_model/config/meta.json
|
747
751
|
- lib/multiwoven/integrations/source/databrics_model/config/spec.json
|
748
752
|
- lib/multiwoven/integrations/source/databrics_model/icon.svg
|
753
|
+
- lib/multiwoven/integrations/source/generic_open_ai/client.rb
|
754
|
+
- lib/multiwoven/integrations/source/generic_open_ai/config/catalog.json
|
755
|
+
- lib/multiwoven/integrations/source/generic_open_ai/config/meta.json
|
756
|
+
- lib/multiwoven/integrations/source/generic_open_ai/config/spec.json
|
757
|
+
- lib/multiwoven/integrations/source/generic_open_ai/icon.svg
|
749
758
|
- lib/multiwoven/integrations/source/google_vertex_model/client.rb
|
750
759
|
- lib/multiwoven/integrations/source/google_vertex_model/config/catalog.json
|
751
760
|
- lib/multiwoven/integrations/source/google_vertex_model/config/meta.json
|