Skip to content

Conversation

CharlieJCJ
Copy link
Collaborator

@CharlieJCJ CharlieJCJ commented Mar 24, 2024

Context: Parser is used to convert model response str -> OpenAI compatible function_call

  • Corrected edge cases with new keyword
  • Corrected [Class.]method optionally include Class in method.
  • Add recursive logic in traverse_node java parser, to special handle strings
  • Corrected initialization with ArrayList, Array keywords formatting.
  • Additional comments, example usage and expected outputs included.

Example: PmsProductServiceImpl.updateNewStatus(ids=new ArrayList<Long>(Arrays.asList(101L, 202L, 303L)), newStatus=2) -> {'function': {'name': 'PmsProductServiceImpl.updateNewStatus', 'parameters': {'ids': 'new ArrayList<Long>(Arrays.asList(101L, 202L, 303L))', 'newStatus': '2'}}}

Copy link
Owner

@ShishirPatil ShishirPatil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ShishirPatil ShishirPatil merged commit c1b67ee into ShishirPatil:main Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants