Update notebooks to use dict instead of yaml and remove dataloaders (#1075)
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!pip install embedchain[dataloaders,opensource]"
|
||||
"!pip install embedchain[opensource]"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -55,51 +55,13 @@
|
||||
"from embedchain import App"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "Ns6RhPfbiitr"
|
||||
},
|
||||
"source": [
|
||||
"### Step-3: Define your llm and embedding model config"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "S9CkxVjriotB"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"config = \"\"\"\n",
|
||||
"llm:\n",
|
||||
" provider: gpt4all\n",
|
||||
" config:\n",
|
||||
" model: 'orca-mini-3b-gguf2-q4_0.gguf'\n",
|
||||
" temperature: 0.5\n",
|
||||
" max_tokens: 1000\n",
|
||||
" top_p: 1\n",
|
||||
" stream: false\n",
|
||||
"\n",
|
||||
"embedder:\n",
|
||||
" provider: gpt4all\n",
|
||||
" config:\n",
|
||||
" model: 'all-MiniLM-L6-v2'\n",
|
||||
"\"\"\"\n",
|
||||
"\n",
|
||||
"# Write the multi-line string to a YAML file\n",
|
||||
"with open('gpt4all.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"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -114,7 +76,24 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"app = App.from_config(config_path=\"gpt4all.yaml\")"
|
||||
"app = App.from_config(config={\n",
|
||||
" \"llm\": {\n",
|
||||
" \"provider\": \"gpt4all\",\n",
|
||||
" \"config\": {\n",
|
||||
" \"model\": \"orca-mini-3b-gguf2-q4_0.gguf\",\n",
|
||||
" \"temperature\": 0.5,\n",
|
||||
" \"max_tokens\": 1000,\n",
|
||||
" \"top_p\": 1,\n",
|
||||
" \"stream\": False\n",
|
||||
" }\n",
|
||||
" },\n",
|
||||
" \"embedder\": {\n",
|
||||
" \"provider\": \"gpt4all\",\n",
|
||||
" \"config\": {\n",
|
||||
" \"model\": \"all-MiniLM-L6-v2\"\n",
|
||||
" }\n",
|
||||
" }\n",
|
||||
"})"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -123,7 +102,7 @@
|
||||
"id": "XNXv4yZwi7ef"
|
||||
},
|
||||
"source": [
|
||||
"### Step-5: Add data sources to your app"
|
||||
"### Step-4: Add data sources to your app"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -148,7 +127,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"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user