mistral_rb 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1570bd9c52e22b55ab811b990c3a28c69200ca088200754e1f745f27d5fd3edc
4
- data.tar.gz: d6a2cae152c2e8c6adddde772638293bd4c17367f6ce63895791f5e1b5457d5f
3
+ metadata.gz: 69d426e25d1c19668cbde210ee7269a98e5769cb852c5184220c99460c7c2657
4
+ data.tar.gz: d0b6828a2313d6bdfd18e0879c8ba8b05a1559a3e4c045d0d26970a2e40fa1c9
5
5
  SHA512:
6
- metadata.gz: 8adfea6193cc0e1c45412e20887aeb977cca81540d3702ee2b6b310b769d545bcb7e4301a0250b34841009b98549ddec388baa96e3b8b9879b5a6da4e3dd7022
7
- data.tar.gz: 97bd65012511c60905c8fbcc0bad080bef2bafef2755b99bc2a05e29f1b48a5861a07f919b9fd49189c575814893b77028292dca5cfdc5e1d17588fd86ac86f8
6
+ metadata.gz: 647b05e72b0699d8e6c3bf74408cdb3b8cbc633b37221f0b53e074d1a28e7bf21ff74023c921f83b6a3df8882693d726716a328644e9b9bec53fc4d8dbebc333
7
+ data.tar.gz: ae4b88b5773aa88981220b8cf3c1c301ca262275be1f67c6d37b26e195896df099512632d405afd0ec85a4e985873e48670b9a282614b9e74a20289c7b0e70ef
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MistralRb
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
data/lib/mistral_rb.rb CHANGED
@@ -7,13 +7,13 @@ require_relative "mistral_rb/response_models"
7
7
 
8
8
  class MistralAPI
9
9
  include HTTParty
10
- base_uri "https://api.mistral.ai/v1"
11
10
 
12
- def initialize(api_key)
11
+ def initialize(api_key, base_uri = "https://api.mistral.ai/v1")
13
12
  @headers = {
14
13
  "Authorization" => "Bearer #{api_key}",
15
14
  "Content-Type" => "application/json"
16
15
  }
16
+ self.class.base_uri base_uri
17
17
  end
18
18
 
19
19
  def create_chat_completion(model, messages, temperature = 0.7, top_p = 1, max_tokens = nil, stream = false, safe_mode = false, random_seed = nil)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mistral_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franck Stephane Ndzomga