Skip to content

Commit

Permalink
bump version to 0.0.99 (langchain-ai#1390)
Browse files Browse the repository at this point in the history
  • Loading branch information
hwchase17 authored and zachschillaci27 committed Mar 8, 2023
1 parent 0ddee7b commit 0699d0b
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 13 deletions.
95 changes: 83 additions & 12 deletions docs/modules/llms/integrations/openaichat.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 2,
"id": "62e0dbc3",
"metadata": {},
"outputs": [],
Expand All @@ -33,7 +33,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 3,
"id": "fbb043e6",
"metadata": {},
"outputs": [],
Expand All @@ -47,7 +47,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 4,
"id": "3f945b76",
"metadata": {},
"outputs": [],
Expand All @@ -57,7 +57,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 5,
"id": "25260808",
"metadata": {},
"outputs": [
Expand All @@ -67,7 +67,7 @@
"'\\n\\nJustin Bieber was born on March 1, 1994. \\n\\nThe Super Bowl is played in February of each year. \\n\\nTherefore, the Super Bowl that was played in the year Justin Bieber was born was Super Bowl XXVIII, which was played on January 30, 1994. \\n\\nThe Dallas Cowboys won Super Bowl XXVIII by defeating the Buffalo Bills with a score of 30-13.'"
]
},
"execution_count": 11,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -90,7 +90,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 6,
"id": "c27a1501",
"metadata": {},
"outputs": [],
Expand All @@ -100,7 +100,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 7,
"id": "e46a914e",
"metadata": {},
"outputs": [],
Expand All @@ -110,7 +110,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 8,
"id": "d683d9f2",
"metadata": {},
"outputs": [],
Expand All @@ -120,17 +120,17 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 9,
"id": "6f5b8e78",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'Step 1: Justin Bieber was born on March 1, 1994.\\nStep 2: The Super Bowl is played in February of each year.\\nStep 3: Therefore, the Super Bowl that was played in the year Justin Bieber was born was Super Bowl XXVIII, which was played on January 30, 1994.\\nStep 4: The Dallas Cowboys won Super Bowl XXVIII by defeating the Buffalo Bills with a score of 30-13.\\nStep 5: Therefore, the Dallas Cowboys were the NFL team that won the Super Bowl in the year Justin Bieber was born.'"
"'Step 1: Justin Bieber was born on March 1, 1994.\\nStep 2: The Super Bowl is played in February of each year.\\nStep 3: Therefore, the Super Bowl that was played in the year Justin Bieber was born was Super Bowl XXVIII, which was played on January 30, 1994.\\nStep 4: The team that won Super Bowl XXVIII was the Dallas Cowboys.'"
]
},
"execution_count": 22,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -141,10 +141,81 @@
"llm_chain.run(question)"
]
},
{
"cell_type": "markdown",
"id": "f6d5dda8",
"metadata": {},
"source": [
"## Async"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "1973b9bb",
"metadata": {},
"outputs": [],
"source": [
"result = await llm_chain.arun(question)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "5815178f",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'Step 1: Justin Bieber was born on March 1, 1994.\\nStep 2: The Super Bowl is played in February of each year.\\nStep 3: Therefore, the Super Bowl that was played in the year Justin Bieber was born was Super Bowl XXVIII, which was played on January 30, 1994.\\nStep 4: The team that won Super Bowl XXVIII was the Dallas Cowboys.'"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"result"
]
},
{
"cell_type": "markdown",
"id": "eb779f3f",
"metadata": {},
"source": [
"## Streaming"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "509181be",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"Justin Bieber was born on March 1, 1994. The NFL team that won the Super Bowl in the same year was the Dallas Cowboys. They defeated the Buffalo Bills 30-13 in Super Bowl XXVIII on January 30, 1994."
]
}
],
"source": [
"\n",
"from langchain.callbacks.base import CallbackManager\n",
"from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler\n",
"llm = OpenAIChat(streaming=True, callback_manager=CallbackManager([StreamingStdOutCallbackHandler()]), verbose=True, temperature=0)\n",
"resp = llm(question)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "44c0330d",
"id": "c095285d",
"metadata": {},
"outputs": [],
"source": []
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langchain"
version = "0.0.98"
version = "0.0.99"
description = "Building applications with LLMs through composability"
authors = []
license = "MIT"
Expand Down

0 comments on commit 0699d0b

Please sign in to comment.