panora 0.2.4 → 0.2.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: 0a81fe0c869e53f72ac79474bb10d2a9d5b0e3ba234e5bcc837652309577b4ca
4
- data.tar.gz: 245ecc06493247d94506c5f9599517cda223a18f9477406a64eb9d7e56dba9ff
3
+ metadata.gz: 1ec82825194460355e1458dee8b72ca7617ad6fa207a832f675f8de91fe9648f
4
+ data.tar.gz: 23d837de6fe20d3381747c119efff44a91757e6baead783cff9304b39f1ff518
5
5
  SHA512:
6
- metadata.gz: b8b3b342886f315f8f364a50d0e690df35b057dca401b45ad30033ba557d8ea4c2ce5d5a71493a7d411f69ddc37d64dcf68b3f517f6c3f48e83227e775b59bab
7
- data.tar.gz: f494c4cd01b51cba99df209d69ea88919e7d4ae46d4d9a03597da5e200fee55b1c9395cb87375bdc34ca0daaac90168525efe0cfb97d2291b918a57ae11fc118
6
+ metadata.gz: 012ba75a07dd5220e66e151ad8d95d8d983e12256ef4a3a289f1d71a7e7dee81ec72941c098b558733b57daa6620c44a604deda4dd70ce97aa5f4dd085705d5b
7
+ data.tar.gz: 65ccec4ba7986ebb7538b7bda3b7d57d5af0880f457e95aac6cf945a69f927dd74fe7af06b2bf694f380a6f25bbb95b56a7caf880f44cf5e86061ced6283d45a
@@ -19,9 +19,9 @@ module OpenApiSDK
19
19
  end
20
20
 
21
21
 
22
- sig { returns(::OpenApiSDK::Operations::RetrieveConnectionsResponse) }
23
- def retrieve
24
- # retrieve - List Connections
22
+ sig { returns(::OpenApiSDK::Operations::ListConnectionsResponse) }
23
+ def list
24
+ # list - List Connections
25
25
  url, params = @sdk_configuration.get_server_details
26
26
  base_url = Utils.template_url(url, params)
27
27
  url = "#{base_url}/connections"
@@ -36,7 +36,7 @@ module OpenApiSDK
36
36
 
37
37
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
38
38
 
39
- res = ::OpenApiSDK::Operations::RetrieveConnectionsResponse.new(
39
+ res = ::OpenApiSDK::Operations::ListConnectionsResponse.new(
40
40
  status_code: r.status, content_type: content_type, raw_response: r
41
41
  )
42
42
  if r.status == 200
@@ -8,7 +8,7 @@ module OpenApiSDK
8
8
  module Operations
9
9
 
10
10
 
11
- class RetrieveConnectionsResponse < ::OpenApiSDK::Utils::FieldAugmented
11
+ class ListConnectionsResponse < ::OpenApiSDK::Utils::FieldAugmented
12
12
  extend T::Sig
13
13
 
14
14
  # HTTP response content type for this operation
@@ -0,0 +1,27 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module OpenApiSDK
8
+ module Operations
9
+
10
+
11
+ class QueryRequest < ::OpenApiSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+
15
+ field :query_body, ::OpenApiSDK::Shared::QueryBody, { 'request': { 'media_type': 'application/json' } }
16
+ # The connection token
17
+ field :x_connection_token, ::String, { 'header': { 'field_name': 'x-connection-token', 'style': 'simple', 'explode': false } }
18
+
19
+
20
+ sig { params(query_body: ::OpenApiSDK::Shared::QueryBody, x_connection_token: ::String).void }
21
+ def initialize(query_body: nil, x_connection_token: nil)
22
+ @query_body = query_body
23
+ @x_connection_token = x_connection_token
24
+ end
25
+ end
26
+ end
27
+ end
@@ -8,7 +8,7 @@ module OpenApiSDK
8
8
  module Operations
9
9
 
10
10
 
11
- class RagControllerQueryEmbeddingsResponse < ::OpenApiSDK::Utils::FieldAugmented
11
+ class QueryResponse < ::OpenApiSDK::Utils::FieldAugmented
12
12
  extend T::Sig
13
13
 
14
14
  # HTTP response content type for this operation
@@ -18,10 +18,10 @@ module OpenApiSDK
18
18
  # HTTP response status code for this operation
19
19
  field :status_code, ::Integer
20
20
 
21
- field :object, T.nilable(::OpenApiSDK::Operations::RagControllerQueryEmbeddingsResponseBody)
21
+ field :object, T.nilable(::OpenApiSDK::Operations::QueryResponseBody)
22
22
 
23
23
 
24
- sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, object: T.nilable(::OpenApiSDK::Operations::RagControllerQueryEmbeddingsResponseBody)).void }
24
+ sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, object: T.nilable(::OpenApiSDK::Operations::QueryResponseBody)).void }
25
25
  def initialize(content_type: nil, raw_response: nil, status_code: nil, object: nil)
26
26
  @content_type = content_type
