|
llm_model package from ros-llm repollm_bringup llm_config llm_input llm_interfaces llm_model llm_output llm_robot |
Package Summary
| Tags | No category tags. |
| Version | 0.0.1 |
| License | Apache-2.0 |
| Build type | AMENT_PYTHON |
| Use | RECOMMENDED |
Repository Summary
| Description | ROS-LLM is a framework designed for embodied intelligence applications in ROS. It allows natural language interactions and leverages Large Language Models (LLMs) for decision-making and robot control. With an easy configuration process, this framework allows for swift integration, enabling your robot to operate with it in as little as ten minutes. |
| Checkout URI | https://github.com/auromix/ros-llm.git |
| VCS Type | git |
| VCS Version | ros2-humble |
| Last Updated | 2023-07-10 |
| Dev Status | UNMAINTAINED |
| CI status | No Continuous Integration |
| Released | UNRELEASED |
| Tags | ros gpt llm embodied-intelligence |
| Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- hermanye
Authors
llm_model
Package Description
The llm_model package is a ROS package that provides a conversational interface using the OpenAI API. The package includes a node called ChatGPTNode which interacts with the ChatGPT service to implement conversational interactions.
chatgpt.py
This file contains the implementation of the ChatGPTNode node, which is responsible for providing a conversational interface using the OpenAI API. The node implements the ChatGPT service callback function llm_callback, which is called whenever a client sends a request to the ChatGPT service.
The ChatGPTNode node also includes a client function function_call_client and a publisher output_publisher. The function_call_client function is used to call other functions using ROS Service, while the output_publisher publishes messages to a topic.
The chatgpt.py file also includes a function called add_message_to_history to update chat history records. The file writes chat history records to a JSON file using Python’s JSON library.
Overall, the chatgpt.py file provides a ROS-based conversational interface with the OpenAI API, allowing users to interact with a chatbot.
Usage
To test the turtle_robot.py file with robot node, use the following ROS command-line to publish a speed command that makes the turtlesim rotate:
ros2 service call /ChatGPT_service llm_interfaces/srv/ChatGPT '{request_text: "Let the turtlesim rotate counterclockwise at a great angular velocity of 50 rad/s and move forward at a certain linear velocity"}'
Reset the turtlesim
ros2 service call /ChatGPT_service llm_interfaces/srv/ChatGPT '{request_text: "I want the little turtle to go back to where it started."}'