Skip to content

Commit

Permalink
allow users to specify a different server
Browse files Browse the repository at this point in the history
  • Loading branch information
fsndzomga committed Dec 22, 2023
1 parent da2223d commit c38c1f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mistral_rb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

class MistralAPI
include HTTParty
base_uri "https://api.mistral.ai/v1"

def initialize(api_key)
def initialize(api_key, base_uri = "https://api.mistral.ai/v1")
@headers = {
"Authorization" => "Bearer #{api_key}",
"Content-Type" => "application/json"
}
self.class.base_uri base_uri
end

def create_chat_completion(model, messages, temperature = 0.7, top_p = 1, max_tokens = nil, stream = false, safe_mode = false, random_seed = nil)
Expand Down

0 comments on commit c38c1f8

Please sign in to comment.