Status is Pending Forever while using a websocket connection (py & FastAPI)
Labels: name: auto:bug

### Checked other resources

- [X] I added a very descriptive title to this issue.
- [X] I searched the LangChain documentation with the integrated search.
- [X] I used the GitHub search to find a similar question and didn't find it.

### Example Code

using python and FastAPI

``` async def websocket_handler(websocket: WebSocket, chain, ws_name="Websocket"):
    await websocket.accept()
    try:
        json_payload = await websocket.receive_json()
        payload = Payload.parse_obj(json_payload)
        async with atrace_as_chain_group(ws_name, run_id=uuid.uuid4(),
                                         tags=[f"store_id:{payload.metadata.store_id}"]) as group_manager:
            res = await chain.arun(dialog=payload.dialog, page_sku=payload.metadata.sku,
                                   extracted_properties=payload.metadata.extracted_properties,
                                   callbacks=group_manager, websocket=websocket)
            await websocket.send_json(res.json())
            await websocket.close()
    except WebSocketDisconnect:
        print(f"WebSocket connection - {ws_name} - Closed")


@app.websocket("/chat")
async def chat(websocket: WebSocket):
    await websocket_handler(websocket, router_chain, ws_name="Chat") 
    
  
 @app.post("/quick_suggestions")
async def quick_suggestions(payload: Payload):
    print(f"Quick Suggestions: {payload}")
    async with atrace_as_chain_group("QuickSuggestions",
                                     run_id=uuid.uuid4(),
                                     tags=[f"store_id:{payload.metadata.store_id}"]) as group_manager:
        return await quick_suggestions_chain.arun(dialog=payload.dialog,
                                                  page_sku=payload.metadata.sku,
                                                  callbacks=group_manager) ```
    
    

When calling to chat route that is using websocket connection it stays in a pending status forever no matter what.
When calling QuickSuggestions it behave as expected.

I guess its something related to the websocket connection.
Any ideas?
    

### Description

when using a websocket connection it stays in a pending status forever no matter what

### System Info

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
langchain = ">=0.0.257"
openai = "*"
pydantic = "==1.10.11"
requests = "*"
python-dotenv = "*"
pandas = "*"
pydantic-sqlalchemy = "*"
sentence-transformers = "*"
google-cloud-logging = "*"
asyncpg = "*"
fastapi = "*"
starlette = "*"
uvicorn = "*"
sqlalchemy = {extras = ["asyncio"], version = "*"}
asyncio = "*"
elasticsearch = {extras = ["async"], version = "*"}
faiss-cpu = "*"
nltk = "*"
async-lru = "*"
posthog = "*"
websockets = "*"
spacy = "*"

[dev-packages]
scikit-learn = "*"
gradio = "*"

[requires]
python_version = "3.10"


### Related Components

- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async