fix: remove use of ImagePromptTemplate in image handling and adds image utils (#4467)
* remove poetry.lock * fix: update langchain-core dependency version to 0.3.15 * feat: add functions to convert images to base64 and create data URLs * refactor: simplify image URL handling by replacing ImagePromptTemplate with create_data_url function * Fix image URL structure in data schema to use nested dictionary format * Add unit tests for Data schema message conversion with text and images * test: add unit tests for image utility functions to validate base64 conversion and data URL creation * Refactor image URL generation to use `create_data_url` utility function instead of `ImagePromptTemplate` * Add unit tests for message handling and image processing in schema module - Introduce fixtures for temporary cache directory and sample image creation. - Add tests for message creation from human and AI text. - Implement tests for messages with single and multiple images. - Include tests for invalid image paths and messages without sender. - Add message serialization and conversion tests. - Ensure cleanup of cache directory after tests. * Use platformdirs to determine cache directory paths in test_schema_message.py
This commit is contained in:
parent
7114cc4799
commit
98274633db
9 changed files with 889 additions and 12297 deletions
|
|
@ -111,7 +111,7 @@ dependencies = [
|
|||
"uvicorn>=0.30.0",
|
||||
"gunicorn>=22.0.0",
|
||||
"langchain~=0.3.3",
|
||||
"langchain-core~=0.3.10",
|
||||
"langchain-core~=0.3.15",
|
||||
"langchainhub~=0.1.15",
|
||||
"sqlmodel==0.0.18",
|
||||
"loguru>=0.7.1",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue