Skip to content

Commit 71ad3c2

Browse files
Fix Langchain::Vectorsearch::Milvus initializer by passing :api_key (#939)
* Fix Langchain::Vectorsearch::Milvus initializer by passing :api_key * CHANGELOG.md
1 parent a84d6d7 commit 71ad3c2

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- [SECURITY]: A change which fixes a security vulnerability.
1111

1212
## [Unreleased]
13+
- [BUGFIX] [https://github.com/patterns-ai-core/langchainrb/pull/939] Fix Langchain::Vectorsearch::Milvus initializer by passing :api_key
1314

1415
## [0.19.4] - 2025-02-17
1516
- [BREAKING] [https://github.com/patterns-ai-core/langchainrb/pull/894] Tools can now output image_urls, and all tool output must be wrapped by a tool_response() method

lib/langchain/vectorsearch/milvus.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def initialize(url:, index_name:, llm:, api_key: nil)
1616

1717
@client = ::Milvus::Client.new(
1818
url: url,
19+
api_key: api_key,
1920
logger: Langchain.logger
2021
)
2122
@index_name = index_name

spec/langchain/vectorsearch/milvus_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
subject {
99
described_class.new(
1010
url: "http://localhost:8000",
11+
api_key: "123",
1112
index_name: index_name,
1213
llm: Langchain::LLM::OpenAI.new(api_key: "123")
1314
)

0 commit comments

Comments
 (0)