mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-27 08:58:48 +00:00
Community: Marqo Index Setting GET Request Updated according to 2.x
API version while keep backward compatability for 1.5.x (#28342)
- **Description:** `add_texts` was using `get_setting` for marqo client which was being used according to 1.5.x API version. However, this PR updates the `add_text` accounting for updated response payload for 2.x and later while maintaining backward compatibility. Plus I have verified this was the only place where marqo client was not accounting for updated API version. - **Issue:** #28323 --------- Co-authored-by: ccurme <chester.curme@gmail.com>
This commit is contained in:
parent
7d95a10ada
commit
06fafc6651
@ -109,9 +109,12 @@ class Marqo(VectorStore):
|
||||
List[str]: The list of ids that were added.
|
||||
"""
|
||||
|
||||
if self._client.index(self._index_name).get_settings()["index_defaults"][
|
||||
"treat_urls_and_pointers_as_images"
|
||||
]:
|
||||
settings = self._client.index(self._index_name).get_settings()
|
||||
if (
|
||||
"index_defaults" in settings
|
||||
and settings["index_defaults"]["treat_urls_and_pointers_as_images"]
|
||||
or settings.get("treat_urls_and_pointers_as_images")
|
||||
):
|
||||
raise ValueError(
|
||||
"Marqo.add_texts is disabled for multimodal indexes. To add documents "
|
||||
"with a multimodal index use the Python client for Marqo directly."
|
||||
|
Loading…
Reference in New Issue
Block a user