Sha256: 6e51d1fa42a1f61dcde5cf7719bd798df6b456f19e3060bf73dc65daa46fd22f
Contents?: true
Size: 1.53 KB
Versions: 1
Compression:
Stored size: 1.53 KB
Contents
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. # typed: true # frozen_string_literal: true require 'faraday' require 'faraday/multipart' require 'sorbet-runtime' module OpenApiSDK extend T::Sig class RagQuery extend T::Sig sig { params(sdk_config: SDKConfiguration).void } def initialize(sdk_config) @sdk_configuration = sdk_config end sig { returns(::OpenApiSDK::Operations::RagControllerQueryEmbeddingsResponse) } def rag_controller_query_embeddings url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = "#{base_url}/rag/query" headers = {} headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent r = @sdk_configuration.client.post(url) do |req| req.headers = headers Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? end content_type = r.headers.fetch('Content-Type', 'application/octet-stream') res = ::OpenApiSDK::Operations::RagControllerQueryEmbeddingsResponse.new( status_code: r.status, content_type: content_type, raw_response: r ) if r.status == 201 if Utils.match_content_type(content_type, 'application/json') out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::RagControllerQueryEmbeddingsResponseBody) res.object = out end end res end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
panora-0.2.4 | lib/open_api_sdk/rag_query.rb |