Gem version: 0.15.2
Seems like URI dependency is overlooked for
this:
input
llm = Langchain::LLM::GoogleGemini.new(api_key: ENV["GEMINI_API_KEY"])
llm.chat(messages: [{role: "user", content: "What is the meaning of life?"}]).completion
output - should Summarize the text:
irb(main):014> llm.chat(messages: [{role: "user", content: "What is the meaning of life?"}])
/usr/local/google/home/ricc/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/langchainrb-0.15.2/lib/langchain/llm/google_gemini.rb:61:in `chat': undefined method `URI' for #<Langchain::LLM::GoogleGemini:0x00007f8e13229a18 @api_key="REDACTED", @defaults={:chat_completion_model_name=>"gemini-1.5-pro-latest", :embeddings_model_name=>"text-embedding-004", :temperature=>0.0}, @chat_parameters=#<Langchain::LLM::UnifiedParameters:0x00007f8e14506500 @schema={:messages=>{}, :model=>{:default=>"gemini-1.5-pro-latest"}, :prompt=>{}, :system=>{}, :response_format=>{}, :stop=>{}, :stream=>{}, :max_tokens=>{}, :temperature=>{:default=>0.0}, :top_p=>{}, :top_k=>{}, :frequency_penalty=>{}, :presence_penalty=>{}, :repetition_penalty=>{}, :seed=>{}, :tools=>{:default=>[]}, :tool_choice=>{}, :logit_bias=>{}, :generation_config=>{:default=>nil}, :safety_settings=>{:default=>nil}, :contents=>{}, :system_instruction=>{}, :tool_config=>{}}, @aliases={}, @remapped={:messages=>:contents, :system=>:system_instruction, :tool_choice=>:tool_config}, @ignored=#<Set: {}>, @parameters={:model=>"gemini-1.5-pro-latest", :contents=>[{:role=>"user", :content=>"What is the meaning of life?"}], :generation_config=>{:temperature=>0.0}}>> (NoMethodError)
uri = URI("https://generativelanguage.googleapis.com/v1beta/models/#{parameters[:model]}:generateContent?key=#{api_key}")
^^^
Gem version: 0.15.2 Seems like URI dependency is overlooked for this:
input
output - should Summarize the text: