|
@@ -26,7 +26,7 @@
|
|
|
},
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
|
- "!pip install embedchain[dataloaders,opensearch]"
|
|
|
+ "!pip install embedchain[opensearch]"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -54,49 +54,13 @@
|
|
|
"os.environ[\"OPENAI_API_KEY\"] = \"sk-xxx\""
|
|
|
]
|
|
|
},
|
|
|
- {
|
|
|
- "cell_type": "markdown",
|
|
|
- "metadata": {
|
|
|
- "id": "Ns6RhPfbiitr"
|
|
|
- },
|
|
|
- "source": [
|
|
|
- "### Step-3: Define your Vector Database config"
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- "cell_type": "code",
|
|
|
- "execution_count": null,
|
|
|
- "metadata": {
|
|
|
- "id": "S9CkxVjriotB"
|
|
|
- },
|
|
|
- "outputs": [],
|
|
|
- "source": [
|
|
|
- "config = \"\"\"\n",
|
|
|
- "vectordb:\n",
|
|
|
- " provider: opensearch\n",
|
|
|
- " config:\n",
|
|
|
- " opensearch_url: 'your-opensearch-url.com'\n",
|
|
|
- " http_auth:\n",
|
|
|
- " - admin\n",
|
|
|
- " - admin\n",
|
|
|
- " vector_dimension: 1536\n",
|
|
|
- " collection_name: 'my-app'\n",
|
|
|
- " use_ssl: false\n",
|
|
|
- " verify_certs: false\n",
|
|
|
- "\"\"\"\n",
|
|
|
- "\n",
|
|
|
- "# Write the multi-line string to a YAML file\n",
|
|
|
- "with open('opensearch.yaml', 'w') as file:\n",
|
|
|
- " file.write(config)"
|
|
|
- ]
|
|
|
- },
|
|
|
{
|
|
|
"cell_type": "markdown",
|
|
|
"metadata": {
|
|
|
"id": "PGt6uPLIi1CS"
|
|
|
},
|
|
|
"source": [
|
|
|
- "### Step-4 Create embedchain app based on the config"
|
|
|
+ "### Step-3 Create embedchain app and define your config"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -107,7 +71,17 @@
|
|
|
},
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
|
- "app = App.from_config(config_path=\"opensearch.yaml\")"
|
|
|
+ "app = App.from_config(config={\n",
|
|
|
+ " \"provider\": \"opensearch\",\n",
|
|
|
+ " \"config\": {\n",
|
|
|
+ " \"opensearch_url\": \"your-opensearch-url.com\",\n",
|
|
|
+ " \"http_auth\": [\"admin\", \"admin\"],\n",
|
|
|
+ " \"vector_dimension\": 1536,\n",
|
|
|
+ " \"collection_name\": \"my-app\",\n",
|
|
|
+ " \"use_ssl\": False,\n",
|
|
|
+ " \"verify_certs\": False\n",
|
|
|
+ " }\n",
|
|
|
+ "})"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -116,7 +90,7 @@
|
|
|
"id": "XNXv4yZwi7ef"
|
|
|
},
|
|
|
"source": [
|
|
|
- "### Step-5: Add data sources to your app"
|
|
|
+ "### Step-4: Add data sources to your app"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -136,7 +110,7 @@
|
|
|
"id": "_7W6fDeAjMAP"
|
|
|
},
|
|
|
"source": [
|
|
|
- "### Step-6: All set. Now start asking questions related to your data"
|
|
|
+ "### Step-5: All set. Now start asking questions related to your data"
|
|
|
]
|
|
|
},
|
|
|
{
|