Issue:  I'm currently working on a project where I need to fetch all the sub-URLs from a website using Langchain.
Labels: name: area: embeddings, name: auto:bug, name: integration: chroma

### Issue you'd like to raise.


`       #below is my code
def generate_embeddings(urls = None,persist_directory=None):
 with sync_playwright() as p:
            browser = p.chromium.launch()
            navigate_tool = NavigateTool(sync_browser=browser)
            extract_hyperlinks_tool = ExtractHyperlinksTool(sync_browser=browser)
            for url in urls:
                print(url,"url is ----------------------")
                await navigate_tool._arun(url)
                print(await navigate_tool._arun(url))
                hyperlinks = await extract_hyperlinks_tool._arun()
                for link in hyperlinks:
                    print(link,"link is ------------------------------------------")
            browser.close()
        asyncio.run(main())
        loader = UnstructuredURLLoader(urls=urls)
        urlDocument = loader.load()
        text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=50)
        texts = text_splitter.split_documents(documents=urlDocument)
        if texts:
        embedding = OpenAIEmbeddings()
        Chroma.from_documents(documents=texts, embedding=embedding, persist_directory=persist_directory)
        file_crawl_status = True
        file_index_status = True
    else:
        file_crawl_status = False
        file_index_status = False

    return file_crawl_status, file_index_status
`
# And I am getting these error
/home/hs/CustomBot/accounts/common_langcain_qa.py:121: RuntimeWarning: coroutine 'NavigateTool._arun' was never awaited
  navigate_tool._arun(url)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
<coroutine object NavigateTool._arun at 0x7ffbaa2871c0>
/home/hs/CustomBot/accounts/common_langcain_qa.py:122: RuntimeWarning: coroutine 'NavigateTool._arun' was never awaited
  print(navigate_tool._arun(url))
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
<coroutine object ExtractHyperlinksTool._arun at 0x7ffbaa2871c0> link is ------------------------------------------
Internal Server Error: /create-project/
Traceback (most recent call last):
  File "/home/hs/env/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/home/hs/env/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/hs/env/lib/python3.8/site-packages/django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/hs/env/lib/python3.8/site-packages/django/views/generic/base.py", line 101, in dispatch
    return handler(request, *args, **kwargs)
  File "/home/hs/CustomBot/user_projects/views.py", line 1776, in post
    file_crawl_status, file_index_status = generate_embeddings(
  File "/home/hs/CustomBot/accounts/common_langcain_qa.py", line 126, in generate_embeddings
    browser.close()
  File "/home/hs/env/lib/python3.8/site-packages/playwright/sync_api/_generated.py", line 9869, in close
    self._sync("browser.close", self._impl_obj.close())
  File "/home/hs/env/lib/python3.8/site-packages/playwright/_impl/_sync_base.py", line 100, in _sync
    task = self._loop.create_task(coro)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 429, in create_task
    self._check_closed()
  File "/usr/lib/python3.8/asyncio/base_events.py", line 508, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

### Suggestion:

_No response_