update rate limits (#316)

* update rate limits

* default none
This commit is contained in:
Preston Rasmussen 2025-04-02 11:43:34 -04:00 committed by GitHub
parent dbe21a1975
commit f9aa90f612
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 3 deletions

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
DEFAULT_MAX_TOKENS = 2048
DEFAULT_MAX_TOKENS = 8192
DEFAULT_TEMPERATURE = 0

View file

@ -92,13 +92,22 @@ async def build_indices_and_constraints(driver: AsyncDriver, delete_existing: bo
)
async def clear_data(driver: AsyncDriver):
async def clear_data(driver: AsyncDriver, group_ids: list[str] | None = None):
async with driver.session() as session:
async def delete_all(tx):
await tx.run('MATCH (n) DETACH DELETE n')
await session.execute_write(delete_all)
async def delete_group_ids(tx):
await tx.run(
'MATCH (n:Entity|Episodic|Community) WHERE n.group_id IN $group_ids DETACH DELETE n',
group_ids=group_ids,
)
if group_ids is None:
await session.execute_write(delete_all)
else:
await session.execute_write(delete_group_ids)
async def retrieve_episodes(