I'm building a tool to put all my job listings base, and have OpenAI API prioritize them (aka 'which jobs should I apply first based on my experience and tech stack).
in my database, I created a few sample jobs - columns are #Job ID, TItle, Company, Description, Location, Posting URL, Date Found
In my app I inserted a table, and linked the table to the database
I turned on Retool AI > OpenAI API by entering my OpenAI API credential
I go back to my app and Code > add query > resource Retool AI > action (by default: generate text) > model: I choose gpt-4-turbo (by default was gpt-4)
=> Input: How many jobs is there in {{ table1 }}? (just to test if it works)
I get this => * data:"Hello! It seems like the content you've posted is a string of encoded text, or you might be trying to convey something specific but it's unclear from the format provided. Could you please provide more context or clarify your request? I'm here to help!"
metadata:{} 4 keys
success:true
streaming:true
vectorsContext: 0 items
totalTokens:12744
I try again, I get the same issue:
data:"Hello! It seems like you've pasted a long string of encrypted or encoded text. How can I assist you with it?"
Thanks. I'm completely lost here though... when I enter {{ table1.data }} I get empty arrays it seems.
And still the 'Apologies, but it seems that you've entered a string of random characters. Could you rephrase or provide more context so I can assist you better?'
*actually not empty arrays, Retool seems to be able to read each 4 of my jobs listed, but somehow Retool AI through the GPT4 API doesn't seem able to interpret them... is it a formatting issue?
If the OpenAPI method doesn't work in Retool (unless anyone made it work successfully, please advise), is it possible to bypass it and use the JS method?
By going to > Queries > create a new JavaScript query
const myExperience = "Here's my work experience";
const jobDescriptions = table1.data.map(job => `${job.title} at ${job.company}: ${job.description}`).join(", ");
const prompt = `Given my experience: ${myExperience}, which of these jobs should I apply to first? ${jobDescriptions}`;
return prompt;
By using the JS Query Result as Input for Retool AI:
After creating the JavaScript query, name it preparePrompt, and use the result of this query as the input for the Retool AI query
In the Retool AI query input, referencing the result like {{ preparePrompt.value }}.
Thanks, it still works I mean the data is being read, but I'm still getting:
"It seems you've inputted a block of text consisting of random characters, symbols, and potential encodings that I'm unable to process directly. If you have any specific questions or need information regarding this text, or if it represents data you need help with, please provide more context or clarify how I can assist you"
It sounds like Retool AI is experimental at this point and doesn't work yet properly with OpenAI API.
I will look for an alternative and come back in a few weeks/months.