Browse Source

r2

tags/2.0.0-beta.1
jyong 5 months ago
parent
commit
8a86a2c817

+ 3
- 3
api/core/app/apps/pipeline/pipeline_generator.py View File

stream=streaming, stream=streaming,
invoke_from=invoke_from, invoke_from=invoke_from,
call_depth=call_depth, call_depth=call_depth,
workflow_run_id=workflow_run_id,
workflow_execution_id=workflow_run_id,
) )


contexts.plugin_tool_providers.set({}) contexts.plugin_tool_providers.set({})
stream=streaming, stream=streaming,
invoke_from=InvokeFrom.DEBUGGER, invoke_from=InvokeFrom.DEBUGGER,
call_depth=0, call_depth=0,
workflow_run_id=str(uuid.uuid4()),
workflow_execution_id=str(uuid.uuid4()),
) )
contexts.plugin_tool_providers.set({}) contexts.plugin_tool_providers.set({})
contexts.plugin_tool_providers_lock.set(threading.Lock()) contexts.plugin_tool_providers_lock.set(threading.Lock())
invoke_from=InvokeFrom.DEBUGGER, invoke_from=InvokeFrom.DEBUGGER,
extras={"auto_generate_conversation_name": False}, extras={"auto_generate_conversation_name": False},
single_loop_run=RagPipelineGenerateEntity.SingleLoopRunEntity(node_id=node_id, inputs=args["inputs"]), single_loop_run=RagPipelineGenerateEntity.SingleLoopRunEntity(node_id=node_id, inputs=args["inputs"]),
workflow_run_id=str(uuid.uuid4()),
workflow_execution_id=str(uuid.uuid4()),
) )
contexts.plugin_tool_providers.set({}) contexts.plugin_tool_providers.set({})
contexts.plugin_tool_providers_lock.set(threading.Lock()) contexts.plugin_tool_providers_lock.set(threading.Lock())

+ 1
- 0
api/core/entities/knowledge_entities.py View File

class PipelineDocument(BaseModel): class PipelineDocument(BaseModel):
id: str id: str
position: int position: int
data_source_type: str
data_source_info: Optional[dict] = None data_source_info: Optional[dict] = None
name: str name: str
indexing_status: str indexing_status: str

+ 35
- 0
api/migrations/versions/2025_06_05_1356-d466c551816f_add_pipeline_info_5.py View File

"""add_pipeline_info_5

Revision ID: d466c551816f
Revises: e4fb49a4fe86
Create Date: 2025-06-05 13:56:05.962215

"""
from alembic import op
import models as models
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'd466c551816f'
down_revision = 'e4fb49a4fe86'
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('datasource_providers', schema=None) as batch_op:
batch_op.drop_constraint(batch_op.f('datasource_provider_plugin_id_provider_idx'), type_='unique')
batch_op.create_index('datasource_provider_auth_type_provider_idx', ['tenant_id', 'plugin_id', 'provider'], unique=False)

# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('datasource_providers', schema=None) as batch_op:
batch_op.drop_index('datasource_provider_auth_type_provider_idx')
batch_op.create_unique_constraint(batch_op.f('datasource_provider_plugin_id_provider_idx'), ['plugin_id', 'provider'])

# ### end Alembic commands ###

+ 1
- 1
api/models/oauth.py View File

__tablename__ = "datasource_providers" __tablename__ = "datasource_providers"
__table_args__ = ( __table_args__ = (
db.PrimaryKeyConstraint("id", name="datasource_provider_pkey"), db.PrimaryKeyConstraint("id", name="datasource_provider_pkey"),
db.UniqueConstraint("plugin_id", "provider", name="datasource_provider_auth_type_provider_idx"),
db.Index("datasource_provider_auth_type_provider_idx", "tenant_id", "plugin_id", "provider"),
) )
id = db.Column(StringUUID, server_default=db.text("uuid_generate_v4()")) id = db.Column(StringUUID, server_default=db.text("uuid_generate_v4()"))
tenant_id = db.Column(StringUUID, nullable=False) tenant_id = db.Column(StringUUID, nullable=False)

+ 1
- 1
api/services/datasource_provider_service.py View File

for datasource_provider in datasource_providers: for datasource_provider in datasource_providers:
encrypted_credentials = datasource_provider.encrypted_credentials encrypted_credentials = datasource_provider.encrypted_credentials
# Get provider credential secret variables # Get provider credential secret variables
credential_secret_variables = self.extract_secret_variables(tenant_id=tenant_id, provider_id=provider)
credential_secret_variables = self.extract_secret_variables(tenant_id=tenant_id, provider_id=f"{plugin_id}/{provider}")


# Obfuscate provider credentials # Obfuscate provider credentials
copy_credentials = encrypted_credentials.copy() copy_credentials = encrypted_credentials.copy()

Loading…
Cancel
Save