Gabriel Luiz Freitas Almeida
ce955a82fe
🔨 refactor(store.py): change parameter name from 'component' to 'component_create' for clarity and consistency
...
🔨 refactor(store.py): change type annotation of 'component' parameter from 'Flow' to 'FlowCreate' to match the expected type
2023-10-19 16:34:19 -03:00
Gabriel Luiz Freitas Almeida
2a25865340
🐛 fix(flow.py): make 'is_component' field nullable to allow for optional values
2023-10-19 16:05:54 -03:00
anovazzi1
9c6930bd0f
Merge remote-tracking branch 'origin/dev' into saveComponent
2023-10-19 15:17:12 -03:00
Gabriel Luiz Freitas Almeida
b19c75dc3c
🐛 fix(api_key.py): rename api_key parameter to api_key_request in save_store_api_key function for clarity and consistency
2023-10-19 14:28:48 -03:00
Gabriel Luiz Freitas Almeida
c5262f39f2
🔒 refactor(api_key.py): update encrypt_api_key function call to pass settings_service as a keyword argument for clarity and maintainability
2023-10-19 14:08:51 -03:00
Gabriel Luiz Freitas Almeida
68e5cb4cce
Merge remote-tracking branch 'origin/main' into dev
2023-10-19 11:04:09 -03:00
Gabriel Luiz Freitas Almeida
f080c75d6a
🐛 fix(utils.py): add padding to SECRET_KEY before initializing Fernet to ensure it has the correct length
2023-10-19 10:57:52 -03:00
Gabriel Luiz Freitas Almeida
0286353695
🐛 fix(base.py): include vertex ID in error message to provide more context when building a node fails
2023-10-19 09:25:53 -03:00
Gabriel Luiz Freitas Almeida
d66944ae7e
🔧 chore(alembic): add store updates migration script
...
🔧 chore(alembic): add user id can be null in flow migration script
🔧 chore(flow.py): make is_component field nullable in Flow model
🔧 chore(flow.py): make user_id field nullable in Flow model
🔧 chore(service.py): add schema health check after running migrations and handle autogenerate diffs detected case
2023-10-18 23:23:10 -03:00
Gabriel Luiz Freitas Almeida
08bd16b8f2
🔧 chore(OpenAIConversationalAgent.py): enable handling of parsing errors in ConversationalAgent class
2023-10-18 22:14:14 -03:00
anovazzi1
8cc955c147
code format
2023-10-18 20:10:51 -03:00
Gabriel Luiz Freitas Almeida
a497eebab1
🔧 fix(__main__.py): set "no_proxy" environment variable to "*" to avoid error with gunicorn in macos
2023-10-18 19:57:28 -03:00
Gabriel Luiz Freitas Almeida
a65086c8e4
🐛 fix(alembic): add exception handling to prevent migration failure if columns already exist
2023-10-18 18:30:10 -03:00
anovazzi1
92a109b65c
Merge remote-tracking branch 'origin/dev' into saveComponent
2023-10-18 18:23:34 -03:00
Gabriel Luiz Freitas Almeida
52900503de
🔧 chore(alembic): make changes for the store
...
🔧 chore(api_key.py): remove unused imports and update save_store_api_key endpoint to use ApiKeyCreateRequest model
🔧 chore(schemas.py): add ApiKeyCreateRequest model
🔧 chore(store.py): remove unused imports and update imports in store.py
2023-10-18 18:09:24 -03:00
Gabriel Luiz Freitas Almeida
986f7202d2
🔧 chore(api_key.py): remove unused import 'httpx.get' to improve code cleanliness and reduce potential confusion
...
🐛 fix(api_key.py): fix import statement for 'get_current_active_user' function in 'auth_utils' module to resolve import error
2023-10-18 17:47:32 -03:00
Gabriel Luiz Freitas Almeida
f3c9e20bcc
🔧 refactor(store.py): remove unnecessary import and type hinting for StoreService
...
🔧 refactor(store.py): remove unnecessary type hinting for StoreService in create_component function signature
2023-10-18 17:46:56 -03:00
Gabriel Luiz Freitas Almeida
c30bb79d64
🐛 fix(deps.py): fix typo in get_store_service function to return the correct service type
2023-10-18 17:46:38 -03:00
Gabriel Luiz Freitas Almeida
215bc0d079
🔄 refactor(schema.py): rename MARKETPLACE_SERVICE enum value to STORE_SERVICE for consistency and clarity
2023-10-18 17:46:13 -03:00
Gabriel Luiz Freitas Almeida
67dddd7d75
🔧 fix(base.py): rename MARKETPLACE_URL to STORE_URL for better clarity and consistency in settings
...
🔧 fix(service.py): update reference to MARKETPLACE_URL to STORE_URL in StoreService class to reflect the change in settings
2023-10-18 17:44:57 -03:00
Gabriel Luiz Freitas Almeida
0fadad6f7d
🔧 fix(utils.py): import and add store_factory to the list of factories and dependencies
2023-10-18 17:16:42 -03:00
Gabriel Luiz Freitas Almeida
596fc8ed41
🔧 fix(api_key.py): import missing dependencies and fix import paths for auth_utils and get_current_active_user
...
✨ feat(api_key.py): add new route to save store API key for a user
2023-10-18 17:03:53 -03:00
Gabriel Luiz Freitas Almeida
878e158ac8
🔧 chore(alembic): add migration script for changes related to the store
...
🔧 chore(flow.py): add new field 'is_component' to the Flow model to support store functionality
🔧 chore(user.py): add new field 'store_api_key' to the User model to support store functionality
2023-10-18 17:03:15 -03:00
Gabriel Luiz Freitas Almeida
eded928bf4
🔄 refactor(router.py): rename component_router to store_router for better clarity and consistency
...
🔄 refactor(__init__.py): update import statements and references to component_router to store_router for consistency with the renamed router
2023-10-18 17:03:00 -03:00
Gabriel Luiz Freitas Almeida
6e6e514837
🔒 chore(utils.py): add encryption and decryption functions for API key using Fernet encryption algorithm
2023-10-18 17:02:03 -03:00
Gabriel Luiz Freitas Almeida
4d7b66a4e2
🔥 refactor(components.py): remove unused code and endpoints related to components
...
✨ feat(store.py): add new endpoints for creating, reading, and listing components in the store
2023-10-18 17:01:54 -03:00
Gabriel Luiz Freitas Almeida
3e5eb62c5c
🔄 refactor(deps.py): rename MarketplaceService to StoreService for better naming consistency and clarity
...
🔄 refactor(schema.py): rename `MARKETPLACE_SERVICE` enum value to `STORE_SERVICE` to match the renamed service
2023-10-18 16:24:05 -03:00
Gabriel Luiz Freitas Almeida
c5ef201755
✨ feat(store): add store service to integrate langflow with the store
...
This commit adds the necessary files to implement the store service in langflow. The store service allows searching, getting, posting, and downloading components from the store. The store service is integrated with a Directus instance.
The following files were added:
- `src/backend/langflow/services/store/__init__.py`: Initializes the store service.
- `src/backend/langflow/services/store/factory.py`: Implements the store service factory.
- `src/backend/langflow/services/store/schema.py`: Defines the schema for the component response.
- `src/backend/langflow/services/store/service.py`: Implements the store service, including methods for searching, listing components, downloading, and uploading components.
The store service requires the `SettingsService` to be passed during initialization. The base URL and components URL are retrieved from the `MARKETPLACE_URL` setting.
The store service provides the following methods:
- `search`: Searches for components in the store based on various parameters.
- `list_components`: Lists components from the store.
- `download`: Downloads a specific component from the store.
- `upload`: Uploads a new component to the store.
The store service uses the `httpx` library to perform HTTP requests to the store API. The `_get` method is a utility method to perform GET requests with optional API key and parameters.
The `ComponentResponse` schema defines the structure of the component response from the store. It includes various properties such as name, description, id, status, sort, user_created, date_created, user_updated, date_updated, is_component, likes, tags, data, and documentation.
The `get_api_key` method is not implemented and will be completed in a future commit.
2023-10-18 16:22:24 -03:00
Gabriel Luiz Freitas Almeida
2653bbc70e
First draft of MarketplaceService
2023-10-18 09:18:16 -03:00
Gabriel Luiz Freitas Almeida
c50d1344ca
rename getters to deps
2023-10-18 09:18:16 -03:00
Gabriel Luiz Freitas Almeida
de238bf5db
Rename manager to service
2023-10-18 09:18:15 -03:00
Gabriel Luiz Freitas Almeida
b8905dec6d
🔧 chore(Vectara.py): change single quotes to double quotes for consistency in source parameter value
2023-10-17 10:15:54 -03:00
Gabriel Luiz Freitas Almeida
275e10daf6
🐛 fix(base.py): make description field optional to allow for cases where no description is provided
2023-10-17 10:15:32 -03:00
Gabriel Luiz Freitas Almeida
9b36e64c57
🐛 fix(BaiduQianfanChatEndpoints.py): add type ignore comments to fix type errors
...
🐛 fix(BaiduQianfanLLMEndpoints.py): add type ignore comments to fix type errors
2023-10-17 10:13:49 -03:00
Gabriel Luiz Freitas Almeida
e2cf4f0234
support baidu qianfan endpoint for LLM ( #1045 )
2023-10-17 09:56:58 -03:00
hekai09
851da1cb4e
support baidu qianfan endpoint for LLM
2023-10-17 15:22:00 +08:00
Ofer Mendelevitch
7fbb1078da
update of Vectara component
2023-10-14 03:03:30 -07:00
Gabriel Luiz Freitas Almeida
7bdf564170
🔧 chore(constants.py): clean up import statements and remove unnecessary whitespace to improve code readability
...
🐛 fix(custom_component.py): set the type of argument to "Data" if it is not specified to ensure consistency and prevent errors
2023-10-12 19:23:45 -03:00
Gabriel Luiz Freitas Almeida
4366b02c4f
🔀 chore(field_typing): reorganize imports and update __all__ list for better readability and maintainability
...
🔥 chore(field_typing): remove unused base.py file as it is no longer needed
🔀 chore(constants): update import statements and add type aliases for better readability and maintainability
2023-10-12 19:23:13 -03:00
Gabriel Luiz Freitas Almeida
dad8480ce3
🔨 refactor(HuggingFaceEndpoints.py): update import statement for HuggingFaceEndpoint class to match new file structure
...
🔧 chore(HuggingFaceEndpoints.py): remove unused import statement for langchain.llms.base module
🔧 chore(HuggingFaceEndpoints.py): remove unused "type" field from task parameter in build method signature
🔧 chore(HuggingFaceEndpoints.py): add default value for task parameter in build method signature
🔧 chore(HuggingFaceEndpoints.py): add default values for huggingfacehub_api_token and model_kwargs parameters in build method signature
🐛 fix(HuggingFaceEndpoints.py): add model_kwargs parameter to HuggingFaceEndpoint constructor to fix missing argument error
2023-10-12 19:22:41 -03:00
Gabriel Luiz Freitas Almeida
964b4ec7f2
🐛 fix(base.py): improve code readability by formatting the CreateTrace function call in multiple lines
2023-10-12 16:29:48 -03:00
Gabriel Luiz Freitas Almeida
6abd5d5343
🐛 fix(base.py): handle cases where value is not a valid int or float to prevent ValueError and assign the original value instead
2023-10-12 16:29:30 -03:00
Gabriel Luiz Freitas Almeida
8f20105b4b
🔧 fix(custom_component.py): fix import statement for CUSTOM_COMPONENT_SUPPORTED_TYPES
...
🔧 fix(custom_component.py): fix argument type in return statement of CustomComponent.get_args()
🔧 fix(custom_components.py): make description attribute optional in CustomComponentFrontendNode class
2023-10-11 18:33:13 -03:00
Gabriel Luiz Freitas Almeida
846a15f9fd
🐛 fix(base.py): convert "int" and "float" type values to their respective types for better data consistency and type safety
2023-10-11 18:32:56 -03:00
Gabriel Luiz Freitas Almeida
440298861c
🔄 refactor(types.py): update import statement for CUSTOM_COMPONENT_SUPPORTED_TYPES to match new location in field_typing module
2023-10-11 18:32:19 -03:00
Gabriel Luiz Freitas Almeida
df66ae848e
🔀 chore(field_typing): add support for additional types in field_typing/__init__.py
...
🔀 chore(field_typing): add support for Data type in field_typing/base.py
🔀 chore(field_typing): add constants.py file to define supported types in field_typing
🔀 chore(interface/custom): remove duplicate imports and use field_typing types
🔀 chore(utils): fix syntax error in get_base_classes function
2023-10-11 18:31:05 -03:00
Gabriel Luiz Freitas Almeida
b2205bba8a
🐛 fix(types.py): add output types to the frontend node to improve data integrity and error handling
...
✨ feat(types.py): add support for adding output types to the frontend node to ensure valid return types and improve error handling
2023-10-11 17:33:32 -03:00
Guangya Liu
7c9f649f01
added trace name
2023-10-11 14:21:41 -04:00
Gabriel Luiz Freitas Almeida
7ffe366fb8
🐛 fix(manager.py): fix incorrect check for alembic initialization and add proper error handling
...
✨ feat(manager.py): add support for initializing alembic if not already initialized before running migrations
2023-10-10 15:01:48 -03:00
Gabriel Luiz Freitas Almeida
9697e06ec9
🐛 fix(change_columns_to_be_nullable.py): add exception handling and rollback in case of SQLAlchemyError to prevent data loss during migration
2023-10-10 15:00:13 -03:00