Skip to content

Commit

Permalink
Fix for 1890 upsert returns text not JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
automaton82 committed Mar 6, 2024
1 parent 9dfa259 commit 6004700
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/ui/src/views/vectorstore/VectorStoreDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ API_URL = "${baseURL}/api/v1/vector/upsert/${dialogProps.chatflowid}"
def query(payload):
response = requests.post(API_URL, json=payload)
return response.json()
return response.text
output = query({
${isMultiple ? `"stopNodeId": "${vectorNodeId}",\n ` : ``}"overrideConfig": {${getConfigExamplesForPython(
Expand All @@ -133,7 +133,7 @@ output = query({
body: JSON.stringify(data)
}
);
const result = await response.json();
const result = await response.text();
return result;
}
Expand Down Expand Up @@ -184,7 +184,7 @@ body_data = {${getConfigExamplesForPython(configData, 'formData', isMultiple, ve
def query(form_data, body_data):
response = requests.post(API_URL, files=form_data, data=body_data)
return response.json()
return response.text
output = query(form_data, body_data)
`
Expand All @@ -200,7 +200,7 @@ async function query(formData) {
body: formData
}
);
const result = await response.json();
const result = await response.text();
return result;
}
Expand Down

0 comments on commit 6004700

Please sign in to comment.