# Persistence and Streaming | model says ' I cant find the current weather for San Fransisco' in AsqliteSaver while streaming tokens

**URL:** <https://community.deeplearning.ai/t/persistence-and-streaming-model-says-i-cant-find-the-current-weather-for-san-fransisco-in-asqlitesaver-while-streaming-tokens/877989>\
**Category:** AI Agents in LangGraph\
**Created:** [August 29, 2025, 12:31pm UTC](https://community.deeplearning.ai/t/persistence-and-streaming-model-says-i-cant-find-the-current-weather-for-san-fransisco-in-asqlitesaver-while-streaming-tokens/877989 "2025-08-29T12:31:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rohan\_Devaki](https://avatars.discourse-cdn.com/v4/letter/r/898d66/32.png) [@Rohan\_Devaki](https://community.deeplearning.ai/u/Rohan_Devaki)\
**Post date:** [August 29, 2025, 12:31pm UTC](https://community.deeplearning.ai/t/persistence-and-streaming-model-says-i-cant-find-the-current-weather-for-san-fransisco-in-asqlitesaver-while-streaming-tokens/877989/1 "2025-08-29T12:31:19Z")

</div>

```auto
I| couldn't| find| the| current| weather| for| San| Francisco|.| Please| check

```

 ![image](https://global.discourse-cdn.com/dlai/original/3X/f/6/f618bfaac354282b7cc9b30c77ad53d93a1b5351.png)

```auto
from langgraph.checkpoint.aiosqlite import AsyncSqliteSaver

# AStream events -> allows to use Asyncrhonous method on graph, asynchronous checkpointer for streaming tokens
memory = AsyncSqliteSaver.from_conn_string(":memory:")
abot = Agent(model, [tool], system=prompt, checkpointer=memory)

messages = [HumanMessage(content="What is the weather in SF?")]
thread = {"configurable": {"thread_id": "4"}}# new thread, new conversation
# new events -> these events represent updates about the stream
# look for events -> correspond to new tokens
# on chat model stream -> get the content and print out to see the events
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="|")

```

---

<div class="post-metadata">

**Author:** ![Rohan\_Devaki](https://avatars.discourse-cdn.com/v4/letter/r/898d66/32.png) [@Rohan\_Devaki](https://community.deeplearning.ai/u/Rohan_Devaki)\
**Post date:** [September 2, 2025, 3:35am UTC](https://community.deeplearning.ai/t/persistence-and-streaming-model-says-i-cant-find-the-current-weather-for-san-fransisco-in-asqlitesaver-while-streaming-tokens/877989/2 "2025-09-02T03:35:28Z")

</div>

@Instructor / @instructor1 / @instructor-director can you please help here?
