Skip to content

Integration of chat llm behavior #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
May 13, 2025
Merged

Integration of chat llm behavior #112

merged 33 commits into from
May 13, 2025

Conversation

doumdi
Copy link
Member

@doumdi doumdi commented Apr 16, 2025

@mamaheux, @philippewarren,

I need your advice because chat behavior node is blocking after service call, does not receive "Talk Done".

Flow :

Transcript->Process LLM (stream call to OpenAI/ollama) -> Call tools -> Send Talk message -> Talk Done (Not received) -> Send Chat Done

When there is no tool called, it works.

[INFO] [1744814421.762334852] [chat_node]: Transcript received: volume de 10
[INFO] [1744814428.478169379] [chat_node]: Processing...
[INFO] [1744814431.747961959] [chat_node]: Calling external service: volume_up with arguments: {"amount":10}
[INFO] [1744814436.772234745] [chat_node]: Service call result: behavior_srvs.srv.ChatToolsFunctionCall_Response(ok=True, result='{"status": "Volume increased"}')
send_request_and_process_response done
send_request_and_process_response done
[INFO] [1744814437.194302523] [chat_node]: Processing done!
[INFO] [1744814437.196909401] [chat_node]: Sending talk message: Le volume a été augmenté de 10.

---> Waiting for Talk Done that never occurs...
send_request_and_process_response done is recursively called if there is a tool function (calling API twice to send the result).

I tried with a different thread to call the service with no success. I also used the MultiThreadedExecutor and called spin_until_future_complete, with same result. I tried different callback groups, same result.

Any idea ?

@doumdi doumdi added the bug Something isn't working label Apr 16, 2025
@doumdi doumdi self-assigned this Apr 16, 2025
@doumdi
Copy link
Member Author

doumdi commented Apr 25, 2025

@mamaheux @philippewarren Can you have a final look at this version? I would merge it to ros2 branch and continue improving it later in the summer.

Copy link
Collaborator

@philippewarren philippewarren left a comment

Choose a reason for hiding this comment

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

Some comments from the first review are still unadresses, they were hidden in the "Expand hidden conversation" thing

@philippewarren philippewarren self-requested a review May 1, 2025 18:11
@doumdi
Copy link
Member Author

doumdi commented May 13, 2025

@mamaheux Are you ok for merging ?

@mamaheux mamaheux merged commit dd5fd67 into ros2 May 13, 2025
@mamaheux mamaheux deleted the chat-llm branch May 13, 2025 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants