diff --git a/docs/package.json b/docs/package.json index 57c86eec2..87f3d3d71 100644 --- a/docs/package.json +++ b/docs/package.json @@ -70,4 +70,4 @@ "engines": { "node": ">=16.14" } -} \ No newline at end of file +} diff --git a/poetry.lock b/poetry.lock index 11fde07da..6019df932 100644 --- a/poetry.lock +++ b/poetry.lock @@ -4459,6 +4459,22 @@ langchain-core = ">=0.1.40,<0.2.0" numpy = ">=1,<2" pinecone-client = ">=3.2.2,<4.0.0" +[[package]] +name = "langchain-pinecone" +version = "0.1.0" +description = "An integration package connecting Pinecone and LangChain" +optional = false +python-versions = "<3.13,>=3.8.1" +files = [ + {file = "langchain_pinecone-0.1.0-py3-none-any.whl", hash = "sha256:d957f27b1cceab425c3e8603c7a32533d4593ce8705242e78f6dc03aa71cf417"}, + {file = "langchain_pinecone-0.1.0.tar.gz", hash = "sha256:93f81e7c3926027cc6a87b001ee4d2e02a432a916709dbd395162b342bf84586"}, +] + +[package.dependencies] +langchain-core = ">=0.1.40,<0.2.0" +numpy = ">=1,<2" +pinecone-client = ">=3.2.2,<4.0.0" + [[package]] name = "langchain-text-splitters" version = "0.2.1" diff --git a/src/backend/base/langflow/alembic/versions/bc804d8e7a18_fix_types.py b/src/backend/base/langflow/alembic/versions/bc804d8e7a18_fix_types.py new file mode 100644 index 000000000..1b29b088f --- /dev/null +++ b/src/backend/base/langflow/alembic/versions/bc804d8e7a18_fix_types.py @@ -0,0 +1,91 @@ +"""Fix types + +Revision ID: bc804d8e7a18 +Revises: bc2f01c40e4a +Create Date: 2024-04-22 19:33:02.242116 + +""" +from typing import Sequence, Union + +import sqlalchemy as sa +from alembic import op +from sqlalchemy.dialects import postgresql +from sqlalchemy.engine.reflection import Inspector + +# revision identifiers, used by Alembic. +revision: str = 'bc804d8e7a18' +down_revision: Union[str, None] = 'bc2f01c40e4a' +branch_labels: Union[str, Sequence[str], None] = None +depends_on: Union[str, Sequence[str], None] = None + + +def upgrade() -> None: + conn = op.get_bind() + inspector = Inspector.from_engine(conn) # type: ignore + # ### commands auto generated by Alembic - please adjust! ### + table_names = inspector.get_table_names() + if "apikey" in table_names: + column_names = [col["name"] for col in inspector.get_columns("apikey")] + with op.batch_alter_table('apikey', schema=None) as batch_op: + if "created_at" in column_names: + batch_op.alter_column('created_at', + existing_type=postgresql.TIMESTAMP(), + type_=sa.DateTime(timezone=True), + nullable=True) + if "last_used_at" in column_names: + batch_op.alter_column('last_used_at', + existing_type=postgresql.TIMESTAMP(), + type_=sa.DateTime(timezone=True), + existing_nullable=True) + + if "credential" in table_names: + column_names = [col["name"] for col in inspector.get_columns("credential")] + with op.batch_alter_table('credential', schema=None) as batch_op: + if "created_at" in column_names: + batch_op.alter_column('created_at', + existing_type=postgresql.TIMESTAMP(), + type_=sa.DateTime(timezone=True), + nullable=True) + if "updated_at" in column_names: + batch_op.alter_column('updated_at', + existing_type=postgresql.TIMESTAMP(), + type_=sa.DateTime(timezone=True), + existing_nullable=True) + + # ### end Alembic commands ### + + +def downgrade() -> None: + conn = op.get_bind() + inspector = Inspector.from_engine(conn) # type: ignore + # ### commands auto generated by Alembic - please adjust! ### + table_names = inspector.get_table_names() + if "credential" in table_names: + column_names = [col["name"] for col in inspector.get_columns("credential")] + with op.batch_alter_table('credential', schema=None) as batch_op: + if "updated_at" in column_names: + batch_op.alter_column('updated_at', + existing_type=sa.DateTime(timezone=True), + type_=postgresql.TIMESTAMP(), + existing_nullable=True) + if "created_at" in column_names: + batch_op.alter_column('created_at', + existing_type=sa.DateTime(timezone=True), + type_=postgresql.TIMESTAMP(), + nullable=False) + + if "apikey" in table_names: + column_names = [col["name"] for col in inspector.get_columns("apikey")] + with op.batch_alter_table('apikey', schema=None) as batch_op: + if "last_used_at" in column_names: + batch_op.alter_column('last_used_at', + existing_type=sa.DateTime(timezone=True), + type_=postgresql.TIMESTAMP(), + existing_nullable=True) + if "created_at" in column_names: + batch_op.alter_column('created_at', + existing_type=sa.DateTime(timezone=True), + type_=postgresql.TIMESTAMP(), + nullable=False) + + # ### end Alembic commands ###