From ef3df45d9da9dd7597266fb765672e9268700199 Mon Sep 17 00:00:00 2001 From: Dristy Srivastava <58721149+dristysrivastava@users.noreply.github.com> Date: Tue, 4 Jun 2024 04:06:17 +0530 Subject: [PATCH] community[minor]: Updating payload for pebblo discover API (#22309) **Description:** Updating response for pebblo discover API. Also updating filed name case type **Documentation:** N/A **Unit tests:** N/A --- .../langchain_community/document_loaders/pebblo.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/libs/community/langchain_community/document_loaders/pebblo.py b/libs/community/langchain_community/document_loaders/pebblo.py index 8a710a9a5b2..ed203b2c88d 100644 --- a/libs/community/langchain_community/document_loaders/pebblo.py +++ b/libs/community/langchain_community/document_loaders/pebblo.py @@ -327,17 +327,16 @@ class PebbloSafeLoader(BaseLoader): try: headers.update({"x-api-key": self.api_key}) if pebblo_resp: - pebblo_resp_docs = json.loads(pebblo_resp.text).get("ai_apps_data") + pebblo_server_version = json.loads(pebblo_resp.text).get( + "pebblo_server_version" + ) payload.update( { - "pebblo_server_version": pebblo_resp_docs.get( - "pebbloServerVersion" - ), - "pebblo_client_version": pebblo_resp_docs.get( - "pebbloClientVersion" - ), + "pebblo_server_version": pebblo_server_version, + "pebblo_client_version": payload["plugin_version"], } ) + payload.pop("plugin_version") pebblo_cloud_url = f"{PEBBLO_CLOUD_URL}{APP_DISCOVER_URL}" pebblo_cloud_response = requests.post( pebblo_cloud_url, headers=headers, json=payload, timeout=20