27
27
  @raw_response = raw_response
@@ -8,7 +8,7 @@ module OpenApiSDK
8
8
  module Operations
9
9
 
10
10
 
11
- class RagControllerQueryEmbeddingsResponseBody < ::OpenApiSDK::Utils::FieldAugmented
11
+ class QueryResponseBody < ::OpenApiSDK::Utils::FieldAugmented
12
12
  extend T::Sig
13
13
 
14
14
 
@@ -7,8 +7,9 @@ module OpenApiSDK
7
7
  module Operations
8
8
  autoload :HelloResponse, 'open_api_sdk/models/operations/hello_response.rb'
9
9
  autoload :HealthResponse, 'open_api_sdk/models/operations/health_response.rb'
10
- autoload :RagControllerQueryEmbeddingsResponseBody, 'open_api_sdk/models/operations/ragcontroller_queryembeddings_responsebody.rb'
11
- autoload :RagControllerQueryEmbeddingsResponse, 'open_api_sdk/models/operations/ragcontroller_queryembeddings_response.rb'
10
+ autoload :QueryRequest, 'open_api_sdk/models/operations/query_request.rb'
11
+ autoload :QueryResponseBody, 'open_api_sdk/models/operations/query_responsebody.rb'
12
+ autoload :QueryResponse, 'open_api_sdk/models/operations/query_response.rb'
12
13
  autoload :ListFilestorageFileRequest, 'open_api_sdk/models/operations/listfilestoragefile_request.rb'
13
14
  autoload :ListFilestorageFileResponseBody, 'open_api_sdk/models/operations/listfilestoragefile_responsebody.rb'
14
15
  autoload :ListFilestorageFileResponse, 'open_api_sdk/models/operations/listfilestoragefile_response.rb'
@@ -17,7 +18,7 @@ module OpenApiSDK
17
18
  autoload :RetrieveFilestorageFileRequest, 'open_api_sdk/models/operations/retrievefilestoragefile_request.rb'
18
19
  autoload :RetrieveFilestorageFileResponse, 'open_api_sdk/models/operations/retrievefilestoragefile_response.rb'
19
20
  autoload :SignInResponse, 'open_api_sdk/models/operations/signin_response.rb'
20
- autoload :RetrieveConnectionsResponse, 'open_api_sdk/models/operations/retrieveconnections_response.rb'
21
+ autoload :ListConnectionsResponse, 'open_api_sdk/models/operations/listconnections_response.rb'
21
22
  autoload :ListWebhooksResponse, 'open_api_sdk/models/operations/listwebhooks_response.rb'
22
23
  autoload :CreateWebhookPublicResponse, 'open_api_sdk/models/operations/createwebhookpublic_response.rb'
23
24
  autoload :DeleteRequest, 'open_api_sdk/models/operations/delete_request.rb'
@@ -0,0 +1,27 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module OpenApiSDK
8
+ module Shared
9
+
10
+
11
+ class QueryBody < ::OpenApiSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # The query you want to received embeddings adn chunks for
15
+ field :query, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('query') } }
16
+ # The number of most appropriate documents for your query.
17
+ field :top_k, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('topK') } }
18
+
19
+
20
+ sig { params(query: ::String, top_k: T.nilable(::Float)).void }
21
+ def initialize(query: nil, top_k: nil)
22
+ @query = query
23
+ @top_k = top_k
24
+ end
25
+ end
26
+ end
27
+ end
@@ -5,6 +5,7 @@
5
5
 
6
6
  module OpenApiSDK
7
7
  module Shared
8
+ autoload :QueryBody, 'open_api_sdk/models/shared/querybody.rb'
8
9
  autoload :UnifiedFilestorageFileOutput, 'open_api_sdk/models/shared/unifiedfilestoragefileoutput.rb'
9
10
  autoload :UnifiedFilestorageFileInput, 'open_api_sdk/models/shared/unifiedfilestoragefileinput.rb'
10
11
  autoload :LoginDto, 'open_api_sdk/models/shared/logindto.rb'
@@ -19,29 +19,45 @@ module OpenApiSDK
19
19
  end
20
20
 
21
21
 
22
- sig { returns(::OpenApiSDK::Operations::RagControllerQueryEmbeddingsResponse) }
23
- def rag_controller_query_embeddings
24
-
22
+ sig { params(x_connection_token: ::String, query_body: ::OpenApiSDK::Shared::QueryBody).returns(::OpenApiSDK::Operations::QueryResponse) }
23
+ def query(x_connection_token, query_body)
24
+ # query - Query using RAG Search
25
+ # Query across your connected data sources using RAG Search
26
+ request = ::OpenApiSDK::Operations::QueryRequest.new(
27
+
28
+ x_connection_token: x_connection_token,
29
+ query_body: query_body
30
+ )
25
31
  url, params = @sdk_configuration.get_server_details
26
32
  base_url = Utils.template_url(url, params)
27
33
  url = "#{base_url}/rag/query"
