From da1bee6fec47a949b2ffdb693d27054cf3ac6f1b Mon Sep 17 00:00:00 2001 From: generall Date: Mon, 12 Aug 2024 16:44:06 +0200 Subject: [PATCH] add header for inderence proxy --- src/common/axios.js | 1 + src/common/client.js | 2 +- src/components/InteractiveTutorial/MdxPages/Quickstart.mdx | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/axios.js b/src/common/axios.js index abd135f4..61705539 100644 --- a/src/common/axios.js +++ b/src/common/axios.js @@ -17,6 +17,7 @@ function setupAxios({ apiKey }) { return data; } headers['Content-Type'] = 'application/json'; + headers['x-inference-proxy'] = 'true'; return bigIntJSON.stringify(data); }, ]; diff --git a/src/common/client.js b/src/common/client.js index 29191293..40ae9791 100644 --- a/src/common/client.js +++ b/src/common/client.js @@ -9,7 +9,7 @@ import { getBaseURL } from './utils'; export class QdrantClientExtended extends QdrantClient { #downloadController; constructor({ url, apiKey, port }) { - super({ url, apiKey, port }); + super({ url, apiKey, port, headers: { 'x-inference-proxy': 'true' } }); this.downloadSnapshot = this.downloadSnapshot.bind(this); this.getSnapshotUploadUrl = this.getSnapshotUploadUrl.bind(this); diff --git a/src/components/InteractiveTutorial/MdxPages/Quickstart.mdx b/src/components/InteractiveTutorial/MdxPages/Quickstart.mdx index 8fc571da..2e4f3eb4 100644 --- a/src/components/InteractiveTutorial/MdxPages/Quickstart.mdx +++ b/src/components/InteractiveTutorial/MdxPages/Quickstart.mdx @@ -65,7 +65,10 @@ PUT collections/test_collection/points ## Run a query We need to ask a question in vector form: -
*Which of our stored vectors are most similar to the query vector ?*
`[0.2, 0.1, 0.9, 0.7]` + +*Which of our stored vectors are most similar to the query vector ?* + +`[0.2, 0.1, 0.9, 0.7]` ```json withRunButton=true POST collections/test_collection/points/search