Skip to content

The repository helps people build a fine-tuned GPT-3.5 model for MicroPython. This fine-tuned model can generate more accurate Python commands for the LEGO PyBoard to utilize specialized robotics APIs and functions.

Notifications You must be signed in to change notification settings

qkfang/spike-prime-py-finetune

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build and Integrate Fine-tune GPT-3.5 Model for MicroPython

This repository provides a step-by-step guide to build and fine-tune a GPT-3.5 model for MicroPython. The fine-tuned model is designed to generate precise Python commands tailored for LEGO PyBoard to effectively utilize specialized robotics APIs and functions. Furthermore, it demonstrates how to integrate Azure OpenAI into the command-line workflow to seamlessly send commands to the robot.


Overview

By following the steps in this repository, you will be able to:

  1. Fine-tune GPT-3.5 for your custom needs, optimizing it to generate MicroPython code for robotics tasks.
  2. Generate precise commands with the fine-tuned model that can work with the LEGO PyBoard and other MicroPython-based systems.
  3. Integrate with Azure OpenAI to send code and commands directly to the robot via Python's command line interface.

This solution enables developers and hobbyists to leverage the power of AI-generated code specifically tailored for robotic applications.


Features

  • Fine-tune GPT-3.5 for MicroPython: Adapt the model to handle specific robotics-related functions and APIs.
  • Python command-line integration: Use Azure OpenAI’s API to interact with the fine-tuned model.
  • LEGO PyBoard integration: Effortlessly control the robot by generating and executing accurate Python commands in real-time.
  • Seamless API calls to Azure OpenAI: Communicate with the fine-tuned model directly through Python scripts.

Example Prompts

Below are some example prompts to test your fine-tuned model:

  • “Move the robot forward by 10 units.”
  • “Turn the robot left by 45 degrees.”
  • “Use the ultrasonic sensor to detect obstacles and stop.”

Troubleshooting

  • Authentication issues: Ensure your API keys are correctly set in the .env file.
  • Command errors: Verify that the generated commands align with the PyBoard's API functions.
  • Connection issues: Check the MicroPython installation and drivers for the LEGO PyBoard.

Contributing

We welcome contributions! Feel free to submit issues or pull requests to improve the project.


License

This project is licensed under the MIT License – see the LICENSE file for details.


About

The repository helps people build a fine-tuned GPT-3.5 model for MicroPython. This fine-tuned model can generate more accurate Python commands for the LEGO PyBoard to utilize specialized robotics APIs and functions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages