Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
S-Makrod committed Nov 7, 2024
1 parent c61733d commit 3ef9de0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/docs/integrations/tools/google_books.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
}
],
"source": [
"tool.run('ai')"
"tool.run(\"ai\")"
]
},
{
Expand Down Expand Up @@ -190,14 +190,16 @@
"\n",
"tool = GoogleBooksQueryRun(api_wrapper=GoogleBooksAPIWrapper())\n",
"llm = ChatOpenAI(model=\"gpt-4o-mini\")\n",
"prompt = PromptTemplate.from_template('Return the keyword, and only the keyword, that the user is looking for from this text: {text}')\n",
"prompt = PromptTemplate.from_template(\n",
" \"Return the keyword, and only the keyword, that the user is looking for from this text: {text}\"\n",
")\n",
"\n",
"def suggest_books(query):\n",
" chain = prompt | llm | StrOutputParser()\n",
" keyword = chain.invoke({'text': query})\n",
" keyword = chain.invoke({\"text\": query})\n",
" return tool.run(keyword)\n",
"\n",
"suggestions = suggest_books('I need some information on AI')\n",
"suggestions = suggest_books(\"I need some information on AI\")\n",
"print(suggestions)\n"
]
},
Expand Down

0 comments on commit 3ef9de0

Please sign in to comment.