28
- headers = {}
34
+ headers = Utils.get_headers(request)
35
+ req_content_type, data, form = Utils.serialize_request_body(request, :query_body, :json)
36
+ headers['content-type'] = req_content_type
37
+ raise StandardError, 'request body is required' if data.nil? && form.nil?
29
38
  headers['Accept'] = 'application/json'
30
39
  headers['user-agent'] = @sdk_configuration.user_agent
31
40
 
32
41
  r = @sdk_configuration.client.post(url) do |req|
33
42
  req.headers = headers
34
43
  Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
44
+ if form
45
+ req.body = Utils.encode_form(form)
46
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
47
+ req.body = URI.encode_www_form(data)
48
+ else
49
+ req.body = data
50
+ end
35
51
  end
36
52
 
37
53
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
38
54
 
39
- res = ::OpenApiSDK::Operations::RagControllerQueryEmbeddingsResponse.new(
55
+ res = ::OpenApiSDK::Operations::QueryResponse.new(
40
56
  status_code: r.status, content_type: content_type, raw_response: r
41
57
  )
42
58
  if r.status == 201
43
59
  if Utils.match_content_type(content_type, 'application/json')
44
- out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::RagControllerQueryEmbeddingsResponseBody)
60
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::QueryResponseBody)
45
61
  res.object = out
46
62
  end
47
63
  end
@@ -40,9 +40,9 @@ module OpenApiSDK
40
40
  @security = security
41
41
  @language = 'ruby'
42
42
  @openapi_doc_version = '1.0'
43
- @sdk_version = '0.2.4'
44
- @gen_version = '2.415.7'
45
- @user_agent = 'speakeasy-sdk/ruby 0.2.4 2.415.7 1.0 panora'
43
+ @sdk_version = '0.2.5'
44
+ @gen_version = '2.415.8'
45
+ @user_agent = 'speakeasy-sdk/ruby 0.2.5 2.415.8 1.0 panora'
46
46
  end
47
47
 
48
48
  sig { returns([String, T::Hash[Symbol, String]]) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panora
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Panora
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-14 00:00:00.000000000 Z
11
+ date: 2024-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -418,6 +418,7 @@ files:
418
418
  - lib/open_api_sdk/models/operations/listatsusers_request.rb
419
419
  - lib/open_api_sdk/models/operations/listatsusers_response.rb
420
420
  - lib/open_api_sdk/models/operations/listatsusers_responsebody.rb
421
+ - lib/open_api_sdk/models/operations/listconnections_response.rb
421
422
  - lib/open_api_sdk/models/operations/listcrmcompany_request.rb
422
423
  - lib/open_api_sdk/models/operations/listcrmcompany_response.rb
423
424
  - lib/open_api_sdk/models/operations/listcrmcompany_responsebody.rb
@@ -571,8 +572,9 @@ files:
571
572
  - lib/open_api_sdk/models/operations/listticketingusers_responsebody.rb
572
573
  - lib/open_api_sdk/models/operations/listwebhooks_response.rb
573
574
  - lib/open_api_sdk/models/operations/map_response.rb
574
- - lib/open_api_sdk/models/operations/ragcontroller_queryembeddings_response.rb
575
- - lib/open_api_sdk/models/operations/ragcontroller_queryembeddings_responsebody.rb
575
+ - lib/open_api_sdk/models/operations/query_request.rb
576
+ - lib/open_api_sdk/models/operations/query_response.rb
577
+ - lib/open_api_sdk/models/operations/query_responsebody.rb
576
578
  - lib/open_api_sdk/models/operations/remoteid_request.rb
577
579
  - lib/open_api_sdk/models/operations/remoteid_response.rb
578
580
  - lib/open_api_sdk/models/operations/request_passthrough_responsebody.rb
@@ -652,7 +654,6 @@ files:
652
654
  - lib/open_api_sdk/models/operations/retrieveatsuser_response.rb
653
655
  - lib/open_api_sdk/models/operations/retrievecollection_request.rb
654
656
  - lib/open_api_sdk/models/operations/retrievecollection_response.rb
655
- - lib/open_api_sdk/models/operations/retrieveconnections_response.rb
656
657
  - lib/open_api_sdk/models/operations/retrievecrmcompany_request.rb
657
658
  - lib/open_api_sdk/models/operations/retrievecrmcompany_response.rb
658
659
  - lib/open_api_sdk/models/operations/retrievecrmcontact_request.rb
@@ -800,6 +801,7 @@ files:
800
801
  - lib/open_api_sdk/models/shared/passthroughrequestdto_method.rb
801
802
  - lib/open_api_sdk/models/shared/phone.rb
802
803
  - lib/open_api_sdk/models/shared/projectresponse.rb
804
+ - lib/open_api_sdk/models/shared/querybody.rb
803
805
  - lib/open_api_sdk/models/shared/remote_data.rb
804
806
  - lib/open_api_sdk/models/shared/resyncstatusdto.rb
805
807
  - lib/open_api_sdk/models/shared/security.rb