mckaywrigley / chatbot-ui

Come join the best place on the internet to learn AI skills. Use code "chatbotui" for an extra 20% off.
https://JoinTakeoff.com
MIT License
28.72k stars 8k forks source link

Feature Request: include awesome-chatgpt-prompts #271

Closed tatsuiman closed 10 months ago

tatsuiman commented 1 year ago

Is it possible to read a CSV file of prompts from "awesome-chatgpt-prompts" and implement a search and recommendation feature for prompts?

SyedMuzamilM commented 1 year ago

@mckaywrigley I think this feature might be useful. And we should provide a prompt library that would have some of the popular prompts included in the prompt bar which would be a separate tab there.

What do you think about this, let me know then I would try to work on this.

Maybe we could also provide a button to import prompts as CSV and then that would be there in the custom tab for that user.

SyedMuzamilM commented 1 year ago

@tatsu-i check out https://chatify.blackkalu.com and let me know if this is how you want the prompt library to be.

oznav2 commented 1 year ago

Screen Shot 2023-03-30 at 11 03 24

tatsuiman commented 1 year ago

@SyedMuzamilM Thanks for the great job! Since the procedure of importing CSV from a browser is rather complicated for users due to the need to understand the CSV format, is it possible to implement the following so that the contents of the CSV can be loaded into the library when started with the csv file path given in the environment variable?

export PROMPT_CSV=/csv/prompts.csv

CSV file format https://github.com/f/awesome-chatgpt-prompts/blob/main/prompts.csv

SyedMuzamilM commented 1 year ago

Yes it could be done. I will implement that functionality in my repo and will let you know. Or you can keep checking that.

tatsuiman commented 1 year ago

Below is an example of a Dockerfile for this functionality.

# ---- Base Node ----
FROM node:19-alpine AS base
WORKDIR /app
COPY package*.json ./

# ---- Dependencies ----
FROM base AS dependencies
RUN npm ci

# ---- Build ----
FROM dependencies AS build
COPY . .
RUN npm run build

# ---- Production ----
FROM node:19-alpine AS production
WORKDIR /app
COPY --from=dependencies /app/node_modules ./node_modules
COPY --from=build /app/.next ./.next
COPY --from=build /app/public ./public
COPY --from=build /app/package*.json ./
COPY --from=build /app/next.config.js ./next.config.js
COPY --from=build /app/next-i18next.config.js ./next-i18next.config.js

# Prompt template
ENV PROMPT_CSV=/app/prompts.csv
ADD https://raw.githubusercontent.com/f/awesome-chatgpt-prompts/main/prompts.csv /app/prompts.csv
# Expose the port the app will run on
EXPOSE 3000

# Start the application
CMD ["npm", "start"]
SyedMuzamilM commented 1 year ago

Below is an example of a Dockerfile for this functionality.

# ---- Base Node ----
FROM node:19-alpine AS base
WORKDIR /app
COPY package*.json ./

# ---- Dependencies ----
FROM base AS dependencies
RUN npm ci

# ---- Build ----
FROM dependencies AS build
COPY . .
RUN npm run build

# ---- Production ----
FROM node:19-alpine AS production
WORKDIR /app
COPY --from=dependencies /app/node_modules ./node_modules
COPY --from=build /app/.next ./.next
COPY --from=build /app/public ./public
COPY --from=build /app/package*.json ./
COPY --from=build /app/next.config.js ./next.config.js
COPY --from=build /app/next-i18next.config.js ./next-i18next.config.js

# Prompt template
ENV PROMPT_CSV=/app/prompts.csv
ADD https://raw.githubusercontent.com/f/awesome-chatgpt-prompts/main/prompts.csv /app/prompts.csv
# Expose the port the app will run on
EXPOSE 3000

# Start the application
CMD ["npm", "start"]

will check it,once it is done you check the repo or website

stephanexenos commented 11 months ago

Hello, I just find this post and I would like to ask you if anybody finally have a working solution for this ?

Thankx in advance,

Stephane