omniai-mistral 1.9.3 → 1.9.4

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: 7542644aa7da4d976fee86f9ab0355eaeeb7ad96b86a35352eba66b4fc2c1560
4
- data.tar.gz: ed1e332e34be28000f44e50a567869464805cfe19856dfaa9724f2cae8b5082e
3
+ metadata.gz: b796770534ec1420fe7c017383e4434ef0130424c6ad2e0e8dfbe3d57022329b
4
+ data.tar.gz: c0be52f361b1607061717010fcc7fdea4fc25a60c7928c328d08bf95a0d4d3e9
5
5
  SHA512:
6
- metadata.gz: e028445572c9aec579363a3f60634e9140af3eed2de35b2996f69f592a53697a1b57421a964dcfc092dba628660aacc76bd4ec01dd55a59ed5bd9782356eb7b0
7
- data.tar.gz: f2d4f7578ec562b229cdd2129d33de2befb3a8fb8dd763f512707cf61f193621bba68256dc4b400a0b5b046f9fa74c299a4221268769cc678e978f7194358f05
6
+ metadata.gz: 69edf5267d53f42e23c9e963ea9c252e09b3760282dbf8f7c64de112284f610f2bc749a52809f33ab52b2da3466b66ff9f5011afcc0a7f66f2936339ad995e15
7
+ data.tar.gz: 8941b02a911f0db34a07bdab7c510584dec15cd889eb47e49428baed0266ca2edb03401dbf45355e0f3551c031e4d5a62302ff3a0946ec37e5bef3aa7921e80e
data/Gemfile CHANGED
@@ -1,15 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
4
4
 
5
5
  gemspec
6
6
 
7
- gem 'rake'
8
- gem 'rspec'
9
- gem 'rspec_junit_formatter'
10
- gem 'rubocop'
11
- gem 'rubocop-rake'
12
- gem 'rubocop-rspec'
13
- gem 'simplecov'
14
- gem 'webmock'
15
- gem 'yard'
7
+ gem "rake"
8
+ gem "rspec"
9
+ gem "rspec_junit_formatter"
10
+ gem "rubocop"
11
+ gem "rubocop-basic"
12
+ gem "rubocop-rake"
13
+ gem "rubocop-rspec"
14
+ gem "simplecov"
15
+ gem "webmock"
16
+ gem "yard"
@@ -13,23 +13,23 @@ module OmniAI
13
13
  # chat.completion([{ role: 'system', content: 'Tell me a joke.' }])
14
14
  class Chat < OmniAI::Chat
15
15
  module Model
16
- MISTRAL_SMALL_2409 = 'mistral-small-2409'
17
- MISTRAL_SMALL_LATEST = 'mistral-small-latest'
18
- MISTRAL_MEDIUM_2312 = 'mistral-medium-2312' # LEGACY
19
- MISTRAL_MEDIUM_LATEST = 'mistral-medium-latest' # LEGACY
20
- MISTRAL_LARGE_2411 = 'mistral-large-2411'
21
- MISTRAL_LARGE_LATEST = 'mistral-large-latest'
22
- CODESTRAL_2405 = 'codestral-2405'
23
- CODESTRAL_LATEST = 'codestral-latest'
24
- MINISTRAL_3B_2410 = 'ministral-3b-2410'
25
- MINISTRAL_3B_LATEST = 'ministral-3b-latest'
26
- MINISTRAL_8B_2410 = 'ministral-8b-2410'
27
- MINISTRAL_8B_LATEST = 'ministral-8b-latest'
28
- MISTRAL_MODERATION_2411 = 'mistral-moderation-2411'
29
- MISTRAL_MODERATION_LATEST = 'mistral-moderation-latest'
30
- MISTRAL_EMBED = 'mistral-embed'
31
- PIXTRAL_LARGE_2411 = 'pixtral-large-2411'
32
- PIXTRAL_LARGE_LATEST = 'pixtral-large-latest'
16
+ MISTRAL_SMALL_2409 = "mistral-small-2409"
17
+ MISTRAL_SMALL_LATEST = "mistral-small-latest"
18
+ MISTRAL_MEDIUM_2312 = "mistral-medium-2312" # LEGACY
19
+ MISTRAL_MEDIUM_LATEST = "mistral-medium-latest" # LEGACY
20
+ MISTRAL_LARGE_2411 = "mistral-large-2411"
21
+ MISTRAL_LARGE_LATEST = "mistral-large-latest"
22
+ CODESTRAL_2405 = "codestral-2405"
23
+ CODESTRAL_LATEST = "codestral-latest"
24
+ MINISTRAL_3B_2410 = "ministral-3b-2410"
25
+ MINISTRAL_3B_LATEST = "ministral-3b-latest"
26
+ MINISTRAL_8B_2410 = "ministral-8b-2410"
27
+ MINISTRAL_8B_LATEST = "ministral-8b-latest"
28
+ MISTRAL_MODERATION_2411 = "mistral-moderation-2411"
29
+ MISTRAL_MODERATION_LATEST = "mistral-moderation-latest"
30
+ MISTRAL_EMBED = "mistral-embed"
31
+ PIXTRAL_LARGE_2411 = "pixtral-large-2411"
32
+ PIXTRAL_LARGE_LATEST = "pixtral-large-latest"
33
33
  SMALL = MISTRAL_SMALL_LATEST
