Class: LLM::Mistral
- Includes:
- Mistral::RequestAdapter
- Defined in:
- lib/llm/providers/mistral.rb,
lib/llm/providers/mistral/request_adapter.rb
Overview
The Mistral class implements a provider for Mistral through its OpenAI-compatible API.
Defined Under Namespace
Modules: RequestAdapter
Constant Summary collapse
- HOST =
"api.mistral.ai"- BASE_PATH =
"/v1/"
Instance Method Summary collapse
- #audio ⇒ LLM::Mistral::Audio
-
#default_model ⇒ String
Returns the default model for chat completions.
-
#embed(input, model: "mistral-embed", **params) ⇒ LLM::Response
Provides an embedding.
- #files ⇒ Object
- #images ⇒ NotImplementedError
- #initialize(host: HOST, base_path: BASE_PATH) ⇒ LLM::Mistral constructor
- #moderations ⇒ Object
-
#name ⇒ Symbol
Returns the provider's name.
- #responses ⇒ Object
- #vector_stores ⇒ Object
Methods inherited from OpenAI
#assistant_role, #complete, #models, #server_tools, #web_search
Methods included from OpenAI::RequestAdapter
Methods inherited from Provider
#assistant_role, #chat, #complete, #developer_role, #inspect, #interrupt!, #key?, #models, #request_owner, #respond, #schema, #server_tool, #server_tools, #streamable?, #system_role, #tool_role, #tracer, #tracer=, #user_role, #web_search, #with, #with_tracer
Constructor Details
#initialize(host: HOST, base_path: BASE_PATH) ⇒ LLM::Mistral
31 32 33 |
# File 'lib/llm/providers/mistral.rb', line 31 def initialize(host: HOST, base_path: BASE_PATH, **) super end |
Instance Method Details
#audio ⇒ LLM::Mistral::Audio
67 68 69 |
# File 'lib/llm/providers/mistral.rb', line 67 def audio raise NotImplementedError end |
#default_model ⇒ String
Returns the default model for chat completions
92 93 94 |
# File 'lib/llm/providers/mistral.rb', line 92 def default_model "mistral-large-latest" end |
#embed(input, model: "mistral-embed", **params) ⇒ LLM::Response
Provides an embedding.
55 56 57 |
# File 'lib/llm/providers/mistral.rb', line 55 def (input, model: "mistral-embed", **params) super end |
#files ⇒ Object
73 74 75 |
# File 'lib/llm/providers/mistral.rb', line 73 def files raise NotImplementedError end |
#images ⇒ NotImplementedError
44 45 46 |
# File 'lib/llm/providers/mistral.rb', line 44 def images raise NotImplementedError end |
#moderations ⇒ Object
79 80 81 |
# File 'lib/llm/providers/mistral.rb', line 79 def moderations raise NotImplementedError end |
#name ⇒ Symbol
Returns the provider's name
38 39 40 |
# File 'lib/llm/providers/mistral.rb', line 38 def name :mistral end |
#responses ⇒ Object
61 62 63 |
# File 'lib/llm/providers/mistral.rb', line 61 def responses raise NotImplementedError end |
#vector_stores ⇒ Object
85 86 87 |
# File 'lib/llm/providers/mistral.rb', line 85 def vector_stores raise NotImplementedError end |