garussell / aiArtistAssist

This project uses OpenAI to furnish some ideas and an image for getting started on user's next creative project. For example, if you want to learn to paint this app will give you ideas and resources on what to do next as well as provide an image to associate with that particular idea.
https://www.loom.com/share/2a21a2152b024118bf7d3df30188410d
2 stars 0 forks source link
monolyth motivational-messages openai-api

Artist Assist

UI Video Walkthrough

Overview

The Artist Prompts API is a Rails application that leverages OpenAI's GPT-3.5 Turbo model to generate prompts and suggestions for artists. It allows artists to receive personalized recommendations for their goals, action steps, and resources based on their input.

Features

Getting Started

Prerequisites

Installation

  1. Clone the repository:

git@github.com:garussell/artist_assist.git

  1. Install dependencies:

bundle install

  1. Setup database:

rails db:create rails db:migrate

  1. Configure OpenAi API Key:

$ EDITOR="code --wait" rails credentials:edit

open_ai: api_key: your_openai_api_key

Usage

  1. Start the Rails server:

rails server

  1. Make API requests to /api/v1/:id/post_idea
    • Artist ID is part of the URL
    • The prompt is passed into the body of the request (see endpoints)

Endpoints

POST /api/v1/post_idea

Request Body:

  {
    "goals": "I want to learn to play the drums"
  }

Response

  1. Status Code: 200

    • Body:
      {
      "data": {
      "id": null,
      "type": "response",
      "attributes": {
          "id": null,
          "action_steps": "Stuf about drumming:,
          "resources": "Resources with links",
          "goals": "I want to learn to play the drums",
          "image_url": "https://oaidalleapiprodscus.blob.core.windows.net/private/org-DUWm0ko8w9epxLgtftuHr2ZP/user-C3kDGpQ319mqmHmO4pjG7bKq/img-7aiQAzBdz1lPJJN2adBKBMSg.png?st=2023-11-20T19%3A35%3A08Z&se=2023-11-20T21%3A35%3A08Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2023-11-20T20%3A28%3A47Z&ske=2023-11-21T20%3A28%3A47Z&sks=b&skv=2021-08-06&sig=Qk6szB/AlQ7eUIZnuO4Fdbh0YVl5%2BFluLWuUGJ87Crs%3D"
      }
      }
      }
  2. Status Code: 404 :not_found

    • If the artist does not exist:
      {
      "error": "Artist not found"
      }
  3. Status Code: 422 :unprocessable_enity

    • If "goals" were left blank
      {
      "error": "You must provide your creative goals."
      }

Future Iterations / In progress

  1. CRUD functionality for Artist
  2. Authentication for Artist
  3. User Interface

Contributing

If you'd like to contribute to the project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/your-feature
  3. Makes changes and commit: git commit -m "Add your feature"
  4. Push to the branch: git push origin feature/your-feature
  5. Open a pull request

Created by: