mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-27 17:08:47 +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.
|
List[str]: The list of ids that were added.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if self._client.index(self._index_name).get_settings()["index_defaults"][
|
settings = self._client.index(self._index_name).get_settings()
|
||||||
"treat_urls_and_pointers_as_images"
|
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(
|
raise ValueError(
|
||||||
"Marqo.add_texts is disabled for multimodal indexes. To add documents "
|
"Marqo.add_texts is disabled for multimodal indexes. To add documents "
|
||||||
"with a multimodal index use the Python client for Marqo directly."
|
"with a multimodal index use the Python client for Marqo directly."
|
||||||
|
Loading…
Reference in New Issue
Block a user