mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-19 05:13:46 +00:00
community[patch]: Remove redundant pebblo cloud api call (#21589)
Description: removed redundant pebblo cloud api call. Changed classified `doc` key to `ai_apps_data`. Documentation: N/A Unit tests: N/A
This commit is contained in:
parent
d07885f8b7
commit
96bd0b0844
@ -303,12 +303,6 @@ class PebbloSafeLoader(BaseLoader):
|
||||
pebblo_resp = requests.post(
|
||||
app_discover_url, headers=headers, json=payload, timeout=20
|
||||
)
|
||||
if self.api_key:
|
||||
pebblo_cloud_url = f"{PEBBLO_CLOUD_URL}/v1/discover"
|
||||
headers.update({"x-api-key": self.api_key})
|
||||
_ = requests.post(
|
||||
pebblo_cloud_url, headers=headers, json=payload, timeout=20
|
||||
)
|
||||
logger.debug(
|
||||
"send_discover[local]: request url %s, body %s len %s\
|
||||
response status %s body %s",
|
||||
@ -333,13 +327,13 @@ class PebbloSafeLoader(BaseLoader):
|
||||
try:
|
||||
headers.update({"x-api-key": self.api_key})
|
||||
if pebblo_resp:
|
||||
pebblo_resp_docs = json.loads(pebblo_resp.text).get("docs")
|
||||
pebblo_resp_docs = json.loads(pebblo_resp.text).get("ai_apps_data")
|
||||
payload.update(
|
||||
{
|
||||
"pebbloServerVersion": pebblo_resp_docs.get(
|
||||
"pebblo_server_version": pebblo_resp_docs.get(
|
||||
"pebbloServerVersion"
|
||||
),
|
||||
"pebbloClientVersion": pebblo_resp_docs.get(
|
||||
"pebblo_client_version": pebblo_resp_docs.get(
|
||||
"pebbloClientVersion"
|
||||
),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user