langgraph store cpu hight #29084
Unanswered
tianshangwuyun
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
@router.get("/test-res")
async def test_exception(cache_service: CacheService = Depends(get_cache_service)):
from sse_starlette.sse import EventSourceResponse
from langchain.prompts import ChatPromptTemplate
from langchain.tools import tool
from langgraph.prebuilt import create_react_agent
from typing import Literal
from typing_extensions import TypedDict
llm stream=true
async with AsyncConnectionPool(
conninfo=DB_URI,
max_size=20,
kwargs=connection_kwargs,
) as pool:
store = AsyncPostgresStore(pool)
await store.setup()
memory = CustomPgMemorySaver(pool)
await memory.setup()
yield create_agent(memory,store)
Beta Was this translation helpful? Give feedback.
All reactions