Skip to content

Commit

Permalink
build rag with milvus and ollama tutorial: run black
Browse files Browse the repository at this point in the history
  • Loading branch information
jinhonglin-ryan committed Nov 27, 2024
1 parent c40bd51 commit 79e7ffe
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,14 @@
"name": "stdout",
"output_type": "stream",
"text": [
"\u001B[?25lpulling manifest ⠋ \u001B[?25h\u001B[?25l\u001B[2K\u001B[1Gpulling manifest ⠙ \u001B[?25h\u001B[?25l\u001B[2K\u001B[1Gpulling manifest ⠹ \u001B[?25h\u001B[?25l\u001B[2K\u001B[1Gpulling manifest ⠸ \u001B[?25h\u001B[?25l\u001B[2K\u001B[1Gpulling manifest ⠼ \u001B[?25h\u001B[?25l\u001B[2K\u001B[1Gpulling manifest ⠴ \u001B[?25h\u001B[?25l\u001B[2K\u001B[1Gpulling manifest ⠦ \u001B[?25h\u001B[?25l\u001B[2K\u001B[1Gpulling manifest ⠧ \u001B[?25h\u001B[?25l\u001B[2K\u001B[1Gpulling manifest ⠇ \u001B[?25h\u001B[?25l\u001B[2K\u001B[1Gpulling manifest ⠏ \u001B[?25h\u001B[?25l\u001B[2K\u001B[1Gpulling manifest ⠋ \u001B[?25h\u001B[?25l\u001B[2K\u001B[1Gpulling manifest ⠙ \u001B[?25h\u001B[?25l\u001B[2K\u001B[1Gpulling manifest ⠹ \u001B[?25h\u001B[?25l\u001B[2K\u001B[1Gpulling manifest ⠸ \u001B[?25h\u001B[?25l\u001B[2K\u001B[1Gpulling manifest \r\n",
"\u001b[?25lpulling manifest ⠋ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gpulling manifest ⠙ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gpulling manifest ⠹ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gpulling manifest ⠸ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gpulling manifest ⠼ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gpulling manifest ⠴ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gpulling manifest ⠦ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gpulling manifest ⠧ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gpulling manifest ⠇ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gpulling manifest ⠏ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gpulling manifest ⠋ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gpulling manifest ⠙ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gpulling manifest ⠹ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gpulling manifest ⠸ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gpulling manifest \r\n",
"pulling 819c2adf5ce6... 100% ▕████████████████▏ 669 MB \r\n",
"pulling c71d239df917... 100% ▕████████████████▏ 11 KB \r\n",
"pulling b837481ff855... 100% ▕████████████████▏ 16 B \r\n",
"pulling 38badd946f91... 100% ▕████████████████▏ 408 B \r\n",
"verifying sha256 digest \r\n",
"writing manifest \r\n",
"success \u001B[?25h\r\n"
"success \u001b[?25h\r\n"
]
}
],
Expand All @@ -193,7 +193,8 @@
},
"outputs": [],
"source": [
"import ollama \n",
"import ollama\n",
"\n",
"\n",
"def emb_text(text):\n",
" response = ollama.embeddings(model=\"mxbai-embed-large\", prompt=text)\n",
Expand Down Expand Up @@ -568,12 +569,14 @@
"from ollama import chat\n",
"from ollama import ChatResponse\n",
"\n",
"response: ChatResponse = chat(model='llama3.2', messages=[\n",
"response: ChatResponse = chat(\n",
" model=\"llama3.2\",\n",
" messages=[\n",
" {\"role\": \"system\", \"content\": SYSTEM_PROMPT},\n",
" {\"role\": \"user\", \"content\": USER_PROMPT},\n",
" ]\n",
" ],\n",
")\n",
"print(response['message']['content'])"
"print(response[\"message\"][\"content\"])"
]
},
{
Expand Down

0 comments on commit 79e7ffe

Please sign in to comment.