Harrison/pretty print (#57)

make stuff look nice
This commit is contained in:
Harrison Chase
2022-11-03 00:41:07 -07:00
committed by GitHub
parent dfb81c969f
commit 4cc18d6c2a
11 changed files with 180 additions and 64 deletions

View File

@@ -6,6 +6,24 @@
"id": "44e9ba31",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"How many of the integers between 0 and 99 inclusive are divisible by 8?\u001b[102m\n",
"\n",
"```python\n",
"count = 0\n",
"for i in range(100):\n",
" if i % 8 == 0:\n",
" count += 1\n",
"print(count)\n",
"```\n",
"\u001b[0m\n",
"Answer: \u001b[103m13\n",
"\u001b[0m"
]
},
{
"data": {
"text/plain": [
@@ -21,7 +39,7 @@
"from langchain import OpenAI, LLMMathChain\n",
"\n",
"llm = OpenAI(temperature=0)\n",
"llm_math = LLMMathChain(llm=llm)\n",
"llm_math = LLMMathChain(llm=llm, verbose=True)\n",
"\n",
"llm_math.run(\"How many of the integers between 0 and 99 inclusive are divisible by 8?\")"
]