Update to convert_to_openai_function to fix LangChain deprecation
Change Description
This pull request updates the usage of format_tool_to_openai_function to convert_to_openai_function in the api/packages/neo4j-clinical-layer/neo4j_clinical_layer/agent.py file.
Reason for Change
The format_tool_to_openai_function was deprecated in LangChain 0.1.16 and will be removed in version 1.0. This update ensures compatibility with future LangChain versions and removes deprecation warnings.
Impact
This change should not affect the functionality of the clinical agent but will remove deprecation warnings and ensure future compatibility.
Testing Steps
Run the clinical agent with the updated code.
Verify that no deprecation warnings related to format_tool_to_openai_function are displayed.
Ensure that all existing functionality continues to work as expected, particularly the interaction between Neo4j tools and OpenAI functions.
Additional Notes
This change requires LangChain version 0.1.16 or higher.
No changes to dependencies are required as convert_to_openai_function is part of the core LangChain library.
Update to convert_to_openai_function to fix LangChain deprecation
Change Description
This pull request updates the usage of
format_tool_to_openai_function
toconvert_to_openai_function
in theapi/packages/neo4j-clinical-layer/neo4j_clinical_layer/agent.py
file.Reason for Change
The
format_tool_to_openai_function
was deprecated in LangChain 0.1.16 and will be removed in version 1.0. This update ensures compatibility with future LangChain versions and removes deprecation warnings.Impact
This change should not affect the functionality of the clinical agent but will remove deprecation warnings and ensure future compatibility.
Testing Steps
format_tool_to_openai_function
are displayed.Additional Notes
convert_to_openai_function
is part of the core LangChain library.