Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions local-rag-app-llama3.2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
" VALUES (\n",
" %(title)s,\n",
" %(content)s,\n",
" ollama_embed('nomic-embed-text', concat(%(title)s, ' - ', %(content)s), _host=>'http://ollama:11434')\n",
" ai.ollama_embed('nomic-embed-text', concat(%(title)s, ' - ', %(content)s), host => 'http://ollama:11434')\n",
" )\n",
" \"\"\", doc)\n",
"\n",
Expand Down Expand Up @@ -212,7 +212,7 @@
" \n",
"# Embed the query using the ollama_embed function\n",
"cur.execute(\"\"\"\n",
" SELECT ollama_embed('nomic-embed-text', %s, _host=>'http://ollama:11434');\n",
" SELECT ai.ollama_embed('nomic-embed-text', %s, host => 'http://ollama:11434');\n",
"\"\"\", (query,))\n",
"query_embedding = cur.fetchone()[0]\n",
"\n",
Expand Down Expand Up @@ -267,7 +267,7 @@
"\n",
"# Generate the response using the ollama_generate function\n",
"cur.execute(\"\"\"\n",
" SELECT ollama_generate('llama3.2', %s, _host=>'http://ollama:11434');\n",
" SELECT ai.ollama_generate('llama3.2', %s, host => 'http://ollama:11434');\n",
"\"\"\", (f\"Query: {query}\\nContext: {context}\",))\n",
" \n",
"model_response = cur.fetchone()[0]\n",
Expand Down