Skip to content

Initial Mistral implementation #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
3 changes: 2 additions & 1 deletion lib/ruby_llm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
'deepseek' => 'DeepSeek',
'bedrock' => 'Bedrock',
'openrouter' => 'OpenRouter',
'pdf' => 'PDF'
'mistral' => 'Mistral'
)
loader.ignore("#{__dir__}/tasks")
loader.ignore("#{__dir__}/ruby_llm/railtie")
Expand Down Expand Up @@ -83,6 +83,7 @@ def logger
RubyLLM::Provider.register :bedrock, RubyLLM::Providers::Bedrock
RubyLLM::Provider.register :openrouter, RubyLLM::Providers::OpenRouter
RubyLLM::Provider.register :ollama, RubyLLM::Providers::Ollama
RubyLLM::Provider.register :mistral, RubyLLM::Providers::Mistral

if defined?(Rails::Railtie)
require 'ruby_llm/railtie'
Expand Down
9 changes: 9 additions & 0 deletions lib/ruby_llm/aliases.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,14 @@
"o3-mini": {
"openai": "o3-mini",
"openrouter": "openai/o3-mini"
},
"mistral-medium": {
"mistral": "mistral/mistral-medium-latest"
},
"mistral-large": {
"mistral": "mistral/mistral-large"
},
"mistral-small": {
"mistral": "mistral/mistral-small"
}
}
2 changes: 2 additions & 0 deletions lib/ruby_llm/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class Configuration
:bedrock_session_token,
:openrouter_api_key,
:ollama_api_base,
:mistral_api_base,
:mistral_api_key,
# Default models
:default_model,
:default_embedding_model,
Expand Down
Loading