julep icon indicating copy to clipboard operation
julep copied to clipboard

Remove unused msgpack import

Open creatorrr opened this issue 6 months ago โ€ข 1 comments
trafficstars

Summary

  • delete unused imports from agents_api/init.py

Testing

  • python -m ward --help (fails: No module named ward)
  • poe test (fails: command not found)

creatorrr avatar May 17 '25 15:05 creatorrr

CI Feedback ๐Ÿง

(Feedback updated until commit https://github.com/julep-ai/julep/commit/c84c2c1b65cd7624aa4ee673fbc2a410b023375b)

A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

Action: Test

Failed stage: [โŒ]

Failed test name: test_docs_queries

Failure summary:

The action failed because three tests in test_docs_queries.py failed:
1. test_docs_queries:619
query: search docs by embedding
2. test_docs_queries:647 query: search docs by hybrid
3. query: get
doc (line number not specified)

All failures show the same root cause: database connection issues with asyncpg. The error messages
indicate:

  • "RuntimeError: Event loop is closed"
  • "RuntimeError: unable to perform operation on <TCPTransport closed=True reading=False>; the handler
    is closed"
  • "InterfaceError: cannot perform operation: another operation is in progress"

    This suggests a concurrency issue where database connections are being closed while operations are
    still in progress, or multiple operations are being attempted on the same connection simultaneously.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    956:  prune-cache: true
    957:  ignore-nothing-to-cache: false
    958:  ##[endgroup]
    959:  Downloading uv from "https://github.com/astral-sh/uv/releases/download/0.7.5/uv-x86_64-unknown-linux-gnu.tar.gz" ...
    960:  [command]/usr/bin/tar xz --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/4a00088e-f741-4f99-81d6-1c4f0294fdd1 -f /home/runner/work/_temp/cd8b4d61-f7cc-4755-960e-c87a50024dcc
    961:  Added /opt/hostedtoolcache/uv/0.7.5/x86_64 to the path
    962:  Added /home/runner/.local/bin to the path
    963:  Set UV_CACHE_DIR to /home/runner/work/_temp/setup-uv-cache
    964:  Successfully installed uv version 0.7.5
    965:  Searching files using cache dependency glob: **/uv.lock
    966:  /home/runner/work/julep/julep/agents-api/uv.lock
    967:  /home/runner/work/julep/julep/cli/uv.lock
    968:  /home/runner/work/julep/julep/integrations-service/uv.lock
    969:  Found 3 files to hash.
    970:  Trying to restore uv cache from GitHub Actions cache with key: setup-uv-1-x86_64-unknown-linux-gnu-0.7.5-d92603d25acef1c08e643c37cc2475e5e190deb9690356b084828d60043a591f
    971:  ##[warning]Failed to restore: Cache service responded with 422
    972:  No GitHub Actions cache found for key: setup-uv-1-x86_64-unknown-linux-gnu-0.7.5-d92603d25acef1c08e643c37cc2475e5e190deb9690356b084828d60043a591f
    ...
    
    1479:  sql                                               
    1480:  PASS  test_agent_queries:126 query: update agent sql                         4%
    1481:  PASS  test_agent_queries:153 query: update agent with project sql            4%
    1482:  PASS  test_agent_queries:177 query: update agent, project does not exist     4%
    1483:  PASS  test_agent_queries:201 query: patch agent sql                          5%
    1484:  PASS  test_agent_queries:225 query: patch agent with project sql             5%
    1485:  PASS  test_agent_queries:260 query: patch agent, project does not exist      5%
    1486:  PASS  test_agent_queries:283 query: get agent not exists sql                 5%
    1487:  PASS  test_agent_queries:294 query: get agent exists sql                     6%
    1488:  PASS  test_agent_queries:315 query: list agents sql                          6%
    1489:  PASS  test_agent_queries:326 query: list agents with project filter sql      6%
    1490:  PASS  test_agent_queries:352 query: list agents sql, invalid sort            6%
    1491:  direction                                         
    1492:  PASS  test_agent_queries:368 query: delete agent sql                         6%
    1493:  INFO:httpx:HTTP Request: POST http://testserver/agents "HTTP/1.1 403 Forbidden"
    1494:  PASS  test_agent_routes:9 route: unauthorized should fail                    7%
    1495:  INFO:httpx:HTTP Request: POST http://testserver/agents "HTTP/1.1 201 Created"
    ...
    
    1580:  PASS  test_docs_queries:255 query: list user docs, invalid sort by          18%
    1581:  PASS  test_docs_queries:285 query: list user docs, invalid sort direction   19%
    1582:  PASS  test_docs_queries:315 query: list agent docs                          19%
    1583:  PASS  test_docs_queries:371 query: list agent docs, invalid limit           19%
    1584:  PASS  test_docs_queries:390 query: list agent docs, invalid offset          19%
    1585:  PASS  test_docs_queries:409 query: list agent docs, invalid sort by         20%
    1586:  PASS  test_docs_queries:427 query: list agent docs, invalid sort direction  20%
    1587:  PASS  test_docs_queries:445 query: delete user doc                          20%
    1588:  PASS  test_docs_queries:482 query: delete agent doc                         20%
    1589:  PASS  test_docs_queries:519 query: search docs by text                      20%
    1590:  PASS  test_docs_queries:556 query: search docs by text with technical       21%
    1591:  terms and phrases                                  
    1592:  FAIL  test_docs_queries:619 query: search docs by embedding                 21%
    1593:  FAIL  test_docs_queries:647 query: search docs by hybrid                    21%
    1594:  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ query: get doc โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
    1595:  Failed at tests/test_docs_queries.py                                          
    1596:  โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Traceback (most recent call last) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ  
    1597:  โ”‚ in uvloop.loop.Loop.call_soon:1281                                       โ”‚  
    1598:  โ”‚                                                                          โ”‚  
    1599:  โ”‚ in uvloop.loop.Loop._call_soon:669                                       โ”‚  
    1600:  โ”‚                                                                          โ”‚  
    1601:  โ”‚ in uvloop.loop.UVStream.write:678                                        โ”‚  
    1602:  โ”‚                                                                          โ”‚  
    1603:  โ”‚ in uvloop.loop.Loop._append_ready_handle:673                             โ”‚  
    1604:  โ”‚                                                                          โ”‚  
    1605:  โ”‚ in uvloop.loop.Loop._check_closed:705                                    โ”‚  
    1606:  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ  
    1607:  RuntimeError: Event loop is closed                                            
    1608:  During handling of the above exception, another exception occurred:           
    ...
    
    1649:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚                                     โ”‚ โ”‚  
    1650:  โ”‚ โ”‚                    UUID('00000000-0000-0000-0000-000000000000'),     โ”‚ โ”‚  
    1651:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚                                     โ”‚ โ”‚  
    1652:  โ”‚ โ”‚                    UUID('06828a99-03b2-7841-8000-0fa99df47a0c'),     โ”‚ โ”‚  
    1653:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚   'agent',                          โ”‚ โ”‚  
    1654:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚                                     โ”‚ โ”‚  
    1655:  โ”‚ โ”‚                    UUID('06828a99-003d-7f2d-8000-0c83d70a2ac4')      โ”‚ โ”‚  
    1656:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   ],                                    โ”‚ โ”‚  
    1657:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   'timeout': 90.0                       โ”‚ โ”‚  
    1658:  โ”‚ โ”‚                    โ”‚   โ”‚   }                                         โ”‚ โ”‚  
    1659:  โ”‚ โ”‚                    โ”‚   )                                             โ”‚ โ”‚  
    1660:  โ”‚ โ”‚                    ]                                                 โ”‚ โ”‚  
    1661:  โ”‚ โ”‚             conn = <PoolConnectionProxy                              โ”‚ โ”‚  
    1662:  โ”‚ โ”‚                    <asyncpg.connection.Connection object at          โ”‚ โ”‚  
    1663:  โ”‚ โ”‚                    0x7ff3c23e37a0> 0x7ff3a331ad70>                   โ”‚ โ”‚  
    1664:  โ”‚ โ”‚ connection_error = False                                             โ”‚ โ”‚  
    1665:  โ”‚ โ”‚  connection_pool = <asyncpg.pool.Pool object at 0x7ff38c967f40>      โ”‚ โ”‚  
    1666:  โ”‚ โ”‚            debug = None                                              โ”‚ โ”‚  
    1667:  โ”‚ โ”‚           kwargs = {                                                 โ”‚ โ”‚  
    1668:  โ”‚ โ”‚                    โ”‚   'developer_id':                               โ”‚ โ”‚  
    1669:  โ”‚ โ”‚                    UUID('00000000-0000-0000-0000-000000000000'),     โ”‚ โ”‚  
    1670:  โ”‚ โ”‚                    โ”‚   'doc_id':                                     โ”‚ โ”‚  
    1671:  โ”‚ โ”‚                    UUID('06828a99-03b2-7841-8000-0fa99df47a0c'),     โ”‚ โ”‚  
    1672:  โ”‚ โ”‚                    โ”‚   'owner_type': 'agent',                        โ”‚ โ”‚  
    1673:  โ”‚ โ”‚                    โ”‚   'owner_id':                                   โ”‚ โ”‚  
    1674:  โ”‚ โ”‚                    UUID('06828a99-003d-7f2d-8000-0c83d70a2ac4')      โ”‚ โ”‚  
    1675:  โ”‚ โ”‚                    }                                                 โ”‚ โ”‚  
    1676:  โ”‚ โ”‚    only_on_error = False                                             โ”‚ โ”‚  
    1677:  โ”‚ โ”‚             pool = <asyncpg.pool.Pool object at 0x7ff38c967f40>      โ”‚ โ”‚  
    ...
    
    1700:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚                                         โ”‚ โ”‚  
    1701:  โ”‚ โ”‚                    UUID('06828a99-03b2-7841-8000-0fa99df47a0c'),     โ”‚ โ”‚  
    1702:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   'agent',                              โ”‚ โ”‚  
    1703:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚                                         โ”‚ โ”‚  
    1704:  โ”‚ โ”‚                    UUID('06828a99-003d-7f2d-8000-0c83d70a2ac4')      โ”‚ โ”‚  
    1705:  โ”‚ โ”‚                    โ”‚   โ”‚   ]                                         โ”‚ โ”‚  
    1706:  โ”‚ โ”‚                    โ”‚   )                                             โ”‚ โ”‚  
    1707:  โ”‚ โ”‚                    ]                                                 โ”‚ โ”‚  
    1708:  โ”‚ โ”‚     return_index = -1                                                โ”‚ โ”‚  
    1709:  โ”‚ โ”‚           timeit = False                                             โ”‚ โ”‚  
    1710:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚  
    1711:  โ”‚                                                                          โ”‚  
    1712:  โ”‚ /home/runner/work/julep/julep/agents-api/.venv/lib/python3.12/site-packa โ”‚  
    1713:  โ”‚ ges/asyncpg/transaction.py:68 in __aenter__                              โ”‚  
    1714:  โ”‚                                                                          โ”‚  
    1715:  โ”‚    65 โ”‚   โ”‚   โ”‚   raise apg_errors.InterfaceError(                       โ”‚  
    1716:  โ”‚    66 โ”‚   โ”‚   โ”‚   โ”‚   'cannot enter context: already in an `async with`  โ”‚  
    1717:  โ”‚    67 โ”‚   โ”‚   self._managed = True                                       โ”‚  
    1718:  โ”‚ โฑ  68 โ”‚   โ”‚   await self.start()                                         โ”‚  
    1719:  โ”‚    69 โ”‚                                                                  โ”‚  
    1720:  โ”‚    70 โ”‚   async def __aexit__(self, extype, ex, tb):                     โ”‚  
    1721:  โ”‚    71 โ”‚   โ”‚   try:                                                       โ”‚  
    1722:  โ”‚                                                                          โ”‚  
    1723:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ             โ”‚  
    1724:  โ”‚ โ”‚ self = <asyncpg.Transaction state:failed 0x7ff3a048cf90> โ”‚             โ”‚  
    1725:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ             โ”‚  
    1726:  โ”‚                                                                          โ”‚  
    1727:  โ”‚ /home/runner/work/julep/julep/agents-api/.venv/lib/python3.12/site-packa โ”‚  
    1728:  โ”‚ ges/asyncpg/transaction.py:146 in start                                  โ”‚  
    1729:  โ”‚                                                                          โ”‚  
    1730:  โ”‚   143 โ”‚   โ”‚   โ”‚   query += ';'                                           โ”‚  
    1731:  โ”‚   144 โ”‚   โ”‚                                                              โ”‚  
    1732:  โ”‚   145 โ”‚   โ”‚   try:                                                       โ”‚  
    1733:  โ”‚ โฑ 146 โ”‚   โ”‚   โ”‚   await self._connection.execute(query)                  โ”‚  
    1734:  โ”‚   147 โ”‚   โ”‚   except BaseException:                                      โ”‚  
    1735:  โ”‚   148 โ”‚   โ”‚   โ”‚   self._state = TransactionState.FAILED                  โ”‚  
    1736:  โ”‚   149 โ”‚   โ”‚   โ”‚   raise                                                  โ”‚  
    1737:  โ”‚                                                                          โ”‚  
    1738:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ     โ”‚  
    1739:  โ”‚ โ”‚   con = <asyncpg.connection.Connection object at 0x7ff3c23e37a0> โ”‚     โ”‚  
    1740:  โ”‚ โ”‚ query = 'BEGIN;'                                                 โ”‚     โ”‚  
    1741:  โ”‚ โ”‚  self = <asyncpg.Transaction state:failed 0x7ff3a048cf90>        โ”‚     โ”‚  
    1742:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ     โ”‚  
    ...
    
    1759:  โ”‚ โ”‚ timeout = None                                                     โ”‚   โ”‚  
    1760:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ   โ”‚  
    1761:  โ”‚                                                                          โ”‚  
    1762:  โ”‚ in query:375                                                             โ”‚  
    1763:  โ”‚                                                                          โ”‚  
    1764:  โ”‚ in asyncpg.protocol.protocol.BaseProtocol.query:368                      โ”‚  
    1765:  โ”‚                                                                          โ”‚  
    1766:  โ”‚ in asyncpg.protocol.protocol.CoreProtocol._simple_query:1174             โ”‚  
    1767:  โ”‚                                                                          โ”‚  
    1768:  โ”‚ in asyncpg.protocol.protocol.BaseProtocol._write:967                     โ”‚  
    1769:  โ”‚                                                                          โ”‚  
    1770:  โ”‚ in uvloop.loop.UVStream.write:678                                        โ”‚  
    1771:  โ”‚                                                                          โ”‚  
    1772:  โ”‚ in uvloop.loop.UVHandle._ensure_alive:159                                โ”‚  
    1773:  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ  
    1774:  RuntimeError: unable to perform operation on <TCPTransport closed=True        
    1775:  reading=False 0x416336b0>; the handler is closed                              
    ...
    
    1788:  โ”‚                                                                          โ”‚  
    1789:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ     โ”‚  
    1790:  โ”‚ โ”‚        debug = None                                              โ”‚     โ”‚  
    1791:  โ”‚ โ”‚ loop_factory = None                                              โ”‚     โ”‚  
    1792:  โ”‚ โ”‚         main = <async_generator_asend object at 0x7ff3c4bf19c0>  โ”‚     โ”‚  
    1793:  โ”‚ โ”‚       runner = <asyncio.runners.Runner object at 0x7ff3a331b050> โ”‚     โ”‚  
    1794:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ     โ”‚  
    1795:  โ”‚                                                                          โ”‚  
    1796:  โ”‚ /home/runner/.local/share/uv/python/cpython-3.12.10-linux-x86_64-gnu/lib โ”‚  
    1797:  โ”‚ /python3.12/asyncio/runners.py:118 in run                                โ”‚  
    1798:  โ”‚                                                                          โ”‚  
    1799:  โ”‚   115 โ”‚   โ”‚                                                              โ”‚  
    1800:  โ”‚   116 โ”‚   โ”‚   self._interrupt_count = 0                                  โ”‚  
    1801:  โ”‚   117 โ”‚   โ”‚   try:                                                       โ”‚  
    1802:  โ”‚ โฑ 118 โ”‚   โ”‚   โ”‚   return self._loop.run_until_complete(task)             โ”‚  
    1803:  โ”‚   119 โ”‚   โ”‚   except exceptions.CancelledError:                          โ”‚  
    1804:  โ”‚   120 โ”‚   โ”‚   โ”‚   if self._interrupt_count > 0:                          โ”‚  
    1805:  โ”‚   121 โ”‚   โ”‚   โ”‚   โ”‚   uncancel = getattr(task, "uncancel", None)         โ”‚  
    1806:  โ”‚                                                                          โ”‚  
    1807:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚  
    1808:  โ”‚ โ”‚        context = <_contextvars.Context object at 0x7ff38f274400>     โ”‚ โ”‚  
    1809:  โ”‚ โ”‚           coro = <async_generator_asend object at 0x7ff3c4bf19c0>    โ”‚ โ”‚  
    1810:  โ”‚ โ”‚           self = <asyncio.runners.Runner object at 0x7ff3a331b050>   โ”‚ โ”‚  
    1811:  โ”‚ โ”‚ sigint_handler = functools.partial(<bound method Runner._on_sigint   โ”‚ โ”‚  
    1812:  โ”‚ โ”‚                  of <asyncio.runners.Runner object at                โ”‚ โ”‚  
    1813:  โ”‚ โ”‚                  0x7ff3a331b050>>, main_task=<Task finished          โ”‚ โ”‚  
    1814:  โ”‚ โ”‚                  name='Task-1627' coro=<<async_generator_asend       โ”‚ โ”‚  
    1815:  โ”‚ โ”‚                  without __name__>()>                                โ”‚ โ”‚  
    1816:  โ”‚ โ”‚                  exception=InterfaceError('cannot perform operation: โ”‚ โ”‚  
    1817:  โ”‚ โ”‚                  another operation is in progress')>)                โ”‚ โ”‚  
    1818:  โ”‚ โ”‚           task = <Task finished name='Task-1627'                     โ”‚ โ”‚  
    1819:  โ”‚ โ”‚                  coro=<<async_generator_asend without __name__>()>   โ”‚ โ”‚  
    1820:  โ”‚ โ”‚                  exception=InterfaceError('cannot perform operation: โ”‚ โ”‚  
    1821:  โ”‚ โ”‚                  another operation is in progress')>                 โ”‚ โ”‚  
    ...
    
    1871:  โ”‚ โ”‚             52, 231222, tzinfo=datetime.timezone.utc),               โ”‚ โ”‚  
    1872:  โ”‚ โ”‚             โ”‚   title='Hello',                                       โ”‚ โ”‚  
    1873:  โ”‚ โ”‚             โ”‚   content=['World', 'World2', 'World3'],               โ”‚ โ”‚  
    1874:  โ”‚ โ”‚             โ”‚   embeddings=[],                                       โ”‚ โ”‚  
    1875:  โ”‚ โ”‚             โ”‚   modality='text',                                     โ”‚ โ”‚  
    1876:  โ”‚ โ”‚             โ”‚   language='english',                                  โ”‚ โ”‚  
    1877:  โ”‚ โ”‚             โ”‚   embedding_model='text-embedding-3-large',            โ”‚ โ”‚  
    1878:  โ”‚ โ”‚             โ”‚   embedding_dimensions=1024                            โ”‚ โ”‚  
    1879:  โ”‚ โ”‚             )                                                        โ”‚ โ”‚  
    1880:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚  
    1881:  โ”‚                                                                          โ”‚  
    1882:  โ”‚ /home/runner/work/julep/julep/agents-api/agents_api/queries/utils.py:320 โ”‚  
    1883:  โ”‚ in async_wrapper                                                         โ”‚  
    1884:  โ”‚                                                                          โ”‚  
    1885:  โ”‚   317 โ”‚   โ”‚   โ”‚   โ”‚   result: T = await func(*args, **kwargs)            โ”‚  
    1886:  โ”‚   318 โ”‚   โ”‚   โ”‚   except BaseException as error:                         โ”‚  
    1887:  โ”‚   319 โ”‚   โ”‚   โ”‚   โ”‚   _check_error(error)                                โ”‚  
    1888:  โ”‚ โฑ 320 โ”‚   โ”‚   โ”‚   โ”‚   raise error                                        โ”‚  
    1889:  โ”‚   321 โ”‚   โ”‚   โ”‚                                                          โ”‚  
    ...
    
    1899:  โ”‚ โ”‚          โ”‚   'owner_type': 'agent',                                  โ”‚ โ”‚  
    1900:  โ”‚ โ”‚          โ”‚   'owner_id':                                             โ”‚ โ”‚  
    1901:  โ”‚ โ”‚          UUID('06828a99-003d-7f2d-8000-0c83d70a2ac4'),               โ”‚ โ”‚  
    1902:  โ”‚ โ”‚          โ”‚   'connection_pool': <asyncpg.pool.Pool object at         โ”‚ โ”‚  
    1903:  โ”‚ โ”‚          0x7ff38c967f40>                                             โ”‚ โ”‚  
    1904:  โ”‚ โ”‚          }                                                           โ”‚ โ”‚  
    1905:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚  
    1906:  โ”‚                                                                          โ”‚  
    1907:  โ”‚ /home/runner/work/julep/julep/agents-api/agents_api/queries/utils.py:317 โ”‚  
    1908:  โ”‚ in async_wrapper                                                         โ”‚  
    1909:  โ”‚                                                                          โ”‚  
    1910:  โ”‚   314 โ”‚   โ”‚   @wraps(func)                                               โ”‚  
    1911:  โ”‚   315 โ”‚   โ”‚   async def async_wrapper(*args: P.args, **kwargs: P.kwargs) โ”‚  
    1912:  โ”‚   316 โ”‚   โ”‚   โ”‚   try:                                                   โ”‚  
    1913:  โ”‚ โฑ 317 โ”‚   โ”‚   โ”‚   โ”‚   result: T = await func(*args, **kwargs)            โ”‚  
    1914:  โ”‚   318 โ”‚   โ”‚   โ”‚   except BaseException as error:                         โ”‚  
    1915:  โ”‚   319 โ”‚   โ”‚   โ”‚   โ”‚   _check_error(error)                                โ”‚  
    1916:  โ”‚   320 โ”‚   โ”‚   โ”‚   โ”‚   raise error                                        โ”‚  
    1917:  โ”‚                                                                          โ”‚  
    ...
    
    1996:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚                                     โ”‚ โ”‚  
    1997:  โ”‚ โ”‚                    UUID('00000000-0000-0000-0000-000000000000'),     โ”‚ โ”‚  
    1998:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚                                     โ”‚ โ”‚  
    1999:  โ”‚ โ”‚                    UUID('06828a99-03b2-7841-8000-0fa99df47a0c'),     โ”‚ โ”‚  
    2000:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚   'agent',                          โ”‚ โ”‚  
    2001:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚                                     โ”‚ โ”‚  
    2002:  โ”‚ โ”‚                    UUID('06828a99-003d-7f2d-8000-0c83d70a2ac4')      โ”‚ โ”‚  
    2003:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   ],                                    โ”‚ โ”‚  
    2004:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   'timeout': 90.0                       โ”‚ โ”‚  
    2005:  โ”‚ โ”‚                    โ”‚   โ”‚   }                                         โ”‚ โ”‚  
    2006:  โ”‚ โ”‚                    โ”‚   )                                             โ”‚ โ”‚  
    2007:  โ”‚ โ”‚                    ]                                                 โ”‚ โ”‚  
    2008:  โ”‚ โ”‚             conn = <PoolConnectionProxy                              โ”‚ โ”‚  
    2009:  โ”‚ โ”‚                    <asyncpg.connection.Connection object at          โ”‚ โ”‚  
    2010:  โ”‚ โ”‚                    0x7ff3c23e37a0> 0x7ff3a331ad70>                   โ”‚ โ”‚  
    2011:  โ”‚ โ”‚ connection_error = False                                             โ”‚ โ”‚  
    2012:  โ”‚ โ”‚  connection_pool = <asyncpg.pool.Pool object at 0x7ff38c967f40>      โ”‚ โ”‚  
    2013:  โ”‚ โ”‚            debug = None                                              โ”‚ โ”‚  
    2014:  โ”‚ โ”‚           kwargs = {                                                 โ”‚ โ”‚  
    2015:  โ”‚ โ”‚                    โ”‚   'developer_id':                               โ”‚ โ”‚  
    2016:  โ”‚ โ”‚                    UUID('00000000-0000-0000-0000-000000000000'),     โ”‚ โ”‚  
    2017:  โ”‚ โ”‚                    โ”‚   'doc_id':                                     โ”‚ โ”‚  
    2018:  โ”‚ โ”‚                    UUID('06828a99-03b2-7841-8000-0fa99df47a0c'),     โ”‚ โ”‚  
    2019:  โ”‚ โ”‚                    โ”‚   'owner_type': 'agent',                        โ”‚ โ”‚  
    2020:  โ”‚ โ”‚                    โ”‚   'owner_id':                                   โ”‚ โ”‚  
    2021:  โ”‚ โ”‚                    UUID('06828a99-003d-7f2d-8000-0c83d70a2ac4')      โ”‚ โ”‚  
    2022:  โ”‚ โ”‚                    }                                                 โ”‚ โ”‚  
    2023:  โ”‚ โ”‚    only_on_error = False                                             โ”‚ โ”‚  
    2024:  โ”‚ โ”‚             pool = <asyncpg.pool.Pool object at 0x7ff38c967f40>      โ”‚ โ”‚  
    ...
    
    2059:  โ”‚ /home/runner/work/julep/julep/agents-api/.venv/lib/python3.12/site-packa โ”‚  
    2060:  โ”‚ ges/asyncpg/pool.py:1031 in __aexit__                                    โ”‚  
    2061:  โ”‚                                                                          โ”‚  
    2062:  โ”‚   1028 โ”‚   โ”‚   self.done = True                                          โ”‚  
    2063:  โ”‚   1029 โ”‚   โ”‚   con = self.connection                                     โ”‚  
    2064:  โ”‚   1030 โ”‚   โ”‚   self.connection = None                                    โ”‚  
    2065:  โ”‚ โฑ 1031 โ”‚   โ”‚   await self.pool.release(con)                              โ”‚  
    2066:  โ”‚   1032 โ”‚                                                                 โ”‚  
    2067:  โ”‚   1033 โ”‚   def __await__(self):                                          โ”‚  
    2068:  โ”‚   1034 โ”‚   โ”‚   self.done = True                                          โ”‚  
    2069:  โ”‚                                                                          โ”‚  
    2070:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚  
    2071:  โ”‚ โ”‚  con = <PoolConnectionProxy <asyncpg.connection.Connection object at โ”‚ โ”‚  
    2072:  โ”‚ โ”‚        0x7ff3c23e37a0> 0x7ff3a331ad70>                               โ”‚ โ”‚  
    2073:  โ”‚ โ”‚  exc = (                                                             โ”‚ โ”‚  
    2074:  โ”‚ โ”‚        โ”‚   <class 'RuntimeError'>,                                   โ”‚ โ”‚  
    2075:  โ”‚ โ”‚        โ”‚   RuntimeError('unable to perform operation on              โ”‚ โ”‚  
    2076:  โ”‚ โ”‚        <TCPTransport closed=True reading=False 0x416336b0>; the      โ”‚ โ”‚  
    ...
    
    2091:  โ”‚    907 โ”‚   async def close(self):                                        โ”‚  
    2092:  โ”‚    908 โ”‚   โ”‚   """Attempt to gracefully close all connections in the poo โ”‚  
    2093:  โ”‚                                                                          โ”‚  
    2094:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚  
    2095:  โ”‚ โ”‚         ch = <asyncpg.pool.PoolConnectionHolder object at            โ”‚ โ”‚  
    2096:  โ”‚ โ”‚              0x7ff38edf14c0>                                         โ”‚ โ”‚  
    2097:  โ”‚ โ”‚ connection = <PoolConnectionProxy <asyncpg.connection.Connection     โ”‚ โ”‚  
    2098:  โ”‚ โ”‚              object at 0x7ff3c23e37a0> 0x7ff3a331ad70>               โ”‚ โ”‚  
    2099:  โ”‚ โ”‚       self = <asyncpg.pool.Pool object at 0x7ff38c967f40>            โ”‚ โ”‚  
    2100:  โ”‚ โ”‚    timeout = None                                                    โ”‚ โ”‚  
    2101:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚  
    2102:  โ”‚                                                                          โ”‚  
    2103:  โ”‚ /home/runner/work/julep/julep/agents-api/.venv/lib/python3.12/site-packa โ”‚  
    2104:  โ”‚ ges/asyncpg/pool.py:228 in release                                       โ”‚  
    2105:  โ”‚                                                                          โ”‚  
    2106:  โ”‚    225 โ”‚   โ”‚   โ”‚   โ”‚   # an IO error, so terminate the connection.       โ”‚  
    2107:  โ”‚    226 โ”‚   โ”‚   โ”‚   โ”‚   self._con.terminate()                             โ”‚  
    ...
    
    2113:  โ”‚                                                                          โ”‚  
    2114:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚  
    2115:  โ”‚ โ”‚  budget = None                                                       โ”‚ โ”‚  
    2116:  โ”‚ โ”‚    self = <asyncpg.pool.PoolConnectionHolder object at               โ”‚ โ”‚  
    2117:  โ”‚ โ”‚           0x7ff38edf14c0>                                            โ”‚ โ”‚  
    2118:  โ”‚ โ”‚ timeout = None                                                       โ”‚ โ”‚  
    2119:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚  
    2120:  โ”‚                                                                          โ”‚  
    2121:  โ”‚ /home/runner/work/julep/julep/agents-api/.venv/lib/python3.12/site-packa โ”‚  
    2122:  โ”‚ ges/asyncpg/pool.py:218 in release                                       โ”‚  
    2123:  โ”‚                                                                          โ”‚  
    2124:  โ”‚    215 โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   await self._con._reset()                      โ”‚  
    2125:  โ”‚    216 โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   await self._pool._reset(self._con)            โ”‚  
    2126:  โ”‚    217 โ”‚   โ”‚   โ”‚   else:                                                 โ”‚  
    2127:  โ”‚ โฑ  218 โ”‚   โ”‚   โ”‚   โ”‚   await self._con.reset(timeout=budget)             โ”‚  
    2128:  โ”‚    219 โ”‚   โ”‚   except (Exception, asyncio.CancelledError) as ex:         โ”‚  
    2129:  โ”‚    220 โ”‚   โ”‚   โ”‚   # If the `reset` call failed, terminate the connectio โ”‚  
    2130:  โ”‚    221 โ”‚   โ”‚   โ”‚   # A new one will be created when `acquire` is called  โ”‚  
    ...
    
    2177:  โ”‚    350 โ”‚   โ”‚   โ”‚   return result                                         โ”‚  
    2178:  โ”‚    351 โ”‚   โ”‚                                                             โ”‚  
    2179:  โ”‚    352 โ”‚   โ”‚   _, status, _ = await self._execute(                       โ”‚  
    2180:  โ”‚                                                                          โ”‚  
    2181:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ   โ”‚  
    2182:  โ”‚ โ”‚    args = ()                                                       โ”‚   โ”‚  
    2183:  โ”‚ โ”‚   query = 'ROLLBACK'                                               โ”‚   โ”‚  
    2184:  โ”‚ โ”‚    self = <asyncpg.connection.Connection object at 0x7ff3c23e37a0> โ”‚   โ”‚  
    2185:  โ”‚ โ”‚ timeout = None                                                     โ”‚   โ”‚  
    2186:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ   โ”‚  
    2187:  โ”‚                                                                          โ”‚  
    2188:  โ”‚ in query:360                                                             โ”‚  
    2189:  โ”‚                                                                          โ”‚  
    2190:  โ”‚ in asyncpg.protocol.protocol.BaseProtocol._check_state:745               โ”‚  
    2191:  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ  
    2192:  InterfaceError: cannot perform operation: another operation is in progress    
    2193:  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ query: search docs by embedding โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
    2194:  Failed at tests/test_docs_queries.py                                          
    2195:  โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Traceback (most recent call last) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ  
    2196:  โ”‚ in uvloop.loop.Loop.call_soon:1281                                       โ”‚  
    2197:  โ”‚                                                                          โ”‚  
    2198:  โ”‚ in uvloop.loop.Loop._call_soon:669                                       โ”‚  
    2199:  โ”‚                                                                          โ”‚  
    2200:  โ”‚ in uvloop.loop.UVStream.write:678                                        โ”‚  
    2201:  โ”‚                                                                          โ”‚  
    2202:  โ”‚ in uvloop.loop.Loop._append_ready_handle:673                             โ”‚  
    2203:  โ”‚                                                                          โ”‚  
    2204:  โ”‚ in uvloop.loop.Loop._check_closed:705                                    โ”‚  
    2205:  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ  
    2206:  RuntimeError: Event loop is closed                                            
    2207:  During handling of the above exception, another exception occurred:           
    ...
    
    2248:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚                                     โ”‚ โ”‚  
    2249:  โ”‚ โ”‚                    UUID('00000000-0000-0000-0000-000000000000'),     โ”‚ โ”‚  
    2250:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚                                     โ”‚ โ”‚  
    2251:  โ”‚ โ”‚                    UUID('06828a99-7713-72ab-8000-ddcc66b687a9'),     โ”‚ โ”‚  
    2252:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚   'agent',                          โ”‚ โ”‚  
    2253:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚                                     โ”‚ โ”‚  
    2254:  โ”‚ โ”‚                    UUID('06828a99-73aa-787a-8000-7251da80ccc3')      โ”‚ โ”‚  
    2255:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   ],                                    โ”‚ โ”‚  
    2256:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   'timeout': 90.0                       โ”‚ โ”‚  
    2257:  โ”‚ โ”‚                    โ”‚   โ”‚   }                                         โ”‚ โ”‚  
    2258:  โ”‚ โ”‚                    โ”‚   )                                             โ”‚ โ”‚  
    2259:  โ”‚ โ”‚                    ]                                                 โ”‚ โ”‚  
    2260:  โ”‚ โ”‚             conn = <PoolConnectionProxy                              โ”‚ โ”‚  
    2261:  โ”‚ โ”‚                    <asyncpg.connection.Connection object at          โ”‚ โ”‚  
    2262:  โ”‚ โ”‚                    0x7ff3c23e1c70> 0x7ff3a3360ca0>                   โ”‚ โ”‚  
    2263:  โ”‚ โ”‚ connection_error = False                                             โ”‚ โ”‚  
    2264:  โ”‚ โ”‚  connection_pool = <asyncpg.pool.Pool object at 0x7ff38c964c40>      โ”‚ โ”‚  
    2265:  โ”‚ โ”‚            debug = None                                              โ”‚ โ”‚  
    2266:  โ”‚ โ”‚           kwargs = {                                                 โ”‚ โ”‚  
    2267:  โ”‚ โ”‚                    โ”‚   'developer_id':                               โ”‚ โ”‚  
    2268:  โ”‚ โ”‚                    UUID('00000000-0000-0000-0000-000000000000'),     โ”‚ โ”‚  
    2269:  โ”‚ โ”‚                    โ”‚   'doc_id':                                     โ”‚ โ”‚  
    2270:  โ”‚ โ”‚                    UUID('06828a99-7713-72ab-8000-ddcc66b687a9'),     โ”‚ โ”‚  
    2271:  โ”‚ โ”‚                    โ”‚   'owner_type': 'agent',                        โ”‚ โ”‚  
    2272:  โ”‚ โ”‚                    โ”‚   'owner_id':                                   โ”‚ โ”‚  
    2273:  โ”‚ โ”‚                    UUID('06828a99-73aa-787a-8000-7251da80ccc3')      โ”‚ โ”‚  
    2274:  โ”‚ โ”‚                    }                                                 โ”‚ โ”‚  
    2275:  โ”‚ โ”‚    only_on_error = False                                             โ”‚ โ”‚  
    2276:  โ”‚ โ”‚             pool = <asyncpg.pool.Pool object at 0x7ff38c964c40>      โ”‚ โ”‚  
    ...
    
    2299:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚                                         โ”‚ โ”‚  
    2300:  โ”‚ โ”‚                    UUID('06828a99-7713-72ab-8000-ddcc66b687a9'),     โ”‚ โ”‚  
    2301:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   'agent',                              โ”‚ โ”‚  
    2302:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚                                         โ”‚ โ”‚  
    2303:  โ”‚ โ”‚                    UUID('06828a99-73aa-787a-8000-7251da80ccc3')      โ”‚ โ”‚  
    2304:  โ”‚ โ”‚                    โ”‚   โ”‚   ]                                         โ”‚ โ”‚  
    2305:  โ”‚ โ”‚                    โ”‚   )                                             โ”‚ โ”‚  
    2306:  โ”‚ โ”‚                    ]                                                 โ”‚ โ”‚  
    2307:  โ”‚ โ”‚     return_index = -1                                                โ”‚ โ”‚  
    2308:  โ”‚ โ”‚           timeit = False                                             โ”‚ โ”‚  
    2309:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚  
    2310:  โ”‚                                                                          โ”‚  
    2311:  โ”‚ /home/runner/work/julep/julep/agents-api/.venv/lib/python3.12/site-packa โ”‚  
    2312:  โ”‚ ges/asyncpg/transaction.py:68 in __aenter__                              โ”‚  
    2313:  โ”‚                                                                          โ”‚  
    2314:  โ”‚    65 โ”‚   โ”‚   โ”‚   raise apg_errors.InterfaceError(                       โ”‚  
    2315:  โ”‚    66 โ”‚   โ”‚   โ”‚   โ”‚   'cannot enter context: already in an `async with`  โ”‚  
    2316:  โ”‚    67 โ”‚   โ”‚   self._managed = True                                       โ”‚  
    2317:  โ”‚ โฑ  68 โ”‚   โ”‚   await self.start()                                         โ”‚  
    2318:  โ”‚    69 โ”‚                                                                  โ”‚  
    2319:  โ”‚    70 โ”‚   async def __aexit__(self, extype, ex, tb):                     โ”‚  
    2320:  โ”‚    71 โ”‚   โ”‚   try:                                                       โ”‚  
    2321:  โ”‚                                                                          โ”‚  
    2322:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ             โ”‚  
    2323:  โ”‚ โ”‚ self = <asyncpg.Transaction state:failed 0x7ff38fcc78b0> โ”‚             โ”‚  
    2324:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ             โ”‚  
    2325:  โ”‚                                                                          โ”‚  
    2326:  โ”‚ /home/runner/work/julep/julep/agents-api/.venv/lib/python3.12/site-packa โ”‚  
    2327:  โ”‚ ges/asyncpg/transaction.py:146 in start                                  โ”‚  
    2328:  โ”‚                                                                          โ”‚  
    2329:  โ”‚   143 โ”‚   โ”‚   โ”‚   query += ';'                                           โ”‚  
    2330:  โ”‚   144 โ”‚   โ”‚                                                              โ”‚  
    2331:  โ”‚   145 โ”‚   โ”‚   try:                                                       โ”‚  
    2332:  โ”‚ โฑ 146 โ”‚   โ”‚   โ”‚   await self._connection.execute(query)                  โ”‚  
    2333:  โ”‚   147 โ”‚   โ”‚   except BaseException:                                      โ”‚  
    2334:  โ”‚   148 โ”‚   โ”‚   โ”‚   self._state = TransactionState.FAILED                  โ”‚  
    2335:  โ”‚   149 โ”‚   โ”‚   โ”‚   raise                                                  โ”‚  
    2336:  โ”‚                                                                          โ”‚  
    2337:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ     โ”‚  
    2338:  โ”‚ โ”‚   con = <asyncpg.connection.Connection object at 0x7ff3c23e1c70> โ”‚     โ”‚  
    2339:  โ”‚ โ”‚ query = 'BEGIN;'                                                 โ”‚     โ”‚  
    2340:  โ”‚ โ”‚  self = <asyncpg.Transaction state:failed 0x7ff38fcc78b0>        โ”‚     โ”‚  
    2341:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ     โ”‚  
    ...
    
    2358:  โ”‚ โ”‚ timeout = None                                                     โ”‚   โ”‚  
    2359:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ   โ”‚  
    2360:  โ”‚                                                                          โ”‚  
    2361:  โ”‚ in query:375                                                             โ”‚  
    2362:  โ”‚                                                                          โ”‚  
    2363:  โ”‚ in asyncpg.protocol.protocol.BaseProtocol.query:368                      โ”‚  
    2364:  โ”‚                                                                          โ”‚  
    2365:  โ”‚ in asyncpg.protocol.protocol.CoreProtocol._simple_query:1174             โ”‚  
    2366:  โ”‚                                                                          โ”‚  
    2367:  โ”‚ in asyncpg.protocol.protocol.BaseProtocol._write:967                     โ”‚  
    2368:  โ”‚                                                                          โ”‚  
    2369:  โ”‚ in uvloop.loop.UVStream.write:678                                        โ”‚  
    2370:  โ”‚                                                                          โ”‚  
    2371:  โ”‚ in uvloop.loop.UVHandle._ensure_alive:159                                โ”‚  
    2372:  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ  
    2373:  RuntimeError: unable to perform operation on <TCPTransport closed=True        
    2374:  reading=False 0x4147f800>; the handler is closed                              
    ...
    
    2387:  โ”‚                                                                          โ”‚  
    2388:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ     โ”‚  
    2389:  โ”‚ โ”‚        debug = None                                              โ”‚     โ”‚  
    2390:  โ”‚ โ”‚ loop_factory = None                                              โ”‚     โ”‚  
    2391:  โ”‚ โ”‚         main = <async_generator_asend object at 0x7ff3c5388900>  โ”‚     โ”‚  
    2392:  โ”‚ โ”‚       runner = <asyncio.runners.Runner object at 0x7ff3a3360470> โ”‚     โ”‚  
    2393:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ     โ”‚  
    2394:  โ”‚                                                                          โ”‚  
    2395:  โ”‚ /home/runner/.local/share/uv/python/cpython-3.12.10-linux-x86_64-gnu/lib โ”‚  
    2396:  โ”‚ /python3.12/asyncio/runners.py:118 in run                                โ”‚  
    2397:  โ”‚                                                                          โ”‚  
    2398:  โ”‚   115 โ”‚   โ”‚                                                              โ”‚  
    2399:  โ”‚   116 โ”‚   โ”‚   self._interrupt_count = 0                                  โ”‚  
    2400:  โ”‚   117 โ”‚   โ”‚   try:                                                       โ”‚  
    2401:  โ”‚ โฑ 118 โ”‚   โ”‚   โ”‚   return self._loop.run_until_complete(task)             โ”‚  
    2402:  โ”‚   119 โ”‚   โ”‚   except exceptions.CancelledError:                          โ”‚  
    2403:  โ”‚   120 โ”‚   โ”‚   โ”‚   if self._interrupt_count > 0:                          โ”‚  
    2404:  โ”‚   121 โ”‚   โ”‚   โ”‚   โ”‚   uncancel = getattr(task, "uncancel", None)         โ”‚  
    2405:  โ”‚                                                                          โ”‚  
    2406:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚  
    2407:  โ”‚ โ”‚        context = <_contextvars.Context object at 0x7ff38f275bc0>     โ”‚ โ”‚  
    2408:  โ”‚ โ”‚           coro = <async_generator_asend object at 0x7ff3c5388900>    โ”‚ โ”‚  
    2409:  โ”‚ โ”‚           self = <asyncio.runners.Runner object at 0x7ff3a3360470>   โ”‚ โ”‚  
    2410:  โ”‚ โ”‚ sigint_handler = functools.partial(<bound method Runner._on_sigint   โ”‚ โ”‚  
    2411:  โ”‚ โ”‚                  of <asyncio.runners.Runner object at                โ”‚ โ”‚  
    2412:  โ”‚ โ”‚                  0x7ff3a3360470>>, main_task=<Task finished          โ”‚ โ”‚  
    2413:  โ”‚ โ”‚                  name='Task-2089' coro=<<async_generator_asend       โ”‚ โ”‚  
    2414:  โ”‚ โ”‚                  without __name__>()>                                โ”‚ โ”‚  
    2415:  โ”‚ โ”‚                  exception=InterfaceError('cannot perform operation: โ”‚ โ”‚  
    2416:  โ”‚ โ”‚                  another operation is in progress')>)                โ”‚ โ”‚  
    2417:  โ”‚ โ”‚           task = <Task finished name='Task-2089'                     โ”‚ โ”‚  
    2418:  โ”‚ โ”‚                  coro=<<async_generator_asend without __name__>()>   โ”‚ โ”‚  
    2419:  โ”‚ โ”‚                  exception=InterfaceError('cannot perform operation: โ”‚ โ”‚  
    2420:  โ”‚ โ”‚                  another operation is in progress')>                 โ”‚ โ”‚  
    ...
    
    2470:  โ”‚ โ”‚             59, 442329, tzinfo=datetime.timezone.utc),               โ”‚ โ”‚  
    2471:  โ”‚ โ”‚             โ”‚   title='Hello',                                       โ”‚ โ”‚  
    2472:  โ”‚ โ”‚             โ”‚   content=['World', 'World2', 'World3'],               โ”‚ โ”‚  
    2473:  โ”‚ โ”‚             โ”‚   embeddings=[],                                       โ”‚ โ”‚  
    2474:  โ”‚ โ”‚             โ”‚   modality='text',                                     โ”‚ โ”‚  
    2475:  โ”‚ โ”‚             โ”‚   language='english',                                  โ”‚ โ”‚  
    2476:  โ”‚ โ”‚             โ”‚   embedding_model='text-embedding-3-large',            โ”‚ โ”‚  
    2477:  โ”‚ โ”‚             โ”‚   embedding_dimensions=1024                            โ”‚ โ”‚  
    2478:  โ”‚ โ”‚             )                                                        โ”‚ โ”‚  
    2479:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚  
    2480:  โ”‚                                                                          โ”‚  
    2481:  โ”‚ /home/runner/work/julep/julep/agents-api/agents_api/queries/utils.py:320 โ”‚  
    2482:  โ”‚ in async_wrapper                                                         โ”‚  
    2483:  โ”‚                                                                          โ”‚  
    2484:  โ”‚   317 โ”‚   โ”‚   โ”‚   โ”‚   result: T = await func(*args, **kwargs)            โ”‚  
    2485:  โ”‚   318 โ”‚   โ”‚   โ”‚   except BaseException as error:                         โ”‚  
    2486:  โ”‚   319 โ”‚   โ”‚   โ”‚   โ”‚   _check_error(error)                                โ”‚  
    2487:  โ”‚ โฑ 320 โ”‚   โ”‚   โ”‚   โ”‚   raise error                                        โ”‚  
    2488:  โ”‚   321 โ”‚   โ”‚   โ”‚                                                          โ”‚  
    ...
    
    2498:  โ”‚ โ”‚          โ”‚   'owner_type': 'agent',                                  โ”‚ โ”‚  
    2499:  โ”‚ โ”‚          โ”‚   'owner_id':                                             โ”‚ โ”‚  
    2500:  โ”‚ โ”‚          UUID('06828a99-73aa-787a-8000-7251da80ccc3'),               โ”‚ โ”‚  
    2501:  โ”‚ โ”‚          โ”‚   'connection_pool': <asyncpg.pool.Pool object at         โ”‚ โ”‚  
    2502:  โ”‚ โ”‚          0x7ff38c964c40>                                             โ”‚ โ”‚  
    2503:  โ”‚ โ”‚          }                                                           โ”‚ โ”‚  
    2504:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚  
    2505:  โ”‚                                                                          โ”‚  
    2506:  โ”‚ /home/runner/work/julep/julep/agents-api/agents_api/queries/utils.py:317 โ”‚  
    2507:  โ”‚ in async_wrapper                                                         โ”‚  
    2508:  โ”‚                                                                          โ”‚  
    2509:  โ”‚   314 โ”‚   โ”‚   @wraps(func)                                               โ”‚  
    2510:  โ”‚   315 โ”‚   โ”‚   async def async_wrapper(*args: P.args, **kwargs: P.kwargs) โ”‚  
    2511:  โ”‚   316 โ”‚   โ”‚   โ”‚   try:                                                   โ”‚  
    2512:  โ”‚ โฑ 317 โ”‚   โ”‚   โ”‚   โ”‚   result: T = await func(*args, **kwargs)            โ”‚  
    2513:  โ”‚   318 โ”‚   โ”‚   โ”‚   except BaseException as error:                         โ”‚  
    2514:  โ”‚   319 โ”‚   โ”‚   โ”‚   โ”‚   _check_error(error)                                โ”‚  
    2515:  โ”‚   320 โ”‚   โ”‚   โ”‚   โ”‚   raise error                                        โ”‚  
    2516:  โ”‚                                                                          โ”‚  
    ...
    
    2595:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚                                     โ”‚ โ”‚  
    2596:  โ”‚ โ”‚                    UUID('00000000-0000-0000-0000-000000000000'),     โ”‚ โ”‚  
    2597:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚                                     โ”‚ โ”‚  
    2598:  โ”‚ โ”‚                    UUID('06828a99-7713-72ab-8000-ddcc66b687a9'),     โ”‚ โ”‚  
    2599:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚   'agent',                          โ”‚ โ”‚  
    2600:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚                                     โ”‚ โ”‚  
    2601:  โ”‚ โ”‚                    UUID('06828a99-73aa-787a-8000-7251da80ccc3')      โ”‚ โ”‚  
    2602:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   ],                                    โ”‚ โ”‚  
    2603:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   'timeout': 90.0                       โ”‚ โ”‚  
    2604:  โ”‚ โ”‚                    โ”‚   โ”‚   }                                         โ”‚ โ”‚  
    2605:  โ”‚ โ”‚                    โ”‚   )                                             โ”‚ โ”‚  
    2606:  โ”‚ โ”‚                    ]                                                 โ”‚ โ”‚  
    2607:  โ”‚ โ”‚             conn = <PoolConnectionProxy                              โ”‚ โ”‚  
    2608:  โ”‚ โ”‚                    <asyncpg.connection.Connection object at          โ”‚ โ”‚  
    2609:  โ”‚ โ”‚                    0x7ff3c23e1c70> 0x7ff3a3360ca0>                   โ”‚ โ”‚  
    2610:  โ”‚ โ”‚ connection_error = False                                             โ”‚ โ”‚  
    2611:  โ”‚ โ”‚  connection_pool = <asyncpg.pool.Pool object at 0x7ff38c964c40>      โ”‚ โ”‚  
    2612:  โ”‚ โ”‚            debug = None                                              โ”‚ โ”‚  
    2613:  โ”‚ โ”‚           kwargs = {                                                 โ”‚ โ”‚  
    2614:  โ”‚ โ”‚                    โ”‚   'developer_id':                               โ”‚ โ”‚  
    2615:  โ”‚ โ”‚                    UUID('00000000-0000-0000-0000-000000000000'),     โ”‚ โ”‚  
    2616:  โ”‚ โ”‚                    โ”‚   'doc_id':                                     โ”‚ โ”‚  
    2617:  โ”‚ โ”‚                    UUID('06828a99-7713-72ab-8000-ddcc66b687a9'),     โ”‚ โ”‚  
    2618:  โ”‚ โ”‚                    โ”‚   'owner_type': 'agent',                        โ”‚ โ”‚  
    2619:  โ”‚ โ”‚                    โ”‚   'owner_id':                                   โ”‚ โ”‚  
    2620:  โ”‚ โ”‚                    UUID('06828a99-73aa-787a-8000-7251da80ccc3')      โ”‚ โ”‚  
    2621:  โ”‚ โ”‚                    }                                                 โ”‚ โ”‚  
    2622:  โ”‚ โ”‚    only_on_error = False                                             โ”‚ โ”‚  
    2623:  โ”‚ โ”‚             pool = <asyncpg.pool.Pool object at 0x7ff38c964c40>      โ”‚ โ”‚  
    ...
    
    2658:  โ”‚ /home/runner/work/julep/julep/agents-api/.venv/lib/python3.12/site-packa โ”‚  
    2659:  โ”‚ ges/asyncpg/pool.py:1031 in __aexit__                                    โ”‚  
    2660:  โ”‚                                                                          โ”‚  
    2661:  โ”‚   1028 โ”‚   โ”‚   self.done = True                                          โ”‚  
    2662:  โ”‚   1029 โ”‚   โ”‚   con = self.connection                                     โ”‚  
    2663:  โ”‚   1030 โ”‚   โ”‚   self.connection = None                                    โ”‚  
    2664:  โ”‚ โฑ 1031 โ”‚   โ”‚   await self.pool.release(con)                              โ”‚  
    2665:  โ”‚   1032 โ”‚                                                                 โ”‚  
    2666:  โ”‚   1033 โ”‚   def __await__(self):                                          โ”‚  
    2667:  โ”‚   1034 โ”‚   โ”‚   self.done = True                                          โ”‚  
    2668:  โ”‚                                                                          โ”‚  
    2669:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚  
    2670:  โ”‚ โ”‚  con = <PoolConnectionProxy <asyncpg.connection.Connection object at โ”‚ โ”‚  
    2671:  โ”‚ โ”‚        0x7ff3c23e1c70> 0x7ff3a3360ca0>                               โ”‚ โ”‚  
    2672:  โ”‚ โ”‚  exc = (                                                             โ”‚ โ”‚  
    2673:  โ”‚ โ”‚        โ”‚   <class 'RuntimeError'>,                                   โ”‚ โ”‚  
    2674:  โ”‚ โ”‚        โ”‚   RuntimeError('unable to perform operation on              โ”‚ โ”‚  
    2675:  โ”‚ โ”‚        <TCPTransport closed=True reading=False 0x4147f800>; the      โ”‚ โ”‚  
    ...
    
    2690:  โ”‚    907 โ”‚   async def close(self):                                        โ”‚  
    2691:  โ”‚    908 โ”‚   โ”‚   """Attempt to gracefully close all connections in the poo โ”‚  
    2692:  โ”‚                                                                          โ”‚  
    2693:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚  
    2694:  โ”‚ โ”‚         ch = <asyncpg.pool.PoolConnectionHolder object at            โ”‚ โ”‚  
    2695:  โ”‚ โ”‚              0x7ff38edb2c40>                                         โ”‚ โ”‚  
    2696:  โ”‚ โ”‚ connection = <PoolConnectionProxy <asyncpg.connection.Connection     โ”‚ โ”‚  
    2697:  โ”‚ โ”‚              object at 0x7ff3c23e1c70> 0x7ff3a3360ca0>               โ”‚ โ”‚  
    2698:  โ”‚ โ”‚       self = <asyncpg.pool.Pool object at 0x7ff38c964c40>            โ”‚ โ”‚  
    2699:  โ”‚ โ”‚    timeout = None                                                    โ”‚ โ”‚  
    2700:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚  
    2701:  โ”‚                                                                          โ”‚  
    2702:  โ”‚ /home/runner/work/julep/julep/agents-api/.venv/lib/python3.12/site-packa โ”‚  
    2703:  โ”‚ ges/asyncpg/pool.py:228 in release                                       โ”‚  
    2704:  โ”‚                                                                          โ”‚  
    2705:  โ”‚    225 โ”‚   โ”‚   โ”‚   โ”‚   # an IO error, so terminate the connection.       โ”‚  
    2706:  โ”‚    226 โ”‚   โ”‚   โ”‚   โ”‚   self._con.terminate()                             โ”‚  
    ...
    
    2712:  โ”‚                                                                          โ”‚  
    2713:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚  
    2714:  โ”‚ โ”‚  budget = None                                                       โ”‚ โ”‚  
    2715:  โ”‚ โ”‚    self = <asyncpg.pool.PoolConnectionHolder object at               โ”‚ โ”‚  
    2716:  โ”‚ โ”‚           0x7ff38edb2c40>                                            โ”‚ โ”‚  
    2717:  โ”‚ โ”‚ timeout = None                                                       โ”‚ โ”‚  
    2718:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚  
    2719:  โ”‚                                                                          โ”‚  
    2720:  โ”‚ /home/runner/work/julep/julep/agents-api/.venv/lib/python3.12/site-packa โ”‚  
    2721:  โ”‚ ges/asyncpg/pool.py:218 in release                                       โ”‚  
    2722:  โ”‚                                                                          โ”‚  
    2723:  โ”‚    215 โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   await self._con._reset()                      โ”‚  
    2724:  โ”‚    216 โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   await self._pool._reset(self._con)            โ”‚  
    2725:  โ”‚    217 โ”‚   โ”‚   โ”‚   else:                                                 โ”‚  
    2726:  โ”‚ โฑ  218 โ”‚   โ”‚   โ”‚   โ”‚   await self._con.reset(timeout=budget)             โ”‚  
    2727:  โ”‚    219 โ”‚   โ”‚   except (Exception, asyncio.CancelledError) as ex:         โ”‚  
    2728:  โ”‚    220 โ”‚   โ”‚   โ”‚   # If the `reset` call failed, terminate the connectio โ”‚  
    2729:  โ”‚    221 โ”‚   โ”‚   โ”‚   # A new one will be created when `acquire` is called  โ”‚  
    ...
    
    2776:  โ”‚    350 โ”‚   โ”‚   โ”‚   return result                                         โ”‚  
    2777:  โ”‚    351 โ”‚   โ”‚                                                             โ”‚  
    2778:  โ”‚    352 โ”‚   โ”‚   _, status, _ = await self._execute(                       โ”‚  
    2779:  โ”‚                                                                          โ”‚  
    2780:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ   โ”‚  
    2781:  โ”‚ โ”‚    args = ()                                                       โ”‚   โ”‚  
    2782:  โ”‚ โ”‚   query = 'ROLLBACK'                                               โ”‚   โ”‚  
    2783:  โ”‚ โ”‚    self = <asyncpg.connection.Connection object at 0x7ff3c23e1c70> โ”‚   โ”‚  
    2784:  โ”‚ โ”‚ timeout = None                                                     โ”‚   โ”‚  
    2785:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ   โ”‚  
    2786:  โ”‚                                                                          โ”‚  
    2787:  โ”‚ in query:360                                                             โ”‚  
    2788:  โ”‚                                                                          โ”‚  
    2789:  โ”‚ in asyncpg.protocol.protocol.BaseProtocol._check_state:745               โ”‚  
    2790:  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ  
    2791:  InterfaceError: cannot perform operation: another operation is in progress    
    2792:  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ query: search docs by hybrid โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
    2793:  Failed at tests/test_docs_queries.py                                          
    2794:  โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Traceback (most recent call last) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ  
    2795:  โ”‚ in uvloop.loop.Loop.call_soon:1281                                       โ”‚  
    2796:  โ”‚                                                                          โ”‚  
    2797:  โ”‚ in uvloop.loop.Loop._call_soon:669                                       โ”‚  
    2798:  โ”‚                                                                          โ”‚  
    2799:  โ”‚ in uvloop.loop.UVStream.write:678                                        โ”‚  
    2800:  โ”‚                                                                          โ”‚  
    2801:  โ”‚ in uvloop.loop.Loop._append_ready_handle:673                             โ”‚  
    2802:  โ”‚                                                                          โ”‚  
    2803:  โ”‚ in uvloop.loop.Loop._check_closed:705                                    โ”‚  
    2804:  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ  
    2805:  RuntimeError: Event loop is closed                                            
    2806:  During handling of the above exception, another exception occurred:           
    ...
    
    2847:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚                                     โ”‚ โ”‚  
    2848:  โ”‚ โ”‚                    UUID('00000000-0000-0000-0000-000000000000'),     โ”‚ โ”‚  
    2849:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚                                     โ”‚ โ”‚  
    2850:  โ”‚ โ”‚                    UUID('06828a99-8e7a-7a67-8000-f8aa992d91c6'),     โ”‚ โ”‚  
    2851:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚   'agent',                          โ”‚ โ”‚  
    2852:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   โ”‚                                     โ”‚ โ”‚  
    2853:  โ”‚ โ”‚                    UUID('06828a99-8b20-79c1-8000-002d13aee9b9')      โ”‚ โ”‚  
    2854:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   ],                                    โ”‚ โ”‚  
    2855:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   'timeout': 90.0                       โ”‚ โ”‚  
    2856:  โ”‚ โ”‚                    โ”‚   โ”‚   }                                         โ”‚ โ”‚  
    2857:  โ”‚ โ”‚                    โ”‚   )                                             โ”‚ โ”‚  
    2858:  โ”‚ โ”‚                    ]                                                 โ”‚ โ”‚  
    2859:  โ”‚ โ”‚             conn = <PoolConnectionProxy                              โ”‚ โ”‚  
    2860:  โ”‚ โ”‚                    <asyncpg.connection.Connection object at          โ”‚ โ”‚  
    2861:  โ”‚ โ”‚                    0x7ff3a3707c50> 0x7ff3a332ae90>                   โ”‚ โ”‚  
    2862:  โ”‚ โ”‚ connection_error = False                                             โ”‚ โ”‚  
    2863:  โ”‚ โ”‚  connection_pool = <asyncpg.pool.Pool object at 0x7ff38c967ac0>      โ”‚ โ”‚  
    2864:  โ”‚ โ”‚            debug = None                                              โ”‚ โ”‚  
    2865:  โ”‚ โ”‚           kwargs = {                                                 โ”‚ โ”‚  
    2866:  โ”‚ โ”‚                    โ”‚   'developer_id':                               โ”‚ โ”‚  
    2867:  โ”‚ โ”‚                    UUID('00000000-0000-0000-0000-000000000000'),     โ”‚ โ”‚  
    2868:  โ”‚ โ”‚                    โ”‚   'doc_id':                                     โ”‚ โ”‚  
    2869:  โ”‚ โ”‚                    UUID('06828a99-8e7a-7a67-8000-f8aa992d91c6'),     โ”‚ โ”‚  
    2870:  โ”‚ โ”‚                    โ”‚   'owner_type': 'agent',                        โ”‚ โ”‚  
    2871:  โ”‚ โ”‚                    โ”‚   'owner_id':                                   โ”‚ โ”‚  
    2872:  โ”‚ โ”‚                    UUID('06828a99-8b20-79c1-8000-002d13aee9b9')      โ”‚ โ”‚  
    2873:  โ”‚ โ”‚                    }                                                 โ”‚ โ”‚  
    2874:  โ”‚ โ”‚    only_on_error = False                                             โ”‚ โ”‚  
    2875:  โ”‚ โ”‚             pool = <asyncpg.pool.Pool object at 0x7ff38c967ac0>      โ”‚ โ”‚  
    ...
    
    2898:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚                                         โ”‚ โ”‚  
    2899:  โ”‚ โ”‚                    UUID('06828a99-8e7a-7a67-8000-f8aa992d91c6'),     โ”‚ โ”‚  
    2900:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚   'agent',                              โ”‚ โ”‚  
    2901:  โ”‚ โ”‚                    โ”‚   โ”‚   โ”‚                                         โ”‚ โ”‚  
    2902:  โ”‚ โ”‚                    UUID('06828a99-8b20-79c1-8000-002d13aee9b9')      โ”‚ โ”‚  
    2903:  โ”‚ โ”‚                    โ”‚   โ”‚   ]                                         โ”‚ โ”‚  
    2904:  โ”‚ โ”‚                    โ”‚   )                                             โ”‚ โ”‚  
    2905:  โ”‚ โ”‚                    ]                                                 โ”‚ โ”‚  
    2906:  โ”‚ โ”‚     return_index = -1                                                โ”‚ โ”‚  
    2907:  โ”‚ โ”‚           timeit = False                                             โ”‚ โ”‚  
    2908:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚  
    2909:  โ”‚                                                                          โ”‚  
    2910:  โ”‚ /home/runner/work/julep/julep/agents-api/.venv/lib/python3.12/site-packa โ”‚  
    2911:  โ”‚ ges/asyncpg/transaction.py:68 in __aenter__                              โ”‚  
    2912:  โ”‚                                                                          โ”‚  
    2913:  โ”‚    65 โ”‚   โ”‚   โ”‚   raise apg_errors.InterfaceError(                       โ”‚  
    2914:  โ”‚    66 โ”‚   โ”‚   โ”‚   โ”‚   'cannot enter context: already in an `async with`  โ”‚  
    2915:  โ”‚    67 โ”‚   โ”‚   self._managed = True                                       โ”‚  
    2916:  โ”‚ โฑ  68 โ”‚   โ”‚   await self.start()                                         โ”‚  
    2917:  โ”‚    69 โ”‚                                                                  โ”‚  
    2918:  โ”‚    70 โ”‚   async def __aexit__(self, extype, ex, tb):                     โ”‚  
    2919:  โ”‚    71 โ”‚   โ”‚   try:                                                       โ”‚  
    2920:  โ”‚                                                                          โ”‚  
    2921:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ             โ”‚  
    2922:  โ”‚ โ”‚ self = <asyncpg.Transaction state:failed 0x7ff3a048e0a0> โ”‚             โ”‚  
    2923:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ             โ”‚  
    2924:  โ”‚                                                                          โ”‚  
    2925:  โ”‚ /home/runner/work/julep/julep/agents-api/.venv/lib/python3.12/site-packa โ”‚  
    2926:  โ”‚ ges/asyncpg/transaction.py:146 in start                                  โ”‚  
    2927:  โ”‚                                                                          โ”‚  
    2928:  โ”‚   143 โ”‚   โ”‚   โ”‚   query += ';'                                           โ”‚  
    2929:  โ”‚   144 โ”‚   โ”‚                                                              โ”‚  
    2930:  โ”‚   145 โ”‚   โ”‚   try:                                                       โ”‚  
    2931:  โ”‚ โฑ 146 โ”‚   โ”‚   โ”‚   await self._connection.execute(query)                  โ”‚  
    2932:  โ”‚   147 โ”‚   โ”‚   except BaseException:                                      โ”‚  
    2933:  โ”‚   148 โ”‚   โ”‚   โ”‚   self._state = TransactionState.FAILED                  โ”‚  
    2934:  โ”‚   149 โ”‚   โ”‚   โ”‚   raise                                                  โ”‚  
    2935:  โ”‚                                                                          โ”‚  
    2936:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ     โ”‚  
    2937:  โ”‚ โ”‚   con = <asyncpg.connection.Connection object at 0x7ff3a3707c50> โ”‚     โ”‚  
    2938:  โ”‚ โ”‚ query = 'BEGIN;'                                                 โ”‚     โ”‚  
    2939:  โ”‚ โ”‚  self = <asyncpg.Transaction state:failed 0x7ff3a048e0a0>        โ”‚     โ”‚  
    2940:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ     โ”‚  
    ...
    
    2957:  โ”‚ โ”‚ timeout = None                                                     โ”‚   โ”‚  
    2958:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ   โ”‚  
    2959:  โ”‚                                                                          โ”‚  
    2960:  โ”‚ in query:375                                                             โ”‚  
    2961:  โ”‚                                                                          โ”‚  
    2962:  โ”‚ in asyncpg.protocol.protocol.BaseProtocol.query:368                      โ”‚  
    2963:  โ”‚                                                                          โ”‚  
    2964:  โ”‚ in asyncpg.protocol.protocol.CoreProtocol._simple_query:1174             โ”‚  
    2965:  โ”‚                                                                          โ”‚  
    2966:  โ”‚ in asyncpg.protocol.protocol.BaseProtocol._write:967                     โ”‚  
    2967:  โ”‚                                                                          โ”‚  
    2968:  โ”‚ in uvloop.loop.UVStream.write:678                                        โ”‚  
    2969:  โ”‚                                                                          โ”‚  
    2970:  โ”‚ in uvloop.loop.UVHandle._ensure_alive:159                                โ”‚  
    2971:  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ  
    2972:  RuntimeError: unable to perform operation on <TCPTransport closed=True        
    2973:  reading=False 0x4163c920>; the handler is closed                              
    ...
    
    2986:  โ”‚                                                                          โ”‚  
    2987:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ     โ”‚  
    2988:  โ”‚ โ”‚        debug = None                                              โ”‚     โ”‚  
    2989:  โ”‚ โ”‚ loop_factory = None                                              โ”‚     โ”‚  
    2990:  โ”‚ โ”‚         main = <async_generator_asend object at 0x7ff3a341fc00>  โ”‚     โ”‚  
    2991:  โ”‚ โ”‚       runner = <asyncio.runners.Runner object at 0x7ff3a3328410> โ”‚     โ”‚  
    2992:  โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ     โ”‚  
    2993:  โ”‚                                                                          โ”‚  
    2994:  โ”‚ /home/runner/.local/share/uv/python/cpython-3.12.10-linux-x86_64-gnu/lib โ”‚  
    2995:  โ”‚ /python3.12/asyncio/runners.py:118 in run                                โ”‚  
    2996:  โ”‚                                                                          โ”‚  
    2997:  โ”‚   115 โ”‚   โ”‚                                                              โ”‚  
    2998:  โ”‚   116 โ”‚   โ”‚   self._interrupt_count = 0                                  โ”‚  
    2999:  โ”‚   117 โ”‚   โ”‚   try:                                                       โ”‚  
    3000:  โ”‚ โฑ 118 โ”‚   โ”‚   โ”‚   return self._loop.run_until_complete(task)             โ”‚  
    3001:  โ”‚   119 โ”‚   โ”‚   except exceptions.CancelledError:                          โ”‚  
    3002:  โ”‚   120 โ”‚   โ”‚   โ”‚   if self._interrupt_count > 0:                          โ”‚  
    3003:  โ”‚   121 โ”‚   โ”‚   โ”‚   โ”‚   uncancel = getattr(task, "uncancel", None)         โ”‚  
    3004:  โ”‚                                                                          โ”‚  
    3005:  โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚  
    3006:  โ”‚ โ”‚        context = <_contextvars.Context object at 0x7ff3a3337400>     โ”‚ โ”‚  
    3007:  โ”‚ โ”‚           coro = <async_generator_asend object at 0x7ff3a341fc00>    โ”‚ โ”‚  
    3008:  โ”‚ โ”‚           self = <asyncio.runners.Runner object at 0x7ff3a3328410>   โ”‚ โ”‚  
    3009:  โ”‚ โ”‚ sigint_handler = functools.partial(<bound method Runner._on_sigint   โ”‚ โ”‚  
    3010:  โ”‚ โ”‚                  of <asyncio.runners.Runner object at                โ”‚ โ”‚  
    3011:  โ”‚ โ”‚                  0x7ff3a3328410>>, main_task=<Task finished          โ”‚ โ”‚  
    3012:  โ”‚ โ”‚                  name='Task-2168' coro=<<async_generator_asend       โ”‚ โ”‚  
    3013:  โ”‚ โ”‚                  without __name__>()>                                โ”‚ โ”‚  
    3014:  โ”‚ โ”‚                  exception=InterfaceError('cannot perform operation: โ”‚ โ”‚  
    3015:  โ”‚ โ”‚                  another operation is in progress')>)                โ”‚ โ”‚  
    3016:  โ”‚ โ”‚           task = <Task finished name='Task-2168'                     โ”‚ โ”‚  
    3017:  โ”‚ โ”‚                  coro=<<async_generator_asend without __name__>()>   โ”‚ โ”‚  
    3018:  โ”‚ โ”‚                  exception=InterfaceError('cannot perform operation: โ”‚ โ”‚  
    3019:  โ”‚ โ”‚                  another operation is in progress')>                 โ”‚ โ”‚  
    ...
    
    3069:  โ”‚ โ”‚             905090, tzinfo=datetime.timezone.utc),                   โ”‚ โ”‚  
    3070:  โ”‚ โ”‚             โ”‚   title='Hello',                                       โ”‚ โ”‚  
    3071:  โ”‚ โ”‚             โ”‚   content=['World', 'World2', 'World3'],               โ”‚ โ”‚  
    3072:  โ”‚ โ”‚             โ”‚   embeddings=[],                                       โ”‚ โ”‚  
    3073:  โ”‚ โ”‚             โ”‚   modality='text',                                     โ”‚ ...
    

    PR Reviewer Guide ๐Ÿ”

    Here are some key observations to aid the review process:

    โฑ๏ธย Estimated effort to review: 1 ๐Ÿ”ตโšชโšชโšชโšช
    ๐Ÿงชย No relevant tests
    ๐Ÿ”’ย No security concerns identified
    โšกย No major issues detected

    PR Code Suggestions โœจ

    No code suggestions found for the PR.