Hi @xinyang,
Please make sure you have all of the required library packages installed, and they are the same version as used in the course.
Best,
Mubsi
just do this - pip install aiosqlite
install this package https://pypi.org/project/langgraph-checkpoint-sqlite/
and import like this (from docs):
from langgraph.checkpoint.sqlite.aio import AsyncSqliteSaver
Thanks, I tried it by installing the package and importing it with the code you shared:
from langgraph.checkpoint.sqlite.aio import AsyncCheckpoint
It worked perfectly in my setup, and it solved my issue. Very helpful!
Can we get the requirements.txt
from when the course was originally made. Once we have the versions of packages installed then we should be able to follow along. Bit surprised it is so hard to get this information.
I have created a github repo with the updated packages but I’d prefer to use the original versions even if they are out of date so I can at least understand the concepts being taught in that course and then update the dependencies later.
I did execute !pip3 list
in the Persistence and streaming chapter but it gives me everything under the sun but I just need the ones that are relevant to this chapter
aiofiles==23.2.1
aiohttp==3.9.5
aiosignal==1.3.1
aiosqlite==0.20.0
altair==5.3.0
annotated-types==0.7.0
anyio==3.7.1
appnope==0.1.4
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.3.0
asttokens==2.4.1
attrs==23.2.0
beautifulsoup4==4.12.3
bleach==6.1.0
Brotli==1.1.0
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
comm==0.2.2
contourpy==1.2.1
cycler==0.12.1
dataclasses-json==0.6.6
debugpy==1.8.1
decorator==5.1.1
defusedxml==0.7.1
distro==1.9.0
dnspython==2.6.1
duckduckgo_search==5.3.1b1
email_validator==2.1.1
entrypoints==0.4
executing==2.0.1
fastapi==0.111.0
fastapi-cli==0.0.4
fastjsonschema==2.19.1
ffmpy==0.3.2
filelock==3.14.0
fonttools==4.51.0
fqdn==1.5.1
frozenlist==1.4.1
fsspec==2024.5.0
gradio==4.31.3
gradio_client==0.16.3
greenlet==3.0.3
h11==0.14.0
h2==4.1.0
hpack==4.0.0
httpcore==1.0.5
httptools==0.6.1
httpx==0.27.0
huggingface-hub==0.23.1
hyperframe==6.0.1
idna==3.7
importlib_resources==6.4.0
install==1.3.5
ipykernel==6.29.4
ipython==8.18.1
ipython-genutils==0.2.0
ipywidgets==8.1.0
isoduration==20.11.0
jedi==0.19.1
Jinja2==3.1.4
jsonpatch==1.33
jsonpointer==2.4
jsonschema==4.22.0
jsonschema-specifications==2023.12.1
jupyter-client==7.3.2
jupyter_core==5.7.2
jupyter-events==0.10.0
jupyter-server==1.24.0
jupyter_server_terminals==0.4.4
jupyterlab_pygments==0.3.0
jupyterlab_widgets==3.0.10
kiwisolver==1.4.5
langchain==0.2.0
langchain-community==0.2.0
langchain-core==0.2.0
langchain-openai==0.1.7
langchain-text-splitters==0.2.0
langgraph==0.0.53
langsmith==0.1.62
Markdown==3.4.3
markdown-it-py==3.0.0
MarkupSafe==2.1.5
marshmallow==3.21.2
matplotlib==3.9.0
matplotlib-inline==0.1.7
mdurl==0.1.2
mistune==3.0.2
multidict==6.0.5
mypy-extensions==1.0.0
nbclient==0.10.0
nbconvert==7.16.4
nbformat==5.10.4
nest-asyncio==1.6.0
notebook==6.4.13.dev0
numpy==1.26.4
openai==1.30.1
orjson==3.10.3
overrides==7.7.0
packaging==23.2
pandas==2.2.2
pandocfilters==1.5.1
parso==0.8.4
pexpect==4.9.0
pillow==10.3.0
pip==24.1.2
platformdirs==4.2.2
prometheus_client==0.20.0
prompt-toolkit==3.0.43
psutil==5.9.8
ptyprocess==0.7.0
pure-eval==0.2.2
pycparser==2.22
pydantic==2.7.1
pydantic_core==2.18.2
pydub==0.25.1
Pygments==2.17.2
pygraphviz==1.13
pyparsing==3.1.2
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-json-logger==2.0.7
python-multipart==0.0.9
pytz==2024.1
PyYAML==6.0.1
pyzmq==26.0.3
redlines==0.4.2
referencing==0.35.1
regex==2024.5.15
requests==2.32.2
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rich==13.7.1
rich-click==1.8.2
rpds-py==0.18.1
ruff==0.4.5
semantic-version==2.10.0
Send2Trash==1.8.3
setuptools==65.5.1
shellingham==1.5.4
six==1.16.0
sniffio==1.3.1
socksio==1.0.0
soupsieve==2.5
SQLAlchemy==2.0.30
stack-data==0.6.3
starlette==0.37.2
tavily-python==0.3.3
tenacity==8.3.0
terminado==0.18.1
tiktoken==0.7.0
tinycss2==1.3.0
tomlkit==0.12.0
toolz==0.12.1
tornado==6.1
tqdm==4.66.4
traitlets==5.9.0
typer==0.12.3
types-python-dateutil==2.9.0.20240316
typing_extensions==4.11.0
typing-inspect==0.9.0
tzdata==2024.1
ujson==5.10.0
uri-template==1.3.0
urllib3==2.2.1
uuid6==2024.1.12
uvicorn==0.29.0
uvloop==0.19.0
watchfiles==0.21.0
wcwidth==0.2.13
webcolors==24.6.0
webencodings==0.5.1
websocket-client==1.8.0
websockets==11.0.3
wheel==0.43.0
widgetsnbextension==4.0.10
yarl==1.9.4
you should be able to find requirements.txt file for a particular lesson in the File==>Open section. Did you not find ?
I see it now, thank you for the quick response.
That works to import the AsyncSqliteSaver, but now there is another issue when using it in:
messages = [HumanMessage(content=“What is the weather in SF?”)]
thread = {“configurable”: {“thread_id”: “4”}}
async for event in abot.graph.astream_events({“messages”: messages}, thread, version=“v1”):
kind = event[“event”]
if kind == “on_chat_model_stream”:
content = event[“data”][“chunk”].content
if content:
# Empty content in the context of OpenAI means
# that the model is asking for a tool to be invoked.
# So we only print non-empty content
print(content, end=“|”)
I got:
AttributeError: ‘_AsyncGeneratorContextManager’ object has no attribute ‘get_next_version’