Skip to content

robbobfrh84/palm-ai-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏝️ palm-ai-app 🎨

An application built using the PaLM API, the App is a fun color generator game that associates "Things" with "colors" by utilizing a trained AI Large Language Model to generate responses.

Live Links 🎙️
Where Code is Hosted 🍦

🏗️ Development 🏗️

Setting Up & Adding Dependancies:
  • cd server
  • npm install
Running the Back End Locally:
  • cd server
  • npm start, Or: npm run dev for hot reload.
Running the Front End Locally:
  • cd client
  • Open index.html
  • If you're using VS Code you can install "Live Server" extention and click "Go Live" on the bottom nav bar in VS Code to hot reload your front end.

NOTE: the default API url is http://localhost:8080/. If you'd like to use the production API url, add #prod to your client url.

  • For example: http://127.0.0.1:5500/#prod

🚀 Deployment 🚀

This project uses Google App Engine. I wrote this blog post about setting that up. Also, see this blog post if you're having issues with the gcloud command not being found. Once that's set up all you'll need to do is run these commands to deploy.

NOTE: To get your API URL run the following command to open the URL in the browser.

  • gcloud app browse
Deploying Front End

This app is setup to deploy from the client subfolder. And, the branch gh-pages was made to handle that. So pushing to the main branch will not deploy changes to the front end. You'll need to run this command to do that. Which will trigger Github's actions to update your code and deploy the changes.

Deploying Back End API
  • cd server

  • gcloud app deploy

  • Then, you can run gcloud app browse to open the root url in a browser window.

  • And, you can even watch the live logs with gcloud app logs tail -s default


🥽 Tests 🧪

Client: app.js configs

To generate Hard Coded Results to add to examples.js

  • Just set _getHardCoded to true.

If you want to see all tests and examples

  • Just set _showTests to true.

Server: Mac OS Command-line test commands

You can add a string after npm start to force a specific input and join words with - to be more specfic...

  • Example: node app/test.js bear

  • Example: node app/test.js polar-bear

Mac OS Command-line test commands

Mac OS Command-line test commands


☕️ Resources ☕️

About

An application built using the PaLM API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published