Refactor the post_code_processing method in the PromptComponent class to improve code readability and maintainability. The changes include:
- Import the process_prompt_template function from langflow.base.prompts.api_utils.
- Import the update_template_values function from langflow.template.utils.
- Call the process_prompt_template function to update the template value.
- Update the frontend_node with any values set in the current_build_config.
- Remove unnecessary comments and whitespace.
These changes enhance the overall quality of the code and make it easier to understand and maintain.
The post_code_validation method in the Component class has been renamed to post_code_processing to better reflect its purpose. This change improves code clarity and maintainability.
Update the return type of the build_custom_component_template function in utils.py to include the possibility of returning a Component object. This change ensures that the function can handle both CustomComponent and Component objects, improving flexibility and compatibility.
Refactor the post_code_validation method in the Component class to improve code readability and maintainability. The changes include:
- Rename the parameters to better reflect their purpose.
- Update the function documentation to provide a clear explanation of the method's purpose.
- Remove unnecessary comments and whitespace.
- Improve variable naming for better clarity.
These changes enhance the overall quality of the code and make it easier to understand and maintain.
Refactor the prompt validation process in validate.py to improve code readability and maintainability. The changes include:
- Update the import statement for process_prompt_template in api_utils.py.
- Remove unused imports from api_utils.py.
- Simplify the post_validate_prompt function by removing unnecessary conditional statements.
- Replace the validate_prompt function call with process_prompt_template in post_validate_prompt.
These changes enhance the efficiency and organization of the prompt validation process.
The import statement in types.py has been updated to use the `typing` module instead of the deprecated `TYPE_CHECKING` constant. This change improves code maintainability and ensures compatibility with the latest Python standards.
The set_user_agent method in base.py was updated to use proper capitalization for the user agent value. Instead of "langflow", it now uses "Langflow". This change improves consistency and readability in the code.
Refactor langflow template field base.py to improve code readability and maintainability.
- Import additional types from langflow.helpers.custom and langflow.type_extraction.type_extraction modules.
- Add field_validator method to validate field_type.
- Convert type to string if it is a type instance.
- Raise ValueError if type is not a string or a type instance.
- CassandraVectorStoreComponent;
- CouchbaseVectorStoreComponent;
- FaissVectorStoreComponent;
- MongoVectorStoreComponent;
- PGVectorStoreComponent;
- PineconeVectorStoreComponent;
- QdrantVectorStoreComponent;
- SupabaseVectorStoreComponent;
- UpstashVectorStoreComponent;
- VectaraVectorStoreComponent;
- WeaviateVectorStoreComponent;
Fixes:
- set token of CassandraVectorStoreComponent as secret;
- set couchbase_password of CouchbaseVectorStoreComponent
as secret;
- set mongodb_atlas_cluster_uri of MongoVectorStoreCompon
ent as secret;
- set pg_server_url of PGVectorStoreComponent as secret;
- set pinecone_api_key of PineconeVectorStoreComponent as
secret;
- set api_key of QdrantVectorStoreComponent as secret;
- set supabase_service_key of SupabaseVectorStoreComponen
t as secret;
- set index_token of UpstashVectorStoreComponent as secre
t;
- set vectara_api_key of VectaraVectorStoreComponent as s
ecret;
- set api_key of WeaviateVectorStoreComponent as secret;
🔧 (pyproject.toml): update version to "1.0.0rc0" for the 'langflow' package
🔧 (pyproject.toml): update version to "0.0.73" for the 'langflow-base' package
🔧 (pyproject.toml): remove 'python-socketio' dependency and update other dependencies to specific versions
♻️ (service.py): Refactor variable declarations and type annotations for better code readability and maintainability
📝 (service.py): Update method signatures and type annotations for better clarity and consistency