Skip to content
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

chat: update setup_assistant to use gpt-4o #1411

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

rmackay9
Copy link
Contributor

@rmackay9 rmackay9 commented Jun 24, 2024

This updates the setup_assistant.py script which is used to create assistants on the OpenAI server.

The changes include:

  • Assistant uses "gpt-4o" which is the latest model from OpenAI
  • the "code interpreter" tool is disabled. this was never required actually
  • mavlink xml files are converted to json before uploading. the assistant is not capable of parsing xml files it seems (see here) so the xml files were never actually being used.
  • uploaded files are added to a "vector store". This is because of an API change and was not required previously

This has been tested

stant_setup (chat-assistant-setup-4o)$ python setup_assistant.py --upgrade
Starting assistant setup
setup_assistant: parsed function file: get_vehicle_type.json
setup_assistant: parsed function file: get_parameter.json
setup_assistant: parsed function file: get_wakeup_timers.json
setup_assistant: parsed function file: get_vehicle_location_and_yaw.json
setup_assistant: parsed function file: send_mavlink_set_position_target_global_int.json
setup_assistant: parsed function file: get_vehicle_state.json
setup_assistant: parsed function file: get_location_plus_offset.json
setup_assistant: parsed function file: send_mavlink_command_int.json
setup_assistant: parsed function file: get_location_plus_dist_at_bearing.json
setup_assistant: parsed function file: get_parameter_description.json
setup_assistant: parsed function file: delete_wakeup_timers.json
setup_assistant: parsed function file: set_parameter.json
setup_assistant: parsed function file: get_mavlink_message.json
setup_assistant: parsed function file: get_current_datetime.json
setup_assistant: parsed function file: get_mode_mapping.json
setup_assistant: parsed function file: get_all_parameters.json
setup_assistant: parsed function file: set_wakeup_timer.json
setup_assistant: parsed function file: get_available_mavlink_messages.json
setup_assistant: downloaded file: minimal.xml
setup_assistant: downloaded file: common.xml
setup_assistant: downloaded file: ardupilotmega.xml
setup_assistant: using existing assistant: ArduPilot Vehicle Control via MAVLink id:asst_hDdE8oKgzdoWJMpfc4dQVvp1
setup_assistant: deleted existing file: rover_modes.txt
setup_assistant: uploaded: rover_modes.txt
setup_assistant: deleted existing file: plane_flightmodes.txt
setup_assistant: uploaded: plane_flightmodes.txt
setup_assistant: deleted existing file: copter_flightmodes.txt
setup_assistant: uploaded: copter_flightmodes.txt
setup_assistant: deleted existing file: assistant_instructions.txt
setup_assistant: uploaded: assistant_instructions.txt
setup_assistant: deleted existing file: sub_modes.txt
setup_assistant: uploaded: sub_modes.txt
setup_assistant: deleted existing file: minimal.xml.json
setup_assistant: uploaded: minimal.xml.json
setup_assistant: deleted existing file: common.xml.json
setup_assistant: uploaded: common.xml.json
setup_assistant: deleted existing file: ardupilotmega.xml.json
setup_assistant: uploaded: ardupilotmega.xml.json
deleting empty vector store id:vs_Cp3XgCX4e2uHvn1VPggcrHtX name:ArduPilot Vehicle Control via MAVLink vector_store
setup_assistant: created vector store id: vs_kBrThD2IjlQeDu0aZvccbpG1 name:ArduPilot Vehicle Control via MAVLink vector_store files:8
setup_assistant: updating assistant vector store to id:vs_kBrThD2IjlQeDu0aZvccbpG1 name:ArduPilot Vehicle Control via MAVLink vector_store
setup_assistant: deleted local file: minimal.xml
setup_assistant: deleted local file: common.xml
setup_assistant: deleted local file: ardupilotmega.xml
setup_assistant: deleted local file: minimal.xml.json
setup_assistant: deleted local file: common.xml.json
setup_assistant: deleted local file: ardupilotmega.xml.json
Assistant setup complete

@rmackay9 rmackay9 force-pushed the chat-assistant-setup-4o branch 3 times, most recently from 1cc5fde to ca7fb7f Compare June 24, 2024 13:17
remove unused code interpreter tool
update file retrieval method
@rmackay9
Copy link
Contributor Author

Finally passing the python cleanliness tests.. :-)

@tridge tridge merged commit 04d71de into ArduPilot:master Jun 26, 2024
2 checks passed
@rmackay9 rmackay9 deleted the chat-assistant-setup-4o branch June 26, 2024 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants