Posts

Notes on AI APIs and AI apps

Last updated on 16 May 2025 Moved following note dated 26 Apr 2025 from another blog post: I am going through a short diversion about using AI API in React/Next.js apps. Related post(s) that I have put up: Notes on Apollo GraphQL OpenAI ChatGPT Connector, 24 April 2025 live stream video (event), https://raviswdev.blogspot.com/2025/04/notes-on-apollo-graphql-connector.html . Based on some thoughts I shared with a friend: Currently, my specific interest in AI is in how it can be used in education apps and also for answering queries on spirituality and religion. Further, my plan is to get into deeper exploration of usage of AI in education apps after I finish some React Native related goals which will also involve an education app, I have set for myself. Essentially, once I have an education app developed (which will be a portfolio app demonstrating my skills in full stack development on MERN stack), I plan to add some AI stuff to it, if that's available in free tier (like Google Gem...

Some observations and thoughts about using free tier Gemini AI API for text based interactions in React apps

Last updated on 7 May 2025 Over the past few days, I have spent some time developing and using two simple test React apps to check out text based interactions with free tier Gemini AI API. Based on that, given below are some observations and thoughts about using free tier Gemini AI API for text based interactions in React apps. Observations Integrating basic text query to and response from Gemini AI in a React app using free tier Gemini API for a known (hard-coded) model is easy. Listing available models using its current @google/genai library for JavaScript API does not seem to be supported as of now. However, a REST API is available to get the list of available models but the information about the models is rather limited.  For general questions, the Gemini API (without Grounding with Google Search ) answers (with gemini-2.0-flash as model) seem to be okay. This includes questions like "Give me a useEffect example in React" where the API answers with example code and detail...

Google Gemini (AI) API has free tier; Easily setup and ran tutorial article React app using API; Wrote 2nd Trial app with user choice for model

Last updated on 9 May 2025 Quick-Info Integrating basic query to and response from Gemini AI in a React app using free tier Gemini API is easy. Live site of 2nd version of related app I wrote with user choice for model: https://testgeminiapi.netlify.app/  . Public repo:  https://github.com/ravisiyer/testGeminiAPI  . Live site of 1st version of related app I created (based on below mentioned article):  https://geminiapitrial.netlify.app/  . Public repo:  https://github.com/ravisiyer/GeminiAPITrial  . The README.md file has screenshots . Related to app 1st version: Tried out this article's code and got it working on localhost: How to Integrate Gemini API with React.js: A Step-by-Step Guide., https://dev.to/tahrim_bilal/how-to-integrate-gemini-api-with-reactjs-a-step-by-step-guide-341b  . Had to run 'npm i react-scripts@latest' to get past digital envelope related errors on 'npm start'. Related to app 1st version: The app UI is quite decen...

Notes on Apollo GraphQL OpenAI ChatGPT Connector, 24 April 2025 live stream video (event)

Quick-Info Based on my viewing the video (event) and doing some browsing/reading up later, my summary view is as follows: Though advertised as "ChatGPT Connector—No Code Required", it is not exactly a 'no code' solution. It needs fair amount of declarative mapping code to transform ChatGPT REST API JSON response to JSON that frontend (React/Next.js etc.) needs. One has to learn how to use Apollo GraphQL Connector and related tools. One also has to learn ChatGPT REST API requests and responses. ChatGPT REST API does not seem to have free tier (unlike ChatGPT which has a free tier). So it seems that one has to pay money to use ChatGPT API even for sample programs. Note that even if Apollo GraphQL Connector is used, it invokes ChatGPT REST API and so has to pay money to ChatGPT API for that to work. If paid ChatGPT API usage is okay then going through Apollo GraphQL Connector may be easier than directly using ChatGPT REST API once one does the main declarative coding map...