Add engine api (#1894)

This commit is contained in:
Chayenne
2024-11-02 22:03:38 -07:00
committed by GitHub
parent f4cd804073
commit 908dd7f9aa
5 changed files with 218 additions and 13 deletions

View File

@@ -113,10 +113,7 @@
"\n",
"response = requests.post(\n",
" \"http://localhost:30000/v1/embeddings\",\n",
" json={\n",
" \"model\": \"Alibaba-NLP/gte-Qwen2-7B-instruct\",\n",
" \"input\": text\n",
" }\n",
" json={\"model\": \"Alibaba-NLP/gte-Qwen2-7B-instruct\", \"input\": text},\n",
")\n",
"\n",
"text_embedding = response.json()[\"data\"][0][\"embedding\"]\n",