Skip to content

[BUG] AiServices with tool execution supports response as message or tool execution, but not both #1402

Closed
@SteveMartinBIL

Description

@SteveMartinBIL

Hello there

I am implementing LangChain4J in a Spring boot java project, with AI Services.
It's working pretty well, but I have a case where the model answer a text message like "Please wait I am retrieving some information for you" and ask for a tool execution. In this case, le tool execution is ignored (cf

)

Describe the bug
For me, it should execute the function first, or give the possibility to have the choice.

To Reproduce
Create an AI Service with tool execution and ask for something like "retrieve my todo list"

Expected behavior
The function should be executed instead of returning the text message from the model.

Please complete the following information:

  • LangChain4j version: 0.31.0
  • LLM(s) used: Azure OpenAI gpt-4o
  • Java version: 17
  • Spring Boot version (if applicable): 3.1.11

Thank you for your work, this lib is great :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    AzurebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions