tomasonjo / clinical-agent

This project is designed for a simple LLM agent with tools on a clinical knowledge graph in Neo4j.
Apache License 2.0
15 stars 6 forks source link

Fix LangChain deprecation warning #2

Closed donbcolab closed 1 month ago

donbcolab commented 1 month ago

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

  1. Run the clinical agent with the updated code.
  2. Verify that no deprecation warnings related to format_tool_to_openai_function are displayed.
  3. Ensure that all existing functionality continues to work as expected, particularly the interaction between Neo4j tools and OpenAI functions.

Additional Notes

tomasonjo commented 1 month ago

Thanks