patterns-ai-core / langchainrb

Build LLM-powered applications in Ruby
https://rubydoc.info/gems/langchainrb
MIT License
1.44k stars 195 forks source link

Allow passing Sequel connection options #842

Open bborn opened 1 month ago

bborn commented 1 month ago

Fixes #800 by allowing you to pass connection options to Sequel:

Langchain::Vectorsearch::Pgvector.new(
  url: ENV["POSTGRES_URL"],
  index_name: "products",
  llm: Langchain::LLM::OpenAI.new(api_key: "123"),
  connection_options: {
    max_connections: 10
  }
)