diff --git a/src/backend/langflow/components/chains/PromptRunner.py b/src/backend/langflow/components/chains/PromptRunner.py index db9283b07..b8eaf8677 100644 --- a/src/backend/langflow/components/chains/PromptRunner.py +++ b/src/backend/langflow/components/chains/PromptRunner.py @@ -8,7 +8,7 @@ from langchain.schema import Document class PromptRunner(CustomComponent): display_name: str = "Prompt Runner" description: str = "Run a Chain with the given PromptTemplate" - beta = True + beta: str = True field_config = { "llm": {"display_name": "LLM"}, "prompt": { diff --git a/src/backend/langflow/components/toolkits/Metaphor.py b/src/backend/langflow/components/toolkits/Metaphor.py index 6f43d24b4..ce49d36f6 100644 --- a/src/backend/langflow/components/toolkits/Metaphor.py +++ b/src/backend/langflow/components/toolkits/Metaphor.py @@ -13,7 +13,7 @@ class MetaphorToolkit(CustomComponent): documentation = ( "https://python.langchain.com/docs/integrations/tools/metaphor_search" ) - beta = True + beta: str = True # api key should be password = True field_config = { "metaphor_api_key": {"display_name": "Metaphor API Key", "password": True}, diff --git a/src/backend/langflow/components/utilities/GetRequest.py b/src/backend/langflow/components/utilities/GetRequest.py index d5df32cca..1b1f1d375 100644 --- a/src/backend/langflow/components/utilities/GetRequest.py +++ b/src/backend/langflow/components/utilities/GetRequest.py @@ -10,7 +10,7 @@ class GetRequest(CustomComponent): description: str = "Make a GET request to the given URL." output_types: list[str] = ["Document"] documentation: str = "https://docs.langflow.org/components/utilities#get-request" - beta = True + beta: str = True field_config = { "url": { "display_name": "URL", diff --git a/src/backend/langflow/components/utilities/JSONDocumentBuilder.py b/src/backend/langflow/components/utilities/JSONDocumentBuilder.py index 26a2afd94..c04d9e66f 100644 --- a/src/backend/langflow/components/utilities/JSONDocumentBuilder.py +++ b/src/backend/langflow/components/utilities/JSONDocumentBuilder.py @@ -20,7 +20,7 @@ class JSONDocumentBuilder(CustomComponent): display_name: str = "JSON Document Builder" description: str = "Build a Document containing a JSON object using a key and another Document page content." output_types: list[str] = ["Document"] - beta = True + beta: str = True documentation: str = ( "https://docs.langflow.org/components/utilities#json-document-builder" ) diff --git a/src/backend/langflow/components/utilities/PostRequest.py b/src/backend/langflow/components/utilities/PostRequest.py index 6857f4866..7021e4aa8 100644 --- a/src/backend/langflow/components/utilities/PostRequest.py +++ b/src/backend/langflow/components/utilities/PostRequest.py @@ -10,7 +10,7 @@ class PostRequest(CustomComponent): description: str = "Make a POST request to the given URL." output_types: list[str] = ["Document"] documentation: str = "https://docs.langflow.org/components/utilities#post-request" - beta = True + beta: str = True field_config = { "url": {"display_name": "URL", "info": "The URL to make the request to."}, "headers": { diff --git a/src/backend/langflow/components/utilities/UpdateRequest.py b/src/backend/langflow/components/utilities/UpdateRequest.py index d18c94a56..fb7213357 100644 --- a/src/backend/langflow/components/utilities/UpdateRequest.py +++ b/src/backend/langflow/components/utilities/UpdateRequest.py @@ -10,7 +10,7 @@ class UpdateRequest(CustomComponent): description: str = "Make a PATCH request to the given URL." output_types: list[str] = ["Document"] documentation: str = "https://docs.langflow.org/components/utilities#update-request" - beta = True + beta: str = True field_config = { "url": {"display_name": "URL", "info": "The URL to make the request to."}, "headers": { diff --git a/src/backend/langflow/components/vectorstores/Chroma.py b/src/backend/langflow/components/vectorstores/Chroma.py index 3cfd4771e..8b7664391 100644 --- a/src/backend/langflow/components/vectorstores/Chroma.py +++ b/src/backend/langflow/components/vectorstores/Chroma.py @@ -17,7 +17,7 @@ class ChromaComponent(CustomComponent): display_name: str = "Chroma (Custom Component)" description: str = "Implementation of Vector Store using Chroma" documentation = "https://python.langchain.com/docs/integrations/vectorstores/chroma" - beta = True + beta: str = True def build_config(self): """ diff --git a/src/backend/langflow/components/vectorstores/Vectara.py b/src/backend/langflow/components/vectorstores/Vectara.py index 6edc69822..df3b66395 100644 --- a/src/backend/langflow/components/vectorstores/Vectara.py +++ b/src/backend/langflow/components/vectorstores/Vectara.py @@ -14,7 +14,7 @@ class VectaraComponent(CustomComponent): documentation = ( "https://python.langchain.com/docs/integrations/vectorstores/vectara" ) - beta = True + beta: str = True # api key should be password = True field_config = { "vectara_customer_id": {"display_name": "Vectara Customer ID"}, diff --git a/src/backend/langflow/services/database/models/user/crud.py b/src/backend/langflow/services/database/models/user/crud.py index 36f03e684..6f0e019f6 100644 --- a/src/backend/langflow/services/database/models/user/crud.py +++ b/src/backend/langflow/services/database/models/user/crud.py @@ -54,6 +54,9 @@ def update_user( def update_user_last_login_at(user_id: UUID, db: Session = Depends(get_session)): - user_data = UserUpdate(last_login_at=datetime.now(timezone.utc)) # type: ignore - user = get_user_by_id(db, user_id) - return update_user(user, user_data, db) + try: + user_data = UserUpdate(last_login_at=datetime.now(timezone.utc)) # type: ignore + user = get_user_by_id(db, user_id) + return update_user(user, user_data, db) + except Exception: + pass diff --git a/src/backend/langflow/services/database/models/user/user.py b/src/backend/langflow/services/database/models/user/user.py index 5f2f3e1c4..411026d89 100644 --- a/src/backend/langflow/services/database/models/user/user.py +++ b/src/backend/langflow/services/database/models/user/user.py @@ -45,9 +45,9 @@ class UserRead(SQLModel): class UserUpdate(SQLModel): - username: Optional[str] = Field() - profile_image: Optional[str] = Field() - password: Optional[str] = Field() - is_active: Optional[bool] = Field() - is_superuser: Optional[bool] = Field() - last_login_at: Optional[datetime] = Field() + username: Optional[str] + profile_image: Optional[str] + password: Optional[str] + is_active: Optional[bool] + is_superuser: Optional[bool] + last_login_at: Optional[datetime]