toshiakit / matgpt Goto Github PK
View Code? Open in Web Editor NEWMATLAB app to access ChatGPT API from OpenAI
License: MIT License
MATLAB app to access ChatGPT API from OpenAI
License: MIT License
When we use it in China, it will return "The reason is "Connection timeout after 10122 ms". Perhaps the server is not responding or HTTPOptions.ConnectTimeout needs to be set to a higher value".
So how can we solve it?
How to fix this error
"The "your" value in an AuthInfo is an encoded token that must not appear for the "Digest" scheme and must not be followed by additional parameters"
Hi,
I'm exploring MatGPT's integration capabilities with LLMs and am interested in extending its utility to custom models, particularly those deployed locally.
In Python projects, customizing the base_url, as seen in openai-python issue #913, is a straightforward approach to support custom API endpoints.
Although I'm not familiar with the specific construction of MatGPT, could a similar method be applied here to enable the use of in-house or custom LLMs via user-defined API endpoints? Your insights or guidance on this possibility would be greatly appreciated.
MATLAB error message:
Error using ==
Arrays have incompatible sizes for this operation.
Error in TextHelper.replaceTableMarkdown (line 133)
rowIdx = numCols == numCols(headerRowIdx);
Error in MatGPT/addChatLog (line 95)
htmlContent = TextHelper.replaceTableMarkdown(content);
Error in MatGPT/send (line 260)
addChatLog(app,m(end).role,m(end).content);
Error in appdesigner.internal.service.AppManagementService/executeCallback (line 172)
callback(appOrUserComponent, event);
Error in matlab.apps.AppBase>@(source,event)executeCallback(ams,app,callback,requiresEventData,event) (line 62)
newCallback = @(source, event)executeCallback(ams, ...
Related documentation
133 rowIdx = numCols == numCols(headerRowIdx);
The prompt I had used in MatGPT was
Please write a function that checks a table. The function input is a table and this table must have 20 rows and 7 columns. There must be exactly 5 rows where the first three columns all have the value 0. For row number irow where the entries for column 1,2 and 3 are all 0, the value of the fifth column should be equal to scheme.DELTA where scheme = bv2scheme(bv(irow),'SIGNA Premier'). The sixth column should be equal to scheme,delta. The array bv is bv = [90, 500, 1500, 2000, 3000]
In the debugger, at line 133 of TextHelper.m, headerRowIdx
was empty. I noted that splittedStr
contained what looked like a correct response from GPT with perhaps a missing "|" symbol (for OR) where it checks the table size.
K>> splittedStr
splittedStr =
55×1 cell array
{["Sure, here's a function that should do what you're asking for:" ]}
{["" ]}
{["```matlab" ]}
{["function checkTable(tableData)" ]}
{["% CHECKTABLE Check that a table meets certain requirements" ]}
{["% CHECKTABLE(tableData) checks that the input table meets the following requirements:" ]}
{["% - The table has 20 rows and 7 columns" ]}
{["% - There are exactly 5 rows where the first three columns all have the value 0" ]}
{["% - For each of these 5 rows, the value in the fifth column is equal to scheme.DELTA" ]}
{["% where scheme = bv2scheme(bv(irow),'SIGNA Premier')" ]}
{["% - For each of these 5 rows, the value in the sixth column is equal to scheme,delta" ]}
{["%" ]}
{["% Inputs:" ]}
{["% tableData - the table to check (MATLAB table)" ]}
{["" ]}
{["% Define the array of bv values" ]}
{["bv = [90, 500, 1500, 2000, 3000];" ]}
{["" ]}
{["% Check that the table has the correct size" ]}
{["if size(tableData, 1) ~= 20" "" "size(tableData, 2) ~= 7" ]}
{["error('Input table must have 20 rows and 7 columns');" ]}
{["end" ]}
{["" ]}
{["% Find the rows where the first three columns are all 0" ]}
{["zeroRows = find(tableData{:, 1} == 0 & tableData{:, 2} == 0 & tableData{:, 3} == 0);" ]}
{["" ]}
{["% Check that there are exactly 5 such rows" ]}
{["if length(zeroRows) ~= 5" ]}
{["error('Input table must have exactly 5 rows where the first three columns are all 0');" ]}
{["end" ]}
{["" ]}
{["% Loop over the zero rows and check the fifth and sixth columns" ]}
{["for i = 1:length(zeroRows)" ]}
{["irow = zeroRows(i);" ]}
{["scheme = bv2scheme(bv(irow), 'SIGNA Premier');" ]}
{["if tableData{irow, 5} ~= scheme.DELTA" ]}
{["error('Value in fifth column of row %d is incorrect', irow);" ]}
{["end" ]}
{["if ~strcmp(tableData{irow, 6}, sprintf('%s,%s', scheme, delta))" ]}
{["error('Value in sixth column of row %d is incorrect', irow);" ]}
{["end" ]}
{["end" ]}
{["" ]}
{["% If we get here, the table meets all requirements" ]}
{["disp('Table meets all requirements');" ]}
{["end" ]}
{["```" ]}
{["" ]}
{["You can call this function with your table as the input, like this:" ]}
{["" ]}
{["```matlab" ]}
{["checkTable(myTable);" ]}
{["```" ]}
{["" ]}
{["This will check that the input table meets the requirements you specified. If the table does not meet the requirements, an error will be thrown with a message indicating what went wrong. If the table meets all requirements, a message will be displayed indicating that the table meets all requirements."]}
K>>
Is it possible to use an Azure OpenAI API key for this app, instead of a regular OpenAI API key ?
I'd like to see the suggestions for follow up questions to appear as selectable ui components
I have multiple chats in the MatGPT app and I want to rename them one by one. I right click on the one in the top of the list and select "Rename" and rename it. That works. Then I want to rename the second one from the top. I try and it points me to the first chat. I can't find a way to rename the second chat. Is this a reproducible issue?
Can you implement a function to get the list of available models from OpenAI (or other providers in the future)?
I have an API URL with the same format as OpenAI's, and it's deployed locally. Due to confidentiality requirements, I don't want to use the OpenAI service. How can I redirect requests that would go to api.openai.com to my own local API URL instead?
I want something like the ChatGPT Plus Code Interpreter (now called Advanced Data Analysis)
MatGPT is a great work! We can get useful replies from LLM. I want to know:
How to streamingly receive replies from a large model using Matlab?
Thank you!
Hi,
I am using three different openAI accounts, which all have API credit, however MatGPT is responding "Insufficient_quota" from two days ago for all the accounts.
I would be greatly appreciate it if you can help me through this.
Regards,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.