jarvisChatSGLib

by Robin Schregle & Tim Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Artificial Intelligence
Introduced first in SolidGeometry 5.5, Creation date: 2024-11-04, Last change: 2025-08-17

this fnct/script is a ChatGPT based control of the SGLib and defines the development start of SGLib 5.5

Description

At the end of October 2024, Tim Lueth encouraged his team to work with the Matlab/ChatGPT API interface, and Felix Pancheri and Robin Schregle started to use it. Robin Schregle implemented a first version called SGlib_Function_Calling_OpenAI. This function jarvisChatSGLib is an improved version of SGlib_Function_Calling_OpenAI to achieve similar results to the already existing SGLib function jarvis from January 2022, which was programmed by Tim Lueth on the recommendation of Franz Irlinger.The original function "jarvis" was based on the use von Apple's Siri and the SGLib's parser "siri2jarvis"
1) Download from Gitgub (see link below) the Large Language Model (LMM) functions of Matlab and store the files in a folder in your Matlab code directory using the
folder name [pwd filesep 'llms-with-matlab']
2) add this path to your main directory using
addpath([pwd filesep 'llms-with-matlab'])
3) create an API account at openAI
you have to start an account store your credit card info (see link below)
4) create an environment ascii file with name "OPENAI_API_KEY.env" that contains a single line
OPENAI_API_KEY=""
5) load this environmentfile by
loadenv("OPENAI_API_KEY.env")
6) set the model to
modelName = "gpt-4o";


See Also: chat , jarvis , OpenAIcostAPI

Example Illustration

 missing image of jarvisChatSGLib

Syntax

jarvisChatSGLib

Examples


jarvisChatSGLib

Additional Hyperlinks

,



Copyright 2024-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Last html export of this page out of FM database by TL: 2025-09-21