Method: Langchain::Vectorsearch::Milvus#initialize

Defined in:
lib/langchain/vectorsearch/milvus.rb

#initialize(url:, index_name:, llm:, api_key: nil) ⇒ Milvus

Wrapper around Milvus REST APIs.

Gem requirements:

gem "milvus", "~> 0.10.3"

Usage:

milvus = Langchain::Vectorsearch::Milvus.new(url:, index_name:, llm:, api_key:)


14
15
16
17
18
19
20
21
22
23
24
# File 'lib/langchain/vectorsearch/milvus.rb', line 14

def initialize(url:, index_name:, llm:, api_key: nil)
  depends_on "milvus"

  @client = ::Milvus::Client.new(
    url: url,
    logger: Langchain.logger
  )
  @index_name = index_name

  super(llm: llm)
end