34
34
  MEDIUM = MISTRAL_MEDIUM_LATEST # LEGACY
35
35
  LARGE = MISTRAL_LARGE_LATEST
@@ -40,14 +40,14 @@ module OmniAI
40
40
  DEFAULT_MODEL = Model::PIXTRAL_LARGE_LATEST
41
41
 
42
42
  module Role
43
- ASSISTANT = 'assistant'
44
- USER = 'user'
45
- SYSTEM = 'system'
43
+ ASSISTANT = "assistant"
44
+ USER = "user"
45
+ SYSTEM = "system"
46
46
  end
47
47
 
48
- JSON_RESPONSE_FORMAT = { type: 'json_object' }.freeze
48
+ JSON_RESPONSE_FORMAT = { type: "json_object" }.freeze
49
49
 
50
- protected
50
+ protected
51
51
 
52
52
  # @return [Hash]
53
53
  def payload
@@ -20,7 +20,7 @@ module OmniAI
20
20
  #
21
21
  # client = OmniAI::Mistral::Client.new
22
22
  class Client < OmniAI::Client
23
- VERSION = 'v1'
23
+ VERSION = "v1"
24
24
 
25
25
  # @param api_key [String] optional - defaults to `OmniAI::Mistral.config.api_key`
26
26
  # @param host [String] optional - defaults to `OmniAI::Mistral.config.host`
@@ -4,15 +4,15 @@ module OmniAI
4
4
  module Mistral
5
5
  # Configuration for Mistral.
6
6
  class Config < OmniAI::Config
7
- DEFAULT_HOST = 'https://api.mistral.ai'
7
+ DEFAULT_HOST = "https://api.mistral.ai"
8
8
 
9
9
  # @param api_key [String, nil] optional - defaults to `ENV['MISTRAL_API_KEY']`
10
10
  # @param host [String, nil] optional - defaults to `ENV['MISTRAL_HOST'] w/ fallback to `DEFAULT_HOST`
11
11
  # @param logger [Logger, nil] optional - defaults to
12
12
  # @param timeout [Integer, Hash, nil] optional
13
13
  def initialize(
14
- api_key: ENV.fetch('MISTRAL_API_KEY', nil),
15
- host: ENV.fetch('MISTRAL_HOST', DEFAULT_HOST),
14
+ api_key: ENV.fetch("MISTRAL_API_KEY", nil),
15
+ host: ENV.fetch("MISTRAL_HOST", DEFAULT_HOST),
16
16
  logger: nil,
17
17
  timeout: nil
18
18
  )
@@ -11,12 +11,12 @@ module OmniAI
11
11
  # response.embedding [0.0, ...]
12
12
  class Embed < OmniAI::Embed
13
13
  module Model
14
- EMBED = 'mistral-embed'
14
+ EMBED = "mistral-embed"
15
15
  end
16
16
 
17
17
  DEFAULT_MODEL = Model::EMBED
18
18
 
19
- protected
19
+ protected
20
20
 
21
21
  # @return [Hash]
22
22
  def payload
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAI
4
4
  module Mistral
5
- VERSION = '1.9.3'
5
+ VERSION = "1.9.4"
6
6
  end
7
7
  end
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'event_stream_parser'
4
- require 'omniai'
5
- require 'zeitwerk'
3
+ require "event_stream_parser"
4
+ require "omniai"
5
+ require "zeitwerk"
6
6
 
7
7
  loader = Zeitwerk::Loader.for_gem
8
8
  loader.push_dir(__dir__, namespace: OmniAI)
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniai-mistral
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.3
4
+ version: 1.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Sylvestre
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-11-28 00:00:00.000000000 Z
10
+ date: 2025-01-18 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: event_stream_parser
@@ -74,7 +73,6 @@ metadata:
74
73
  homepage_uri: https://github.com/ksylvest/omniai-mistral
75
74
  changelog_uri: https://github.com/ksylvest/omniai-mistral/releases
76
75
  rubygems_mfa_required: 'true'
77
- post_install_message:
78
76
  rdoc_options: []
79
77
  require_paths:
80
78
  - lib
@@ -89,8 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
87
  - !ruby/object:Gem::Version
90
88
  version: '0'
91
89
  requirements: []
92
- rubygems_version: 3.5.14
93
- signing_key:
90
+ rubygems_version: 3.6.2
94
91
  specification_version: 4
95
92
  summary: A generalized framework for interacting with Mistral
96
93
  test_files: []