Skip to content

Commit 8bce540

Browse files
carenthomaskianjones9sarahwoodersmattzh72cliandy
authored
chore: bump v0.8.16 (#2724)
Co-authored-by: Kian Jones <[email protected]> Co-authored-by: Sarah Wooders <[email protected]> Co-authored-by: Matthew Zhou <[email protected]> Co-authored-by: Andy Li <[email protected]> Co-authored-by: jnjpng <[email protected]> Co-authored-by: Jin Peng <[email protected]> Co-authored-by: cpacker <[email protected]> Co-authored-by: Shubham Naik <[email protected]> Co-authored-by: Shubham Naik <[email protected]> Co-authored-by: Kevin Lin <[email protected]> Co-authored-by: Eric Ly <[email protected]> Co-authored-by: Eric Ly <[email protected]>
1 parent bd976eb commit 8bce540

File tree

209 files changed

+8117
-1436
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

209 files changed

+8117
-1436
lines changed

alembic/env.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
from alembic import context
77
from letta.config import LettaConfig
88
from letta.orm import Base
9-
from letta.settings import settings
9+
from letta.settings import DatabaseChoice, settings
1010

1111
letta_config = LettaConfig.load()
1212

1313
# this is the Alembic Config object, which provides
1414
# access to the values within the .ini file in use.
1515
config = context.config
1616

17-
if settings.letta_pg_uri_no_default:
17+
if settings.database_engine is DatabaseChoice.POSTGRES:
1818
config.set_main_option("sqlalchemy.url", settings.letta_pg_uri)
19-
print(f"Using database: ", settings.letta_pg_uri)
19+
print("Using database: ", settings.letta_pg_uri)
2020
else:
2121
config.set_main_option("sqlalchemy.url", "sqlite:///" + os.path.join(letta_config.recall_storage_path, "sqlite.db"))
2222

alembic/versions/0335b1eb9c40_add_batch_item_id_to_messages.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import sqlalchemy as sa
1212

1313
from alembic import op
14+
from letta.settings import settings
1415

1516
# revision identifiers, used by Alembic.
1617
revision: str = "0335b1eb9c40"
@@ -20,12 +21,20 @@
2021

2122

2223
def upgrade() -> None:
24+
# Skip this migration for SQLite
25+
if not settings.letta_pg_uri_no_default:
26+
return
27+
2328
# ### commands auto generated by Alembic - please adjust! ###
2429
op.add_column("messages", sa.Column("batch_item_id", sa.String(), nullable=True))
2530
# ### end Alembic commands ###
2631

2732

2833
def downgrade() -> None:
34+
# Skip this migration for SQLite
35+
if not settings.letta_pg_uri_no_default:
36+
return
37+
2938
# ### commands auto generated by Alembic - please adjust! ###
3039
op.drop_column("messages", "batch_item_id")
3140
# ### end Alembic commands ###

alembic/versions/08b2f8225812_adding_toolsagents_orm.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import sqlalchemy as sa
1212

1313
from alembic import op
14+
from letta.settings import settings
1415

1516
# revision identifiers, used by Alembic.
1617
revision: str = "08b2f8225812"
@@ -20,6 +21,10 @@
2021

2122

2223
def upgrade() -> None:
24+
# Skip this migration for SQLite
25+
if not settings.letta_pg_uri_no_default:
26+
return
27+
2328
# ### commands auto generated by Alembic - please adjust! ###
2429
op.create_table(
2530
"tools_agents",
@@ -44,6 +49,10 @@ def upgrade() -> None:
4449

4550

4651
def downgrade() -> None:
52+
# Skip this migration for SQLite
53+
if not settings.letta_pg_uri_no_default:
54+
return
55+
4756
# ### commands auto generated by Alembic - please adjust! ###
4857
op.drop_table("tools_agents")
4958
# ### end Alembic commands ###

alembic/versions/0b496eae90de_add_file_agent_table.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import sqlalchemy as sa
1212

1313
from alembic import op
14+
from letta.settings import settings
1415

1516
# revision identifiers, used by Alembic.
1617
revision: str = "0b496eae90de"
@@ -20,6 +21,10 @@
2021

2122

2223
def upgrade() -> None:
24+
# Skip this migration for SQLite
25+
if not settings.letta_pg_uri_no_default:
26+
return
27+
2328
# ### commands auto generated by Alembic - please adjust! ###
2429
op.create_table(
2530
"files_agents",
@@ -48,6 +53,10 @@ def upgrade() -> None:
4853

4954

5055
def downgrade() -> None:
56+
# Skip this migration for SQLite
57+
if not settings.letta_pg_uri_no_default:
58+
return
59+
5160
# ### commands auto generated by Alembic - please adjust! ###
5261
op.drop_index("ix_files_agents_file_id_agent_id", table_name="files_agents")
5362
op.drop_table("files_agents")

alembic/versions/0ceb975e0063_add_llm_batch_jobs_tables.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
import letta
1414
from alembic import op
15+
from letta.settings import settings
1516

1617
# revision identifiers, used by Alembic.
1718
revision: str = "0ceb975e0063"
@@ -21,6 +22,10 @@
2122

2223

2324
def upgrade() -> None:
25+
# Skip this migration for SQLite
26+
if not settings.letta_pg_uri_no_default:
27+
return
28+
2429
# ### commands auto generated by Alembic - please adjust! ###
2530
op.create_table(
2631
"llm_batch_job",
@@ -75,6 +80,10 @@ def upgrade() -> None:
7580

7681

7782
def downgrade() -> None:
83+
# Skip this migration for SQLite
84+
if not settings.letta_pg_uri_no_default:
85+
return
86+
7887
# ### commands auto generated by Alembic - please adjust! ###
7988
op.drop_index("ix_llm_batch_items_status", table_name="llm_batch_items")
8089
op.drop_index("ix_llm_batch_items_batch_id", table_name="llm_batch_items")

alembic/versions/167491cfb7a8_add_identities_for_blocks.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import sqlalchemy as sa
1212

1313
from alembic import op
14+
from letta.settings import settings
1415

1516
# revision identifiers, used by Alembic.
1617
revision: str = "167491cfb7a8"
@@ -20,6 +21,10 @@
2021

2122

2223
def upgrade() -> None:
24+
# Skip this migration for SQLite
25+
if not settings.letta_pg_uri_no_default:
26+
return
27+
2328
# ### commands auto generated by Alembic - please adjust! ###
2429
op.create_table(
2530
"identities_blocks",
@@ -33,6 +38,10 @@ def upgrade() -> None:
3338

3439

3540
def downgrade() -> None:
41+
# Skip this migration for SQLite
42+
if not settings.letta_pg_uri_no_default:
43+
return
44+
3645
# ### commands auto generated by Alembic - please adjust! ###
3746
op.drop_table("identities_blocks")
3847
# ### end Alembic commands ###

alembic/versions/18e300709530_add_instructions_field_to_sources.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import sqlalchemy as sa
1212

1313
from alembic import op
14+
from letta.settings import settings
1415

1516
# revision identifiers, used by Alembic.
1617
revision: str = "18e300709530"
@@ -20,12 +21,20 @@
2021

2122

2223
def upgrade() -> None:
24+
# Skip this migration for SQLite
25+
if not settings.letta_pg_uri_no_default:
26+
return
27+
2328
# ### commands auto generated by Alembic - please adjust! ###
2429
op.add_column("sources", sa.Column("instructions", sa.String(), nullable=True))
2530
# ### end Alembic commands ###
2631

2732

2833
def downgrade() -> None:
34+
# Skip this migration for SQLite
35+
if not settings.letta_pg_uri_no_default:
36+
return
37+
2938
# ### commands auto generated by Alembic - please adjust! ###
3039
op.drop_column("sources", "instructions")
3140
# ### end Alembic commands ###

alembic/versions/1af251a42c06_fix_files_agents_constraints.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from typing import Sequence, Union
1010

1111
from alembic import op
12+
from letta.settings import settings
1213

1314
# revision identifiers, used by Alembic.
1415
revision: str = "1af251a42c06"
@@ -18,6 +19,10 @@
1819

1920

2021
def upgrade() -> None:
22+
# Skip this migration for SQLite
23+
if not settings.letta_pg_uri_no_default:
24+
return
25+
2126
# ### commands auto generated by Alembic - please adjust! ###
2227
op.drop_index("ix_files_agents_agent_file_name", table_name="files_agents")
2328
op.drop_index("ix_files_agents_file_id_agent_id", table_name="files_agents")
@@ -31,6 +36,10 @@ def upgrade() -> None:
3136

3237

3338
def downgrade() -> None:
39+
# Skip this migration for SQLite
40+
if not settings.letta_pg_uri_no_default:
41+
return
42+
3443
# ### commands auto generated by Alembic - please adjust! ###
3544
op.drop_constraint("uq_file_agent", "files_agents", type_="unique")
3645
op.drop_constraint("uq_agent_filename", "files_agents", type_="unique")

alembic/versions/1c6b6a38b713_add_pip_requirements_to_tools.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import sqlalchemy as sa
1212

1313
from alembic import op
14+
from letta.settings import settings
1415

1516
# revision identifiers, used by Alembic.
1617
revision: str = "1c6b6a38b713"
@@ -20,12 +21,20 @@
2021

2122

2223
def upgrade() -> None:
24+
# Skip this migration for SQLite
25+
if not settings.letta_pg_uri_no_default:
26+
return
27+
2328
# ### commands auto generated by Alembic - please adjust! ###
2429
op.add_column("tools", sa.Column("pip_requirements", sa.JSON(), nullable=True))
2530
# ### end Alembic commands ###
2631

2732

2833
def downgrade() -> None:
34+
# Skip this migration for SQLite
35+
if not settings.letta_pg_uri_no_default:
36+
return
37+
2938
# ### commands auto generated by Alembic - please adjust! ###
3039
op.drop_column("tools", "pip_requirements")
3140
# ### end Alembic commands ###

alembic/versions/1c8880d671ee_make_an_blocks_agents_mapping_table.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import sqlalchemy as sa
1212

1313
from alembic import op
14+
from letta.settings import settings
1415

1516
# revision identifiers, used by Alembic.
1617
revision: str = "1c8880d671ee"
@@ -20,6 +21,10 @@
2021

2122

2223
def upgrade() -> None:
24+
# Skip this migration for SQLite
25+
if not settings.letta_pg_uri_no_default:
26+
return
27+
2328
# ### commands auto generated by Alembic - please adjust! ###
2429
op.create_unique_constraint("unique_block_id_label", "block", ["id", "label"])
2530

@@ -46,6 +51,10 @@ def upgrade() -> None:
4651

4752

4853
def downgrade() -> None:
54+
# Skip this migration for SQLite
55+
if not settings.letta_pg_uri_no_default:
56+
return
57+
4958
# ### commands auto generated by Alembic - please adjust! ###
5059
op.drop_constraint("unique_block_id_label", "block", type_="unique")
5160
op.drop_table("blocks_agents")

0 commit comments

Comments
 (0)